Stop offering identity-provider sign-in in the installer - #224
Merged
Conversation
The installer asked whether to offer sign-in through the identity provider and then asked for a client id, but there is no client an Endpoint can use. The ones a Federation registration creates are confidential, so the browser's code exchange is refused with 'Invalid client or Invalid client credentials', and their tokens carry no sub claim — which AUTH_API_URL looks the user up by, so validation answers 500 even once the exchange succeeds. The scope that supplies sub is assigned to those clients neither by default nor optionally, so nothing the Endpoint requests can add it. Answering yes could only produce a button that fails after a successful login, which reads as a credentials problem and is not one. The question goes until how this is meant to work is settled with whoever administers the identity provider. The OIDC_* settings stay documented and are still read by the API and the UI, so a deployment with a working client switches sign-in on by editing .env.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #223.
The installer asked whether to offer sign-in through the identity provider, then asked for a client id. No answer leads anywhere:
publicClient: False, client-secret authenticator), so the browser's code exchange is refused withunauthorized_client/ "Invalid client or Invalid client credentials" — after a successful login, which reads as a credentials problem and is not one.subclaim, andAUTH_API_URLlooks the user up bysub: it answers500 {"error": "Failed to retrieve user details", "details": "Role query failed"}. Requesting the scope that would supply it answersinvalid_scope, since it is assigned to those clients neither by default nor optionally.So the question is removed. The prompts are now:
The
OIDC_*settings are untouched: still documented inexample.envanddocs/configuration.md, still read by the API and the UI. A deployment that has a working client switches sign-in on by editing.env; the installer simply never turns it on.install/README.mdnow says why, in place of the older explanation that no longer describes the real obstacle.Verified
OIDC_ENABLED=False.black --check .andflake8clean.