-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Tokenutil: Perform num uses check earlier #11647
Conversation
|
||
data["token_num_uses"] = 0 | ||
data["token_type"] = "batch" | ||
requestFunc(logical.UpdateOperation, data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to try using the token after making the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand. This is when updating a role that is used to issue a token. Do you mean that that test should issue a token and try to use it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests stops here because without the fix, the update step used to fail and now it doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe? I just figure if this wasn't possible before, the resulting role might not yield usable tokens due to other latent bugs, so it would be nice to validate that they work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'll add those steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a backend level unit test. So I couldn't ensure that the token is usable. However the test now does ensure that a valid Auth block is returned from the engine. The token creation and usability should not be affected in my opinion. Pushed up the changes.
* Perform num uses check earlier * Add CL * Ensure that login works
Fixes: #11570