-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Support AWS KMS Key Aliases #227
Comments
I'm not sure the AWS REST API accepts the aliases directly. If it doesn't we have to figure out how to convert the alias into a key id. |
According to the docs, they should all be accepted when passed as a keyId. Strange though that the alias/name didn't work. I guess I'll have to dig into the code. Perhaps it is my issue ... |
https://docs.aws.amazon.com/kms/latest/APIReference/API_Sign.html#KMS-Sign-request-KeyId
It looks like aliases are accepted by the API. What error did you get with the alias? |
When using AWS keys (with the system properties workaround mentioned in #226 ), I have found that when passing the key alias it does not support AWS key aliases, it only supports key IDs. Key alises are a common way to refer to keys.
In AWS KMS you can refer to a key in the following ways:
arn:aws:kms:us-west-1:4292584766675:key/d4a23b1f-6c58-48ed-b0f7-aa09f4bb402b
arn:aws:kms:us-west-1:4292584766675:key/alias/mycool-name
orarn:aws:kms:us-west-1:4292584766675:key/alias/here/is/a/path
d4a23b1f-6c58-48ed-b0f7-aa09f4bb402b
alias/mycool-name
oralias/here/is/a/path
It would be great if all these different methods could be supported in the jsign key alias parameter. In the AWS CLI tools using any of those as a key-id is valid.
I think probably we could simplify it to look for a regex:
^arn:.*:key/([-a-f0-9]+)$
and^arn:.*:alias/(.*)$
and^alias/(.*)$
and^[-a-f0-9]+$
The text was updated successfully, but these errors were encountered: