Repository navigation
feat(auth,deploy): seamless OIDC-to-passkey auto-upgrade and passkey-first TinyCloud defaults - #96
Merged
Merged
Conversation
…first TinyCloud tenant defaults
4 of 11 tasks
… 0062_passkey_upgrade
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.
What changed and why
Members migrating from Pocket ID (or another OIDC provider) to TinyServer's built-in passkeys no longer need the owner to manually generate and DM one-time claim links. When
sign_in_methodsisany, signing in through the provider automatically prompts members without a passkey to create one right inside the callback tab (with a "Skip for now" fallback) before returning totinyclient, andPOST /v1/me/passkeys/linkskips the 10-minuterecent_sign_in_requiredgate for a member's first passkey so one-click in-app setup works from any active session.New TinyCloud tenants created with
deploy/tenant/tenant.shnow default to built-in passkeys only (compose.passkey.yml), direct reverse proxy ingress (compose.proxy.ymlwith per-tenantTINYSERVER_HTTP_PORT, no Cloudflare tunnel), sealed E2EE attachments (scan-off.yml), and minimal logging (compose.nologs.yml), and server panics / fatal errors now pass throughlog_policy::redact_value.Type
Clients
Proof
Scenario: e2e/scenarios/passkey-auto-upgrade
Lab run:
Compatibility
Older
tinyclientreleases work unchanged:/v1/auth/callbackhandles the browser passkey upgrade flow transparently before redirecting to the loopback callback, andPOST /v1/me/passkeys/linkkeeps its existing request/response contract. Existingdeploy/compose.ymlstacks (Pocket ID + Cloudflare tunnel) remain unchanged unless the opt-in overlays ortenant.shdefaults are used.Migrations
crates/db/migrations/0062_passkey_upgrade.sql— adds'upgrade'topasskey_ceremonies'skindCHECK constraint and addsapp_passkey_upgrade_peek(bytea)(SECURITY DEFINER, granted toapp_runtime).Risk and rollback
Low risk: if starting an upgrade ceremony fails during OIDC callback, the server logs a warning and falls through to issuing the auth code directly so sign-in is never blocked. Rollback by reverting this PR / deploying the previous image and running the 4-line SQL rollback above if needed.