Skip to content

docs: RFC 0002 for explicit consent at signup - #1905

Merged
rohanchkrabrty merged 8 commits into
mainfrom
feat-rfc-separate-login
Aug 28, 2026
Merged

docs: RFC 0002 for explicit consent at signup#1905
rohanchkrabrty merged 8 commits into
mainfrom
feat-rfc-separate-login

Conversation

@rohanchkrabrty

Copy link
Copy Markdown
Contributor

Summary

  • Adds RFC 0002, proposing explicit consent at signup: a deployment declares its documents in app.consent config, the client sends the accepted document ids, and frontier writes an immutable user_consents record together with the new user in one transaction. With app.consent unset or disabled, nothing changes.
  • Adds a flow_intent field on AuthenticateRequest to separate login from signup. Consent is a signup-only requirement, and today both are the same request, so a login silently creates the account it should have refused and the consent check has nothing to key off before the OIDC redirect.
  • Specifies storage: one row per consent with document versions and URLs copied from config, no foreign key to users so records outlive account deletion, and BEFORE UPDATE/BEFORE DELETE triggers plus a create-only repository making them unmodifiable.
  • Specifies the user.consent_granted audit record fields, including why its actor has to be set explicitly rather than left to context enrichment on the skip-listed auth endpoints, and why it cannot be atomic with the consent write.
  • Records the accepted tradeoffs: no re-consent or withdrawal, three operator paths exempt from consent, and the account-enumeration oracle the login gate introduces.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview Aug 27, 2026 8:14pm

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added an RFC proposing explicit consent during signup.
    • Documents configurable consent requirements, consent capture across authentication flows, validation, auditing, and immutable consent records.
    • Covers the SDK signup experience, error handling, alternatives, limitations, and proposed implementation order.
    • Refined and clarified the proposal’s language without changing the described behavior.

Walkthrough

This RFC proposes explicit signup consent with configurable documents, flow intent propagation, consent validation, immutable consent records, audit events, and SDK checkbox support. It also defines errors, limitations, alternatives, references, and implementation order.

Changes

Explicit Signup Consent

Layer / File(s) Summary
Consent contracts and flow metadata
docs/rfcs/0002-explicit-consent-at-signup.md
Defines app.consent, the ListConsentDocuments endpoint, new AuthenticateRequest fields, FlowIntent, and consent metadata across OIDC redirects.
Signup and login enforcement
docs/rfcs/0002-explicit-consent-at-signup.md
Defines intent-based gates, consent resolution, user-creation validation, caller coverage, flow termination, and error mappings.
Consent records and audit events
docs/rfcs/0002-explicit-consent-at-signup.md
Specifies transactional consent persistence, immutable user_consents records, reporting queries, and audit events.
SDK behavior and implementation plan
docs/rfcs/0002-explicit-consent-at-signup.md
Describes SDK consent controls, alternatives, limitations, future work, references, and implementation order.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to 249af

This draft changes signup/login behavior and consent records but still leaves a post-commit audit-loss path, potentially unsafe configured links, and conflicting or incomplete authentication and error-handling rules. These could cause missing compliance records or broken and misleading signup flows, so the PR needs fixes or explicit owner acceptance before merge.

Suggested reviewers: amangit07, rohilsurana, shreyag02, whoabhisheksah

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

coveralls commented Aug 27, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 33112327895

Coverage remained the same at 49.168%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 40510
Covered Lines: 19918
Line Coverage: 49.17%
Coverage Strength: 15.74 hits per line

💛 - Coveralls

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1dc2fe21-4385-44c5-ac55-af0f437bbbc7

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf5e75 and 20bfedd.

📒 Files selected for processing (1)
  • docs/rfcs/0002-explicit-consent-at-signup.md

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

Comment thread docs/rfcs/0002-explicit-consent-at-signup.md Outdated
Comment thread docs/rfcs/0002-explicit-consent-at-signup.md Outdated
Comment thread docs/rfcs/0002-explicit-consent-at-signup.md Outdated
Comment thread docs/rfcs/0002-explicit-consent-at-signup.md Outdated
Comment thread docs/rfcs/0002-explicit-consent-at-signup.md Outdated
Comment thread docs/rfcs/0002-explicit-consent-at-signup.md Outdated
Shorter sentences and plainer wording throughout, and cut the paragraphs
that restated a decision already made earlier in the document. No design
changes: every decision, file reference and verified claim is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f80a22e-3585-4be4-9eb5-ef22fb91b974

📥 Commits

Reviewing files that changed from the base of the PR and between 20bfedd and 6349560.

📒 Files selected for processing (1)
  • docs/rfcs/0002-explicit-consent-at-signup.md

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Comment thread docs/rfcs/0002-explicit-consent-at-signup.md Outdated
Comment thread docs/rfcs/0002-explicit-consent-at-signup.md
@rohilsurana

Copy link
Copy Markdown
Member

Few points as we discussed -

  • remove metadata from consent table. If needed we will ad that in future.
  • remove GIN index from documents field of consent table. We don't really need to access it in that way.
  • consent record should store auth_strategy instead of auth_method.
  • audit record for this event will have schema.PlatformOrgId as the org_id
  • add an endpoint to fetch the list of documents on UI

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f4716e0-66c8-40e4-a967-5a41169a19d1

📥 Commits

Reviewing files that changed from the base of the PR and between 6349560 and 249af92.

📒 Files selected for processing (1)
  • docs/rfcs/0002-explicit-consent-at-signup.md

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

Comment thread docs/rfcs/0002-explicit-consent-at-signup.md
Comment thread docs/rfcs/0002-explicit-consent-at-signup.md
@rohanchkrabrty
rohanchkrabrty enabled auto-merge (squash) August 28, 2026 10:57
@rohanchkrabrty
rohanchkrabrty enabled auto-merge (squash) August 28, 2026 10:57
@rohanchkrabrty
rohanchkrabrty merged commit 88410ba into main Aug 28, 2026
8 checks passed
@rohanchkrabrty
rohanchkrabrty deleted the feat-rfc-separate-login branch August 28, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants