Add support for using mackms keys with no tags#600
Merged
Conversation
This commit allows to create, get, sign, and other operations using keys without a tag. By default, the default tag used by the mackms package is com.smallstep.crypto, this tag can be changed using the tag parameter in the uri, e.g., mackms:label=test;tag=my-tag. But if we want to not use a tag we need to provide the tag parameter empty, e,g., mackms:label=test;tag= Fixes #595
dopey
previously approved these changes
Sep 26, 2024
Contributor
Author
|
@hslatman, Can you look at it too? |
hslatman
reviewed
Sep 26, 2024
Member
There was a problem hiding this comment.
@maraino logic looks OK.
It would be nice to update (some of) the doc blocks describing the empty tag usage. Maybe not a full example URI, but at least a short blurb saying an empty tag is allowed, and results in creating / searching / deleting keys without a tag being set.
I think it's a small enough of a use case that just the empty tag is OK, but we could opt to (also) support a specific sentinel value for the new behavior, i.e. tag=<null>. Don't have a strong preference, though.
Contributor
Author
hslatman
approved these changes
Sep 26, 2024
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.
Description
This commit allows to create, get, sign, and other operations using keys without a tag.
By default, the default tag used by the mackms package is
com.smallstep.crypto. If we want to create or get a key using the URImackms:label=test, themackmspackage will assume that the default tag is being used.The default tag can be changed using the tag parameter in the URI, e.g.,
mackms:label=test;tag=my-tag. But if we want not to use a tag, we need to provide the tag parameter empty, e,g.,mackms:label=test;tag=.Programs using the
mackmspackage can also set themackms.DefaultTagto any other value, if it is set to empty, the created keys will not have a tag.Fixes #595