-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Move certificate extensions to entity alias metadata #14418
Comments
Hi @MochaCaffe! We discussed this request in our engineering team sync today. While the request is reasonable, we'd like to take some time to dig into the potential implementation details and validate that there won't be the potential for unintended consequences. As a result, it may take longer for a final decision to be made, whether it's that we accept a PR from the community, or handle the work internally as part of an upcoming release, or if the decision ends up being that it would be safer (from a functionality, compatibility, or security point of view) not to take this request on. We will link this request internally and work with product and engineering leaders to come to a decision. Thanks in advance for your patience! :) |
Hi @MochaCaffe , |
Hi @HridoyRoy , currently, only cert metadata having their keys present in the field "Allowed metadata extensions" in the auth method are stored. By default, this field is empty, letting the feature act as an "opt-in" |
That makes sense to me. Still, as far as I understand it, currently |
Update: we're currently investigating whether or not I'm going to remove the Thanks, |
Hi! Just dropping an update here, so after digging into the code surrounding alias metadata updates, we've found that updating it does result in duplicate entity creation, when the alias is for a local auth mount on a non-primary cluster of a multi-cluster setup. We would ideally want to solve that issue first, before reviewing and merging this fix, so in the problematic scenario we don't end up with duplicate entities for the same mount every time a certificate gets rotated. We're discussing this internally, and I will be sure to drop updates as and when we make progress on this! |
Add the possibility to include certificate metadata in the created logical.Alias (the identity alias), in addition to the metadata added to logical.Auth. This is analogous to the behaviour of the ldap and approle auth providers. This possibility can be configured by the config endpoint of the auth method mount and is disabled by default. We added the read operation on this config endpoint as well. Fixes: hashicorp#14418 Signed-off-by: Peter Verraedt <[email protected]>
* auth/cert: Add metadata to identity-alias Add the possibility to include certificate metadata in the created logical.Alias (the identity alias), in addition to the metadata added to logical.Auth. This is analogous to the behaviour of the ldap and approle auth providers. This possibility can be configured by the config endpoint of the auth method mount and is disabled by default. We added the read operation on this config endpoint as well. Fixes: #14418 Signed-off-by: Peter Verraedt <[email protected]> * Add changelog for #14751 Signed-off-by: Peter Verraedt <[email protected]> * Test the usage of cert metadata in ACL policies Signed-off-by: Peter Verraedt <[email protected]> Signed-off-by: Peter Verraedt <[email protected]> Signed-off-by: Peter Verraedt <[email protected]>
Add the possibility to include certificate metadata in the created logical.Alias (the identity alias), in addition to the metadata added to logical.Auth. This is analogous to the behaviour of the ldap and approle auth providers. This possibility can be configured by the config endpoint of the auth method mount and is disabled by default. We added the read operation on this config endpoint as well. Fixes: hashicorp#14418 Signed-off-by: Peter Verraedt <[email protected]>
Is your feature request related to a problem? Please describe.
@peterverraedt submitted a PR #13348 to add TLS certificates ASN1 extensions as identity metadata in Vault when using the cert auth method.
This would enable using certificates metadata in ACL templating to set a proper policy scope for each machine when accessing secrets.
However, it looks like extensions are not registered at all in Vault. It is expected that these should be set in the metadata property of an entity.
When looking at an entity used by a client using cert method:
Describe the solution you'd like
I propose to save certificate metadata in the alias instead of using the parent entity.
In addition to solving this issue, I think using the alias is a more coherent approach, as it is closely linked with the certificate unlike the parent entity which is more global to the user
Related PR: #14419
The text was updated successfully, but these errors were encountered: