-
Notifications
You must be signed in to change notification settings - Fork 827
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
inconsistencies login server to UAA after upgrade cf-171 to cf-180 #97
Comments
Hi @oliverro , Can you expand a bit on the exact problems you are seeing? There were some changes in the UAA 1.8.0 release to tighten security a bit on the /oauth/token endpoint (see: https://github.com/cloudfoundry/uaa/releases/tag/1.8.0) but without seeing exactly what issues you are seeing it's hard to pinpoint what may be going on. cc @fhanik |
Hi, thanks for the reply ... I am Oliver by the way. ;o) In our environment where this fails, the result of the curl (see below) is a 401 Unauthorized, with a www-authenticate challenge that says: There is also a response body: curl: curl -k -v -H "Accept: application/json" -H "Authorization: bearer $TOKEN" -d "response_type=code&client_id=jtace&source=login&username=@&redirect_uri=https://ace.stage0.ng.bluemix.net:443/rest/oauth/callback" https://uaa.stage0.ng.bluemix.net/oauth/authorize So we think that either the UAA interactions have changed in the build of cf-180, or perhaps the loginserver's OAuth client (called "login") isn't set up with the correct authorities. login oauth client: (so looks similar like what we have in our other environment with cf-171) jtace client: (also looks like the working one) So what do you think with regards to change of the login server behavior in cf-177? (or better to say from cf-177 until incl. cf-180)? On the release notes we did not really see how the login flow should have changed. Any idea where we could start look into why it fails - like i.e. oauth? Thanks in advance. |
/oauth/authorize needs a client_secret parameter |
and yes, there have been some changes. some of these endpoint were a bit On Friday, September 12, 2014, Filip Hanik notifications@github.com wrote:
|
Ok, thanks. Could you please let me know where/how to obtain such a client_secret parameter? |
hi @oliverro your request
is referring to the client The change you are noticing is that previously, the secret was not required, and this created a loophole, allowing the login server to bypass client authentication. |
See http://tools.ietf.org/html/rfc6749#section-2.3.1 |
@fhanik I don't understand the comment about needing a client secret for jtace. The purpose of the loginserver is to obtain an authorization code, for another client, on behalf of another user. The loginserver should not need the client_secret of the jtace client. Instead the loginserver passes it's own access token (with the oauth.login authority, obtained using a client_credentials flow), and identifies that it is an all-powerful loginserver by way of the "source=login" parameter to the token endpoint. Using curl examples, could you explain precisely what the flow(s) should be for a loginserver trying to obtain an authorization code on behalf of another client, for a resource owner that the loginserver has authenticated? |
Because this issue has been marked closed, and I don't think it is closed, I've opened #98 to continue the discussion. |
@sbweeden - my mistake, i thought you were talking about a password grant - you are indeed talking about a authorization code grant. |
In 180 the UAA supports multiple origin's. The username is no longer unique. You have two options, one is passing the UID for the user or the username/origin combo
For your curl command, simply add the parameter |
Thanks, that does work. How, as a consumer of build 180, were we supposed to discover this change, and where can I find updated documentation on the new loginserver interfaces? If we've missed something obvious, I'd like to improve our process for where we look to understand new changes. |
|
@sbweeden - the source=login is not technically a public API that the UAA offers, so we don't have an official release process for it. |
How can you claim source=login is not public? What is public then? The real problem is that message-level backward compatibility broke, causing significant delays in adopting a new CF build. |
It's an API we maintain specifically for the login-server that may authenticate users elsewhere. and hence we release those in sync. We will update the docs. sorry for the inconvenience. |
Thanks. We have written our own loginserver that uses this interface to UAA and it is important for us to understand that it is a supported and documented interface. |
Hi All,
we have our own, dedicated login server running together with cf-171. Everything performed as designed.
We were studying the release history documentation in order to assess changes from cf-171 until incl. to cf-180. The only high-level changes found are:
Looking closer at documentation of v177 UAA upgrade we did not see any changes/enhancements which should indicate that login server is now incompatible with the new UAA.
Could someone from UAA team please help us to identify what might be wrong? I would be available via Email and/or phone in order to discuss things.
Thanks in advance.
The text was updated successfully, but these errors were encountered: