added check if anonymous token policy exists#2790
Merged
Conversation
Ganeshrockz
reviewed
Aug 18, 2023
Ganeshrockz
reviewed
Aug 18, 2023
Contributor
Ganeshrockz
left a comment
There was a problem hiding this comment.
It would be good to add test for the changes in configureAnonymousPolicy function
Ganeshrockz
reviewed
Aug 23, 2023
Contributor
Ganeshrockz
left a comment
There was a problem hiding this comment.
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
Contributor
thisisnotashwin
left a comment
There was a problem hiding this comment.
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
thisisnotashwin
approved these changes
Aug 23, 2023
Contributor
thisisnotashwin
left a comment
There was a problem hiding this comment.
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
Contributor
Author
|
@david-yu which versions should we backport this to? |
Contributor
|
Added backports, thank you. |
Ganeshrockz
approved these changes
Aug 29, 2023
This was referenced Aug 30, 2023
2 tasks
aahel
added a commit
that referenced
this pull request
Aug 30, 2023
* 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
aahel
added a commit
that referenced
this pull request
Aug 30, 2023
* 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
aahel
added a commit
that referenced
this pull request
Aug 30, 2023
* 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
aahel
added a commit
that referenced
this pull request
Aug 30, 2023
…/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>
aahel
added a commit
that referenced
this pull request
Aug 30, 2023
…/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>
aahel
added a commit
that referenced
this pull request
Aug 30, 2023
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: