--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/33f02323-1112-4233-96a8-c28f39c508f7%40googlegroups.com.
--
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJLxjVE_squ4-zyzPSteQcxCbkqJY04FO-kZ%2BgjDHiQh7wAjyQ%40mail.gmail.com.
Hi DanielThe elytron-security extension does some authentication and the complementing extensions such as the oauth2 or smallrye-jwt one cooperate by helping it to prepare a Principal.I thought for a second you were expecting the elytron-security to do what JHipster does, prepare a time scoped cookie (as JWT, and on the server), but if JHipster will do it yourself, then1) enhancing elytron-security to recognize the DB providerand2) using the smallrye-jwt extension to validate the token (it will feed the principal info back to the elytron-security once the token has been validated)is all what you may need to do.
Can JHipster be configured to use the same type of stores which are already supported by elytron-security, just so that you can have a faster POC time ?The 2) will not work immediately as well - smallrye-jwt does not like the symmetric algorithms as the secret key distribution would be a real issue in the flows it it is trying to address but for cases like this one, may be we can relax it and support the HS algorithms optionally.
Let me us know please If you think that idea of working with smallrye-jwt will work in principle, if yes then I'll try to make sure HS* are supportedThe other question, where is the role info in the JWT created by JHipster ?
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMsYBfUAEED_TeD%3DS2SwRWCdcmuagpHkL%2BC-o_wwkM1WjGgjtQ%40mail.gmail.com.
On Mon, Aug 19, 2019 at 5:35 PM Sergey Beryozkin <sbia...@redhat.com> wrote:Hi DanielThe elytron-security extension does some authentication and the complementing extensions such as the oauth2 or smallrye-jwt one cooperate by helping it to prepare a Principal.I thought for a second you were expecting the elytron-security to do what JHipster does, prepare a time scoped cookie (as JWT, and on the server), but if JHipster will do it yourself, then1) enhancing elytron-security to recognize the DB providerand2) using the smallrye-jwt extension to validate the token (it will feed the principal info back to the elytron-security once the token has been validated)is all what you may need to do.It's exactly what I want to try. I don't like comparision but Elytron-security is replacing Spring security in this context what is currently made in the sample app will continue to belongs to an end-user application.Can JHipster be configured to use the same type of stores which are already supported by elytron-security, just so that you can have a faster POC time ?The 2) will not work immediately as well - smallrye-jwt does not like the symmetric algorithms as the secret key distribution would be a real issue in the flows it it is trying to address but for cases like this one, may be we can relax it and support the HS algorithms optionally.Not sure to understand this point. Your talking about the JWT key signature? In JHipster is a secret provided to the app, from what I have tested smallrye-jwt relies on an public/private key pair. IMHO, for a POC I can provide a dummy private key for a prod app I don't know yet how to manage that but I think I can figure it out later.
Let me us know please If you think that idea of working with smallrye-jwt will work in principle, if yes then I'll try to make sure HS* are supportedThe other question, where is the role info in the JWT created by JHipster ?JHipster use uses a custom "auth" claim to store a comma-joined list of roleMP-JWT is asking for a specific "groups" claimThe easiest way to deal with this point is to merge JHipster and MP-JWT constraints (having both "groups" and "auth" claim). Another way would be to transform the claim on-the-fly (via a filter, it's what I do with a Asp.Net Core Identity, yes... in .Net ;-D) expose "auth" to be compliant with Jhipster generated front-end and translate it into "groups" before MP-JWT needs it.
I think both of you answered the original question. I will create the "elytron-security DB provider" feature request to continue the discussion.