Skip to content

Why introspection_endpoint parameter not use discovered data? #255

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

Closed
liqiangno1 opened this issue Mar 21, 2019 · 4 comments
Closed

Why introspection_endpoint parameter not use discovered data? #255

liqiangno1 opened this issue Mar 21, 2019 · 4 comments

Comments

@liqiangno1
Copy link

liqiangno1 commented Mar 21, 2019

Environment
  • lua-resty-openidc version (e.g. 1.7.0)
Expected behaviour

The introspection_endpoint can be find in discovered data,and why does not this parameter use discovered data?

Actual behaviour

I need pass this parameter.

Minimized example
 -- call the introspection endpoint
  json, err = openidc.call_token_endpoint(opts, opts.introspection_endpoint, body, opts.introspection_endpoint_auth_method, "introspection")
Configuration and NGINX server log files

Config and logs for the minimized example, possibly provided as attachments.

@bodewig
Copy link
Collaborator

bodewig commented Mar 21, 2019

Unfortunately the introspection endpoint is not part of the standard discovery document, see https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata

It is part of RFC 8414 which would use a different URI and is not a superset of OIDC discovery.

We probably could try to see whether our discovery data contains introspection_endpoint and probably also introspection_endpoint_auth_methods_supported keys and use them if no explicit endpoint URI has been given.

@liqiangno1
Copy link
Author

Ok, I See. Thanks for your explanation!

@zandbelt
Copy link
Contributor

Agree, it would make sense to start supporting RFC 8414 and do it in the way @bodewig describes.

bodewig added a commit that referenced this issue Jul 9, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
see #255

Signed-off-by: Stefan Bodewig <[email protected]>
@bodewig
Copy link
Collaborator

bodewig commented Jul 9, 2019

cdaf824 adds discovery as a fallback when opts.introspection_endpoint has not been set.

introspection_endpoint_auth_methods_supported is a bit more complex and I stopped adding it when I realized our introspection request will always use client_secret_post as it adds the client_id and client_secret claims to the body unconditionally. It may - in addition - use one of the other three auth methods we currently support based on opts.introspection_endpoint_auth_method. I am afraid we break something if we remove the "always use client_secret_post" logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants