Shouldn't the /oauth/jwks endpoint be accessible without authentication?

Created on 13 November 2020, about 4 years ago
Updated 26 January 2023, almost 2 years ago

Problem/Motivation

I am testing this module with jumbojett/OpenID-Connect-PHP library and it tries to access the jwks_uri with no authentication.

The endpoint returns the configured public key where there's no problem of it being publicly accessible, right?

πŸ› Bug report
Status

Closed: duplicate

Version

5.0

Component

Code

Created by

πŸ‡±πŸ‡°Sri Lanka kamalw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States Nate Covington

    I'm in the process of trying to use Drupal + Simple_Oauth as the single sign on server for Synapse / Matrix.

    When I set up the configuration for OpenID Connect in Synapse homeserver.yaml file, it was getting a 403 forbidden error when it tried to connect to the /oauth/jwks endpoint.

    Just to document my solution I retrieved my public.key value from Simple_Oauth module

    Then I used this this converter tool:
    https://russelldavies.github.io/jwk-creator/

    And created /.well-known/jwks file by hand

    That allowed Synapse to start up with the homeserver.yaml settings intact - yay!

    However, when I tried to use app.element.io to log in using Drupal, Synapse was giving this "not canonical" error:

    2023-01-26 17:36:53,521 - synapse.rest.client.login - 621 - INFO - GET-80 - Requested URI https://matrix.covingtoncreations.net/_matrix/client/r0/login/sso/redirect/oidc-drupal?redirectUrl=https%3A%2F%2Fapp.element.io%2F is not canonical: redirecting to https://covingtoncreations.net/_matrix/client/r0/login/sso/redirect/oidc-drupal?redirectUrl=https%3A%2F%2Fapp.element.io%2F
    2023-01-26 17:36:53,522 - synapse.access.http.8008 - 460 - INFO - GET-80 - 10.0.0.1 - 8008 - {None} Processed request: 0.002sec/-0.001sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 0B 302 "GET /_matrix/client/r0/login/sso/redirect/oidc-drupal?redirectUrl=https%3A%2F%2Fapp.element.io%2F HTTP/1.1" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0" [0 dbevts]
    

    It's trying to get back to matrix.example.com but for some reason it's passing it over to example.com, the matrix server isn't able to actually process the remainder.

  • πŸ‡ΊπŸ‡ΈUnited States pianomansam

    I realize this will be fixed in the other issue, but I wanted to upload a 6.x compatible patch file.

Production build 0.71.5 2024