-
Notifications
You must be signed in to change notification settings - Fork 846
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
Add support for OpenID Connect Discovery #2361
Comments
Could you please motivate why the client ID and the client secret have to be known? Maybe I missed something, but I think that just the base URL before the |
The client ID is always a required parameter, in all authentication flows. The client secret is required in some flows (client credentials, authorization code without PKCE). It's not possible to obtain a token without these parameters. |
OK, then this was a misunderstanding. It was mentioned since it is required to get a token, not since it is required to get the discovery information... |
The discussion above seems to point to pointing to the well-known endpoint to get info about the IDP url's. But I think what is needed is a way to exchange the username/password (possibly client secret) for an auth token without UI, so this can work in a headless (newman) way. I have written such a utility that works against keycloak. Internally it impersonates a web browser, parses the HTML and adds the creds to the form and posts back to the IDP. Problem with that approach is that every IDP generates different HTML, making the code fragile. The redirect url contains the secret with which you can then call the token endpoint. |
It's a little off-topic to the issue we're discussing this on, but, I think this is a deliberate design decision of OpenID Connect - it does not want to limit the ways that systems could authenticate with a particular system. It's a silly example, perhaps, but consider a support site for an appliance manufacturer. Instead of a traditional username + password, you could log in using the model number and serial number of your fridge to see messages you've exchanged with the support site. If the manufacturer then added a discussion forum it could use the support site as an IDP - but still without requiring the traditional username and password. It's definitely impossible to come up with a general solution that will always work - the web browser impersonation method is really the only way to work, I think, unless you can convince the devs for the product you're working with to add an API to log in with :-) Back on topic though - where I work we're currently working on documenting our API via our test suite - preventing us from letting the documentation get out of sync with the reality of the product. documentation for the OpenID configuration & scopes and such has been left as a TODO, in part because we didn't fully understand the OpenAPI spec format at the time, and in part because we knew that the OpenID scopes wouldn't import into Postman anyway. I think we're going to compromise on documenting it as if it's plain OAuth2 (in the hopes that Postman will grok it, and because most of our API calls won't have any dependency on OIDC anyway). Would be great if Postman could import + display the scopes somewhere to help with configuring authentication for different requests. |
I understand where you come from, but that's basically to make sure you are getting the "configs" for that specific client (thus the id) |
In my collection, I've added a call to the discovery endpoint and a Test Script that sets some variables. Then, before clicking the "get token" button, I can just run this script and populate the variables being used in my collection's "Authorization" tab. You can probably play around and improve it, but here it is:
|
Any plans in this direction? |
OpenID Connect discovery is a protocol that would allow an application to discover the OAuth 2 endpoints and specifics in a standardized fashion.. e.g. a user could specify the following
Site: https://acccount.example.org/
Client ID : clientid
Client Secret: clientsecret
Then postman can simply do a GET for
https://account.example.org/.well-known/openid-configuration
this will return a JSON hash that will contain the rest of the needed information.Example:
Matching up with the current OAuth2 form in postman,
More information can be found https://openid.net/specs/openid-connect-discovery-1_0.html
The text was updated successfully, but these errors were encountered: