feat(oauth): browser-based consent page for daemonized servers#190
Merged
Conversation
When the OAuth authorize handler runs without a TTY (e.g. as a LaunchAgent or systemd service), it previously returned interaction_required as JSON, leaving users with no recovery path. Now it renders an HTML consent page where the user can enter their vault passphrase to prove human presence. The passphrase is verified by attempting to open the vault — the same secret that gates the vault root, so no new trust material is introduced. On successful passphrase verification, the authorization code is minted and the user is redirected to the client's redirect_uri exactly as in the TTY flow. On failure, the consent page is re-rendered with an error message. This preserves the #21 security property: token issuance still requires active human action (knowing the vault passphrase), while making the OAuth DCR flow usable in daemon deployments. Changes: - handleOAuthAuthorize: detects no-TTY condition and renders HTML consent page - handleOAuthConfirm: new POST handler that verifies passphrase via vault open - consent page: clean HTML form with client info and passphrase input - CSRF protection: uses the OAuth state parameter Closes #188
79565b4 to
42a5ddb
Compare
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.
Bundles fixes for multiple open issues. The list below grows as commits land; every linked issue will close automatically on merge.