-
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 the authorization code flow for Server Web Apps #4480
Comments
Pedro, we will need to test that the static resources are accessible as part of it, I can wire in the test for sure :-) |
@sberyozkin, I'll be working on this one. I'm not sure about yet how to indicate whether or not the app should start the code dance or just accept bearer tokens. Meanwhile, I'll be working on making the necessary changes to get code flow working. |
@sberyozkin I guess we should leverage Vert.x OAuth2 in order to implement code flow in the extension, right? |
@sberyozkin, I manage to get something work for code flow. But I have some questions:
|
@pedroigor Hi Pedro, it all sounds good, thanks; I mean, we can tweak/optimize things going forward if something proves a bit sub optimal :-) Please consider to have a dedicated config group for the various redirect properties. As per choosing between the bearer-only and the code flow, as per our discussion with Stian, lets start with a property such as |
Hi @pedroigor we have a priority issue for 0.25.0, #4495 as the 0.24.0 users are now starting to feel some pain due to the missing configuration :-). If you reckon you can finalize this one quickly enough then please do a PR, but otherwise lets work on #4495 (may be I can help) |
@sberyozkin, I should be able to deliver this quickly, if tests allow me to do so :) So far, I have the authorization code flow working by leveraging Vert.x OAuth2. Where a cookie is set by the extension to create a session for the user after successful authentication. Where session time on the application is bound to the ID Token lifetime. This covers pretty much the basics. The missing points would be:
I think that once we do above, we're pretty much done. Being Logout what should take a little more time as it should also involve changes to Keycloak. I can send a PR with what I have so far, without tests (see #1 above), if you want to. |
@pedroigor Hi Pedro, thanks, I've actually missed this comment, sorry; IMHO, tests and a property for choosing between the type of the flow, plus some minor tweaks around making both types of tokens available would be all we need for a start to get it going; we can then agree on some follow-up tasks alongside what you've suggested, I'd say, having some basic logout support afterwards would be the 1st issue to sort out so that the users could have a complete experience :-) |
Hello, do you have any plans about this issue? I'm facing now this topic for apps to be written in the company i'm working so it will be very useful to know a roadmap about is it's already planned. |
Yes, Pedro has already done a lot of work around it, we just have some higher priority issues to deal with. Stay tuned :-) |
@sberyozkin I've talked with Stian about the missing configuration bits and we agreed about these points:
I should be working with these changes now. Please, let me know if you have any consideration. |
@pedroigor, and @stianst Thanks for the update. I'm not sure these particular qualifiers make it less technical for the users which is what Stian asked for originally, and is a good idea. To me 'client' means this resource server acts as an OIDC client which is fairly technical. And as I said, this 'client' can be just well, a plain 'resource-server' which only needs an ID token, not worrying about the access token. I propose for us to think a bit more about these names ? Speaking about the code flow, @pedroigor, as I said earlier, the PR now only makes the ID Token available but we need to make sure the access token is also available. re the code flow properties, asking the users to create a bean just to set few extra scopes seems complex. If the users can add a lot then they should have this option, but I suggest we start with a configuration group for the redirect properties, example, let the users set a comma separated list of the scopes, and we can slowly grow that group. |
@pedroigor I did a quick code a couple of weeks back. But it is not relevant now I guess. My plan was to find out how to get both ID and access tokens from Vertx |
I'm not 100% convinced about client and resource-server either, but struggling to come up with good names. What about app and service? Or frontend and backend? |
I would go for what we know is a well-known type/concept which can be referenced. In fact, |
This is because the decision to include a scope or any other property can be done dynamically based on requests. I also thought about defining them, statically, in |
Setting code flow properties is really something that has to be supported in a programmatic way. Scope, prompt, max_age, and IdP specific things are most often set dynamically at runtime and not statically in a config file. |
For names of app types the general idea is that someone can secure their apps without knowing all that much about oidc. Names like client, relaying party and resource server are a bit confusing imo. Perhaps we should ask some non-security guys? |
Yeah, that could help. Whatever the person says we use :) |
Find some random person in the supermarket and ask them
…On Thu, 24 Oct 2019, 16:57 Pedro Igor, ***@***.***> wrote:
Yeah, that could help. Whatever the person says we use :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4480?email_source=notifications&email_token=AARKSFYQI6D7QXDC4JXMPQTQQGZWHA5CNFSM4I7CEWYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECFKUEQ#issuecomment-545958418>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARKSFZNHKVOFQLKPBMPYVDQQGZWHANCNFSM4I7CEWYA>
.
|
@pedroigor @stianst thanks; Re the names, I was thinking about the 'client' on the plane yesterday and I just could not sleep because of it :-). I was going to suggest Something like 'service' and '(web)app', which is what Stian suggested reads better to me, I just prototyped '(web)'. 'service' is something which reads as if the interaction with a human user is not of the main concern as far as the security is concerned. While '(web)app' does imply somehow some HTML will be there :-). So may be Or completely alternatively, switch back to the flow types: What do you think ? thanks |
@stianst @pedroigor sure, letting the users customize with the bean will meet all the variations, I realized afterwards trying to configure it all can be complex in its own way; we can still offer a configuration group for some straightforward cases, and make sure both pieces of the info (custom bean provided and the config-provided) add to a common set of the redirect parameters |
+1 to web-app and service
…On Fri, 25 Oct 2019, 11:52 sberyozkin, ***@***.***> wrote:
@pedroigor <https://github.com/pedroigor> @stianst
<https://github.com/stianst> thanks;
Re the names, I was thinking about the 'client' on the plane yesterday and
I just could not sleep because of it :-). I was going to suggest
authorization and web but then I had doubts again.
Indeed, marking a web application as the 'client' if all what is required
is to get the human users authenticating into it, can be confusing unless
someone has read the OAuth2/OIDC specs. Technically it is correct but the
concept of the web app being a 'client' can be confusing.
Something like 'service' and '(web)app', which is what Stian suggested
reads better to me, I just prototyped '(web)'. 'service' is something which
reads as if the interaction with a human user is not of the main concern as
far as the security is concerned. While '(web)app' does imply somehow some
HTML will be there :-).
So may be service and web-app ? The former is about just checking the
tokens and returning 401/403, the latter can scale to either of the server
web app cases Stian went through (1) just get the user authenticate with
IdToken, 2) in addition to 1) make a remote call with the access token on
behalf of the user).
Or completely alternatively, switch back to the flow types: bearer-only
(which KC users in particular already know about), and now
authorization-code ? And possibly follow up with some other flow when
considered acceptable (once the OAuth2 token binding is more widely
supported, etc) ?
What do you think ? thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4480?email_source=notifications&email_token=AARKSF5YXXHISCSSOSD2UTLQQK6VPA5CNFSM4I7CEWYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECH24DQ#issuecomment-546287118>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARKSF3VIC6REAE6JUE6IA3QQK6VPANCNFSM4I7CEWYA>
.
|
@stianst @sberyozkin Deal. |
[fixes #4480] - Initial Code Flow Support
Description
The OIDC adapter has to be able to authenticate the users accessing the server web apps/confidential clients using the best practice code flow.
Stian recommends to distinguish between the bearer only and code flow modes using very user friendly property values something like:
etc. @stianst, @pedroigor FYI.
The text was updated successfully, but these errors were encountered: