-
Notifications
You must be signed in to change notification settings - Fork 326
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
added check if anonymous token policy exists #2790
Conversation
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.
It would be good to add test for the changes in configureAnonymousPolicy
function
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.
Looks good to me. Deferring the approval to someone with more domain context
control-plane/subcommand/server-acl-init/anonymous_token_test.go
Outdated
Show resolved
Hide resolved
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 looking good. i think we need to think about the unit-test a little more to ensure we are testing this behavior correctly. Otherwise, i like this.
control-plane/subcommand/server-acl-init/anonymous_token_test.go
Outdated
Show resolved
Hide resolved
control-plane/subcommand/server-acl-init/anonymous_token_test.go
Outdated
Show resolved
Hide resolved
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 looks good. I dont think i need to review this again but I think we should update the names of the policy in the test.
control-plane/subcommand/server-acl-init/anonymous_token_test.go
Outdated
Show resolved
Hide resolved
@david-yu which versions should we backport this to? |
Added backports, thank you. |
* added check if anonymous token policy exists * changed checkIfAnonymousTokenPolicyExists impl * made consts private * added test for configureAnonymousPolicy * fixed unit test * fixed test and minor refactoring * fix typo * changed some var names * added changelog
* added check if anonymous token policy exists * changed checkIfAnonymousTokenPolicyExists impl * made consts private * added test for configureAnonymousPolicy * fixed unit test * fixed test and minor refactoring * fix typo * changed some var names * added changelog
* added check if anonymous token policy exists * changed checkIfAnonymousTokenPolicyExists impl * made consts private * added test for configureAnonymousPolicy * fixed unit test * fixed test and minor refactoring * fix typo * changed some var names * added changelog
…/1.2.x (#2864) * backport of commit deecdb9 * added check if anonymous token policy exists (#2790) * added check if anonymous token policy exists * changed checkIfAnonymousTokenPolicyExists impl * made consts private * added test for configureAnonymousPolicy * fixed unit test * fixed test and minor refactoring * fix typo * changed some var names * added changelog --------- Co-authored-by: aahel <aahel.guha@hashicorp.com>
…/1.1.x (#2863) * backport of commit deecdb9 * added check if anonymous token policy exists (#2790) * added check if anonymous token policy exists * changed checkIfAnonymousTokenPolicyExists impl * made consts private * added test for configureAnonymousPolicy * fixed unit test * fixed test and minor refactoring * fix typo * changed some var names * added changelog --------- Co-authored-by: aahel <aahel.guha@hashicorp.com>
added check if anonymous token policy exists (#2790) * added check if anonymous token policy exists * changed checkIfAnonymousTokenPolicyExists impl * made consts private * added test for configureAnonymousPolicy * fixed unit test * fixed test and minor refactoring * fix typo * changed some var names * added changelog
Changes proposed in this PR:
Prevent updating anonymous token if it already exists and is attached to the anonymous token policy
How I've tested this PR:
How I expect reviewers to test this PR:
Checklist: