question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing /.well-known/openid-configuration endpoint

See original GitHub issue

When attempting to use Frappe as an IdP, there seems to be no access to /.well-known/openid-configuration or similar. This endpoint provides dynamic configuration for dependent systems to properly build requests and responses to their dependent IdP in a format that the IdP understands.

Why this is important is to avoid additional deployments of dependent systems, as the dependent systems can adjust using the configuration from the IdP.

Has there been any research and/or a proposal to attempt to implement such a document?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
revantcommented, Jan 6, 2021
  • /.well-known/openid-configuration: there is no such endpoint (adding endpoint in frappe is /api/method/dot.path.to.function), as a workaround we either need to reverse proxy it on nginx and have some endpoint, or add code to frappe to allow such endpoint. or just add /api/method/frappe.integrations.oauth2.openid_configuration
  • Frappe has OAuth 2.0 Provider only (PKCE not there from OAuth 2.1), It is not compliant with OIDC 1.0 spec.
  • there is no client-credential grant.
  • I had put id_token as a monkey patch, The py2 to py3 happened and that added b'' and it’s not tested in test_oauth20.py so nothing got noticed.
  • https://github.com/frappe/frappe/blob/develop/frappe/integrations/oauth2.py this file has all the endpoints as well as the code that patches id_token to bearer_token, fix that if you need.
  • you can change https://github.com/frappe/frappe/blob/develop/frappe/integrations/doctype/oauth_client/oauth_client.py for length of secret.

Do send PR and tag me if you change anything.

For more compliant OAuth2+OIDC use one of the following.

Configure one of these as Social Login Key and the integration will be seamless. If you need tokens from Frappe OAuth 2.0 provider for making user requests, they will also be issued even after logging in with social login key.

1reaction
dealproccommented, Jan 6, 2021

OK. My opinion here is that the OAuth endpoints are pretty much broken. There seems to be too many elements missing or their implementation is counter-productive to its usage:

  • The client secret is 10 characters long, and cannot be edited. M$ is requiring a min. of 16 characters)
  • IAT claim is missing from the JWT

I have not gotten further, but I need to put further work on this on-hold until I can get further along.

Read more comments on GitHub >

github_iconTop Results From Across the Web

8 - Stack Overflow
Failed to load http://localhost:5000/.well-known/openid-configuration: No 'Access-Control-Allow-Origin' header is present on the requested ...
Read more >
Get OpenID Connect Well-Known Configuration
Returns the OpenID Connect configuration values from the provider's Well-Known Configuration Endpoint, per the specification (http://openid.net/specs/openid- ...
Read more >
Help - Auth0 Community
I recently came across this OpenID well-known configuration does not contain logout endpoint. We have an application where any open-id ...
Read more >
openId Connect EndPoints Missing on ADFS
Hi,. Can any one tell the cause, why i am not able to see OpenID Endpoint on my ADFS 2016 Server. Thanks in...
Read more >
OpenID Discovery document does not have CORS headers
The following endpoints should have CORS headers to enable browser based user-agents to work with Gitlab. /.well-known/openid-configuration ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found