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

Using the mackms package to load keys that do not have a tag attribute set #595

Open
jwright-stripe opened this issue Sep 18, 2024 · 0 comments
Labels
enhancement New feature or request needs triage

Comments

@jwright-stripe
Copy link

jwright-stripe commented Sep 18, 2024

What would you like to be added?

Hey there!

I really like the mackms package- it makes working with the keychain from Go really pleasant. 🎉

One issue I'm running into is that the current URI structure sets a default tag attribute if one is not provided. This makes it not possible to work with existing keys that do not have a tag on them today.

It doesn't appear possible to explicitly tell mackms to not add a tag attribute to the SecItemCopyMatching queries.

Is this something that you'd be open to considering? I know that changing the existing default behavior wouldn't be backwards compatible. Just tossing out an option, maybe an approach for supporting null* style parameters in the URI, e.g. label=my-name;hash=ccb792f9d9a1262bfb814a339876f825bdba1261;nulltag=true might work for explicitly unsetting attributes.

Note that this might require adding more conditionals like this one so that tags are truly excluded from the search dictionary.

Why this is needed

This will make it easier to work with existing keychain items that may not have particular attributes like tags.

I'm happy to help with this if there's an approach you like, but either way I appreciate y'all considering this! Keep up the great work.

@jwright-stripe jwright-stripe added enhancement New feature or request needs triage labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage
Projects
None yet
Development

No branches or pull requests

1 participant