Add groups claim in OIDC token as secondary principals of SSH certs #1445
-
What would you like to be addedIt would be helpful if the values in a OIDC groups claim could be added as secondary principals to minted SSH certs. Why this is neededThis would support a lighter SSHD config that would permit RBAC. Instead of requiring users to have their own home directories, etc. a set of users and sudo rules corresponding to their groups/roles could be created. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hey @hb3b, thanks for opening the issue! This is actually already possible by using templates. That blog post only goes into detail about X.509 templates, but @maraino is currently doing some tests to provide you a template. You'd add it to a provisioner like:
Don't forget to restart the |
Beta Was this translation helpful? Give feedback.
-
Let's see with this simple template you can concatenate the "groups" in the token with the principals:
Take into account that this template assumes "groups" if it exists is always an array. For more information on A token with
A token without those groups
|
Beta Was this translation helpful? Give feedback.
-
@hb3b let us know if this works for you. |
Beta Was this translation helpful? Give feedback.
-
Sweet, that did it! |
Beta Was this translation helpful? Give feedback.
Let's see with this simple template you can concatenate the "groups" in the token with the principals:
Take into account that this template assumes "groups" if it exists is always an array. For more information on
concat
take a look to http://masterminds.github.io/sprig/lists.htmlA token with
"groups": ["admin", "engineers"]
will create a certificate like: