nats-io / nsc

Tool for creating nkey/jwt based configurations
Apache License 2.0
101 stars 44 forks source link

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

Closed aricart closed 1 month ago

aricart commented 1 month ago

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

Fixes https://github.com/nats-io/nats-server/issues/5681

aricart commented 1 month ago

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.

aricart commented 1 month ago

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.