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

Tags are now case-sensitive, describe account lists tags associated with the account #668

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

aricart
Copy link
Member

@aricart aricart commented Sep 12, 2024

[CHANGE] Tags (--tag and --rm-tag) are now case-sensitive
[FIX] describe accounts was not printing tags associated with the account

Fixes nats-io/nats-server#5681

[FIX] describe accounts was not printing tags associated with the account
Copy link

@ripienaar ripienaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, what about the potential breaking impact?

go.mod Outdated
@@ -52,3 +52,5 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/nats-io/jwt/v2 => github.com/nats-io/jwt/v2 v2.6.1-0.20240912200904-90d24c5a61af

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably can't merge this?

@aricart
Copy link
Member Author

aricart commented Sep 16, 2024

Looks ok, what about the potential breaking impact?

by itself nothing - the tags will be all lowercase on anything loaded. However, sloppy input on the cli will possibly create unexpected results.

…is flag enables use of mix-case values on tags. If not specified and a tag value is mixed cased, the edit will be rejected.

[FEAT] for `--rm-tag` options in operator/account/user, the operation will now fail if the value is not found the JWT.
@aricart
Copy link
Member Author

aricart commented Sep 17, 2024

After trying a couple of options settled on the change that JWT API uses are always case-sensitive as that can be telegraphed through the release notes. But for nsc, added the flag --strict-tags, which allows non-lowercased values for tag operations.

This will catch sloppy usages of the flag where values are not lowercase and request that the --strict-tags option be specified. The other check is that the JWT will now report errors when trying to remove tags that are not present.

Copy link

@ripienaar ripienaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aricart aricart merged commit 2931e19 into main Sep 17, 2024
11 checks passed
@aricart aricart deleted the tags branch September 17, 2024 19:02
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.

scoped signing keys can't be used for KV/OBJ buckets.
2 participants