docs: blessed two-client pattern for dual-role BFF backends#101
Merged
Conversation
A BFF that both brokers user login (server-side native-grant redeem) and acts machine-to-machine (client_credentials) needs two modgud clients, not one — strict grant separation forbids a single client holding both. Document this as the intended pattern, and clarify that the native grants have no public-only enforcement, so a server-side BFF may redeem them with a confidential client. - native-apps.md: server-side BFF (confidential redeem) note + two-client split - service-accounts.md: dual-role BFF tip cross-linking the native-apps guidance Answers the AmZettel consumer request (Atlas: requests-amzettel-bff-single-credential). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Documents the blessed pattern for a backend-for-frontend (BFF) that both brokers user login and acts machine-to-machine — it needs two modgud clients, not one.
Answers the AmZettel consumer request logged in Atlas (
requests-amzettel-bff-single-credential). All three of their questions, verified against the current backend code:urn:cocoar:otpredeem already works —ExchangeNativeOtpAsyncgates only onNativeGrants.Enabled+ thegt:urn:cocoar:otppermission; there is no public-only /token_endpoint_auth_methodenforcement. A server-side BFF may redeem natively with a confidential client.client_credentials. So a dual-role BFF runs a login client + a separate SA-linked M2M client. Now written down.client → one principal, the SA-managed read-only rule, and audit tooling). Not part of this doc change.Changes
docs/integrate/native-apps.md— "Server-side BFF (confidential redeem)" note after the client-type step, spelling out the two-client split.docs/admin/service-accounts.md— a "Dual-role BFF backends" tip under Strict grant separation, cross-linking the native-apps guidance.Docs-only. No code changes.
🤖 Generated with Claude Code