Skip to content
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

OIDC: doesn't discover wk config for default server #26466

Closed
kerryarchibald opened this issue Oct 29, 2023 · 3 comments
Closed

OIDC: doesn't discover wk config for default server #26466

kerryarchibald opened this issue Oct 29, 2023 · 3 comments
Labels
A-OIDC O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Labs

Comments

@kerryarchibald
Copy link
Contributor

kerryarchibald commented Oct 29, 2023

Steps to reproduce

  1. open https://element-oidc.lab.element.dev/, which has default server https://synapse-oidc.lab.element.dev
  2. click continue to authenticate
  3. notice that you are redirected to a compatibility login on MAS, and that there is no wk request in network
  4. change the server to 'synapse-oidc.lab.element.dev' (same server, without https)
  5. click continue
  6. notice you are redirected to native OIDC login

Outcome

What did you expect?

What happened instead?

/config

{
    "default_server_config": {
        "m.homeserver": {
            "base_url": "https://synapse-oidc.lab.element.dev",
            "server_name": "synapse-oidc.lab.element.dev"
        }
    },
    "disable_guests": true,
    "dummy_end": "placeholder",
    "embedded_pages": {
        "login_for_welcome": true
    },
    "features": {
        **"feature_oidc_native_flow": true**
    },
    "show_labs_settings": true
}

Reasoning here: matrix-org/matrix-js-sdk#3426

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

No

@kerryarchibald kerryarchibald added T-Defect Z-Labs A-OIDC S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Oct 29, 2023
@Johennes
Copy link
Contributor

Johennes commented Nov 7, 2023

I spoke to @pixlwave today and the logic on EIX is:

  • Drop the URL scheme (but remember if its using TLS or not) and take whatever the user input as a server name, trying to do the .well-known look-up
  • If it succeeds yay. If not, deny login with an error message (copy being dependent on whether the input is a valid URL or not)

IIUC this is essentially what was attempted to be implemented in matrix-org/matrix-js-sdk#3426.

Other than it being possible that there is no .well-known on the home server URL (as on matrix.org), @t3chguy raised in matrix-org/matrix-js-sdk#3426 (comment) that different server names with different .well-knowns could be pointing to the same home server URL.

So I think we're right in not implementing this logic and should rather pursue a holistic solution on the spec level.

Given that EX already has the same problem, this shouldn't block us from offering native OIDC as a labsed feature on EW though.

@Johennes
Copy link
Contributor

Johennes commented Nov 8, 2023

Descoping from https://github.com/vector-im/element-internal/issues/412 since EX has the same problem (not considered blocking there) and a spec change is needed to fix this.

@t3chguy
Copy link
Member

t3chguy commented Jan 15, 2024

This is by design,

"default_server_config": {
        "m.homeserver": {
            "base_url": "https://synapse-oidc.lab.element.dev/",
            "server_name": "synapse-oidc.lab.element.dev"
        }
    },

means do not make the request, here is the value. As per the docs. I suggest using default_server_name if you want a WK look-up

@t3chguy t3chguy closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-OIDC O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Labs
Projects
None yet
Development

No branches or pull requests

3 participants