-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 role mapping for Client certificates #23683
Comments
Also CC @stuartwdouglas |
Hi @ruromero I'm not sure this enhancement should be in the form of the security augmentor at the MTLS mechanism level, as it can have ordering issues (the custom ones may not see this augmentation), and I'm also not sure that we need to start supporting reading from the files - as again - someone will want that be in YAML, someone in the simple properties format. IMHO as far as MTLS authentication mechanism is concerned, it should check a Map property in its own namespace, Thanks |
I think a different property makes total sense but I think it'll be enough to treat it the same way as |
@ruromero I see, I forgot that It would be good to reuse So the proposal is to have What do you think ? |
Sorry I forgot to reply. The proposal sounds great to me. Thanks! |
Hi, |
@jochenr Hi, I'll be looking into it but I can't prioritize just yet. In meantime, can you please provide some examples of how you map things currently ? Do you map complete CA names to one or more roles ? |
Hi @sberyozkin, since we migrate application from (Fuse on) JBoss EAP, it would be perfect if we have the same features as the elytron subsystem. We don't use the complete CA name as key in the properties file. We use an elytron "x500-attribute-principal-decoder" in the mapper section to cut the name out of the complete CA name like this:
And the we have the CN as key and the values are a list of comma separarted roles
|
@jochenr Thanks, I can prototype something simple and will open a draft PR |
@sberyozkin Thank you very much🍻 |
Unfortuntaley today my team recognized that the solution only works for simple use-cases and not more complex ones😥 We have applications that use mTLS for some endpointe and OIDC for other endpoints. We have something like this
I think it would be better to have the same path-roles-policy relationship as with the other authentication types. Sory for not noticing this earlier. I did only tests with our basic/simple applications😥 |
@jochenr problem with your example is that I'm not sure I completely understand, however let me try:
You would need mTLS only applied on I'm sure this will require additional explanation, please feel free to correct me where I misunderstood you. |
this feature is not related to policies, but you need to authenticate to have roles, so.. require authentication. but if you use RolesAllowed annotation, you don't need any policy there. in fact, I bet using policy permit for |
Hi @michalvavrik, yes, I'd expect that ist works somehow like this
I prefer using this an not the @RolesAllowed annotation, becaus ethe endpoints are provided as Camel-Rest endpoints (and not JAX-RS) |
cc @sberyozkin
Try this:
that part is fine, we believe that's how most people use it. I have prepared annotation-based selection for authentication mechanisms here #36504 where you might do this
but that might never get in. |
ah sorry, I completely misread your note about annotations (missed NOT) as I dont' know camel-rest endpoints. Okay, in that case you need exactly what your wrote with |
ah, now I get it...and it works👍😃 |
Cool, glad it works! |
Description
When using Mutual TLS Authentication it is not possible to add roles to identities without a custom
SecurityIdentityAugmentor
it would be great to be able to extract the roles from a file or an external source like a database or LDAP.That means that when configuring MTLS I cannot have RBAC without implementing it myself.
Implementation ideas
Would it be enough to just provide a default SecurityIdentityAugmentor that is self-configured based on the
quarkus.security.users.file.roles
property orquarkus.security.jdbc.roles.query
(to give some ideas) ?This is an adapted working example taken from the guides.
The text was updated successfully, but these errors were encountered: