Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix-issue1758: create audit plan failed #1782

Merged
merged 6 commits into from
Sep 7, 2023

Conversation

winfredLIN
Copy link
Collaborator

#1758

Details: Create audit plan failed due to the audit plan name being too long.

Direct reason: The length of the jwt token exceeds the upper limit of varchar(255) defined in the data table, resulting in insert failure.

Deep reason: The length of apn(audit plan name) is too long, resulting in the generated jwt token being too long.

Solution: Use MD5 to hash the name and apn that may be too long to make the name and apn for generating each token become fixed-length, thereby controlling the length of the token.

@LinXiaoTao

details: create audit plan failed due to audit plan name too long

direct reason: The length of the jwt token exceeds the upper limit
of varchar(255) defined in the data table, resulting in insert failure.
deep reason: the length of apn is too long,resulting in the generated
 jwt token being too long.
solution: Use MD5 to hash the name and apn that may be too long to
make the name and apn for generating each token become fixed-length,
thereby controlling the length of the token.

@LinXiaoTao
@winfredLIN winfredLIN requested a review from ColdWaterLW August 31, 2023 09:51
winfredLIN and others added 5 commits September 4, 2023 09:29
If the value determines the apn calculated by MD5, it will cause the token that was not generated according to MD5 to be invalidated, so it is also allowed to resolve the apn and the apn in the URL all the time

@LinXiaoTao
add comments for preprocessing code modifications of the auditplan token

@LinXiaoTao
add test that compatible with older versions of tokens

@LinXiaoTao
@ColdWaterLW ColdWaterLW merged commit f8d8833 into actiontech:main Sep 7, 2023
2 checks passed
@LinXiaoTao
Copy link

Don't @ me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants