<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-fx-oauth-government-content-access-control-00" category="std" ipr="trust200902" obsoletes="" updates="" xml:lang="en" symRefs="true" sortRefs="false" tocInclude="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <!-- Generated by id2xml 1.5.2 on 2025-12-16T22:00:09Z -->
  <front>
    <title abbrev="OAuth 2.1 Government Content Access Cont">OAuth 2.1 Government Content Access Control</title>
    <seriesInfo name="Internet-Draft" value="draft-fx-oauth-government-content-access-control-00"/>
    <author initials="F." surname="Morin" fullname="Francois-Xavier Morin">
      <organization>FXCO Ltd.</organization>
      <address/>
    </author>
    <date year="2025" month="December" day="16"/>
    <workgroup>Web Authorization Protocol</workgroup>
    <abstract>
      <t>
   This document defines an OAuth 2.1 profile that enables a government
   authority to enforce age-based and content-based access restrictions
   for online services while preserving user privacy.  The protocol
   allows relying parties to request government-defined regulatory
   scopes (such as pornography or social media access) and receive
   cryptographically verifiable eligibility decisions without disclosing
   user identity, exact age, or personally identifiable information.
   The profile constrains OAuth features to prevent abuse, cross-service
   correlation, and unauthorized token issuance.</t>
    </abstract>
    <note>
      <name>About This Document</name>
      <t>
   This note is to be removed before publishing as an RFC.</t>
      <t>
   Status information for this document may be found at
   <eref target="https://datatracker.ietf.org/doc/draft-fx-oauth-government-content-"/> access-control/.</t>
      <t>
   Discussion of this document takes place on the Web Authorization
   Protocol Working Group mailing list (mailto:oauth@ietf.org), which is
   archived at <eref target="https://mailarchive.ietf.org/arch/browse/oauth/."/> Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/oauth/."/>
      </t>
    </note>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   Governments increasingly require online services to restrict access
   to certain categories of content based on the age or legal status of
   users.  Existing approaches frequently rely on disclosure of personal
   data, third-party identity providers, or proprietary mechanisms that
   enable tracking across services.</t>
      <t>
   This document specifies *OAuth 2.1 Government Content Access Control
   (GCAC)*, an OAuth 2.1 profile in which a government-operated
   authorization server evaluates user eligibility for regulated content
   categories and issues privacy-preserving attestations to relying
   parties.  GCAC is designed to answer narrowly scoped regulatory
   questions (e.g., whether a user may access a category of content)
   while minimizing data disclosure and preventing correlation across
   services.</t>
      <t>
   GCAC is not an identity system and MUST NOT be used for
   authentication, user login, or personalization.</t>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Conventions and Definitions</name>
      <t>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> when, and only when, they appear in all
   capitals, as shown here.</t>
      <t>
   The following additional terms are used: - *Government Content
   Control Authority (GCCA)*: - A government-operated OAuth
   Authorization Server responsible for identity verification, age
   evaluation, and policy enforcement. - *Relying Party (RP)*: - An
   OAuth client requesting eligibility decisions for regulated content.
   - *Scope*: - A government-defined content access category (e.g.,
   pornography, social_media, gambling, alcohol, firearms, vpn, proxy).
   - *Person Key*: - A government-internal, pseudonymous identifier
   derived from a national identity record and never exposed outside the
   GCCA. - *Site Token*: - An RP-scoped, non-reversible token
   representing a government eligibility attestation.</t>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>Goals and Non-Goals</name>
      <section anchor="sect-3.1" numbered="true" toc="default">
        <name>Goals</name>
        <t>
   The goals of this specification are: - Enable government-enforced
   content access controls - Support multiple regulatory scopes defined
   by government policy - Prevent disclosure of identity, date of birth,
   or exact age - Prevent cross-RP correlation of users - Leverage
   existing OAuth 2.1 security mechanisms</t>
      </section>
      <section anchor="sect-3.2" numbered="true" toc="default">
        <name>Non-Goals</name>
        <t>
   This specification explicitly does not attempt to: - Provide user
   authentication or login - Expose personal attributes or identity
   claims - Enable cross-service user identification - Replace digital
   identity or credential systems</t>
      </section>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Architecture Overview</name>
      <t>
   GCCA uses the OAuth 2.1 Authorization Code flow with mandatory
   security extensions and additional semantic constraints.</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
User → Relying Party → Government Content Control Authority ↑ ↓ └────
OAuth 2.1 ───────┘
]]></artwork>
      <t>
   The GCCA operates as a constrained OAuth Authorization Server, and
   the RP operates as a confidential OAuth client.</t>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Scope Model</name>
      <section anchor="sect-5.1" numbered="true" toc="default">
        <name>Government-Defined Scopes</name>
        <t>
   Scopes represent legally regulated content categories.  Examples
   include:</t>
        <t>
   pornography social_media gambling alcohol firearms vpn proxy</t>
        <t>
   Each scope: - MUST be defined and governed by the GCCA - MUST
   correspond to a legal or regulatory access rule - MUST prevent scope
   definitions or combinations thereof that would allow an RP to infer a
   user’s exact age or approximate age range through multiple
   eligibility queries.  Scopes MUST be coarse-grained and legally
   motivated, and MUST NOT be parameterized by numeric age values.</t>
      </section>
      <section anchor="sect-5.2" numbered="true" toc="default">
        <name>Scope Evaluation Semantics</name>
        <t>
   For each requested scope, the GCCA determines whether the user
   satisfies the applicable legal requirement.  The RP receives only a
   boolean eligibility result per scope.</t>
      </section>
    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>Client Registration</name>
      <t>
   Relying parties MUST register with the GCCA prior to using GCAC.</t>
      <t>
   During registration, the RP MUST provide: - Legal entity
   identification - Intended use and justification for requested scopes
   - One or more redirect URIs - A client authentication method (mutual
   TLS or private_key_jwt)</t>
      <t>
   The GCCA MAY restrict which scopes an RP is authorized to request.</t>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>Protocol Flow</name>
      <section anchor="sect-7.1" numbered="true" toc="default">
        <name>Authorization Request</name>
        <t>
   The RP initiates an OAuth authorization request:</t>
        <t>
   GET /authorize ?response_type=code &amp;client_id=client_id
   &amp;redirect_uri=registered_uri &amp;scope=pornography social_media
   &amp;state=random_nonce &amp;code_challenge=pkce_value`</t>
        <t>
   The GCCA MUST reject requests that include unregistered redirect URIs
   or unauthorized scopes.</t>
      </section>
      <section anchor="sect-7.2" numbered="true" toc="default">
        <name>User Authentication and Evaluation</name>
        <t>
   The GCCA authenticates the user using government-controlled
   mechanisms and evaluates eligibility for each requested scope.</t>
      </section>
      <section anchor="sect-7.3" numbered="true" toc="default">
        <name>Authorization Response</name>
        <t>
   Upon successful evaluation, the GCCA redirects the user back to the
   RP with an authorization code.</t>
      </section>
      <section anchor="sect-7.4" numbered="true" toc="default">
        <name>Token Request and Response</name>
        <t>
   The RP exchanges the authorization code at the token endpoint using
   client authentication and PKCE.  The GCCA responds with a site-scoped
   eligibility attestation:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
json { "site_token": "opaque_string", "scope_results": {
"pornography": true, "social_media": false }, "expires_at":
"timestamp" }
]]></artwork>
      </section>
    </section>
    <section anchor="sect-8" numbered="true" toc="default">
      <name>Token Derivation</name>
      <t>
   The GCCA MUST derive an internal person key as follows:</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
person_key = HMAC(master_secret_key, national_person_id)

The site token MUST be derived deterministically:

site_token = HMAC(person_key, client_id)
]]></artwork>
      <t>
   The person key and national identifiers MUST NOT be exposed outside
   the GCCA.</t>
    </section>
    <section anchor="sect-9" numbered="true" toc="default">
      <name>Re-Verification</name>
      <t>
   Relying parties MUST provide a user-accessible mechanism to re-
   initiate the GCAC flow.  Re-verification MUST follow the same
   protocol as the initial authorization.</t>
    </section>
    <section anchor="sect-10" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   GCAC relies on OAuth 2.1 security best practices, including
   authorization code flow, PKCE, redirect URI allowlists, and strong
   client authentication.  Leaked client identifiers alone do not enable
   token issuance.  Tokens are RP-scoped and non-transferable,
   preventing cross-service correlation and replay attacks.</t>
    </section>
    <section anchor="sect-11" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC6749" target="https://www.rfc-editor.org/info/rfc6749" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6749.xml">
          <front>
            <title>The OAuth 2.0 Authorization Framework</title>
            <author fullname="D. Hardt" initials="D." role="editor" surname="Hardt"/>
            <date month="October" year="2012"/>
            <abstract>
              <t>The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6749"/>
          <seriesInfo name="DOI" value="10.17487/RFC6749"/>
        </reference>
        <reference anchor="RFC7636" target="https://www.rfc-editor.org/info/rfc7636" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7636.xml">
          <front>
            <title>Proof Key for Code Exchange by OAuth Public Clients</title>
            <author fullname="N. Sakimura" initials="N." role="editor" surname="Sakimura"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Agarwal" initials="N." surname="Agarwal"/>
            <date month="September" year="2015"/>
            <abstract>
              <t>OAuth 2.0 public clients utilizing the Authorization Code Grant are susceptible to the authorization code interception attack. This specification describes the attack as well as a technique to mitigate against the threat through the use of Proof Key for Code Exchange (PKCE, pronounced "pixy").</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7636"/>
          <seriesInfo name="DOI" value="10.17487/RFC7636"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8705" target="https://www.rfc-editor.org/info/rfc8705" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8705.xml">
          <front>
            <title>OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens</title>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <author fullname="T. Lodderstedt" initials="T." surname="Lodderstedt"/>
            <date month="February" year="2020"/>
            <abstract>
              <t>This document describes OAuth client authentication and certificate-bound access and refresh tokens using mutual Transport Layer Security (TLS) authentication with X.509 certificates. OAuth clients are provided a mechanism for authentication to the authorization server using mutual TLS, based on either self-signed certificates or public key infrastructure (PKI). OAuth authorization servers are provided a mechanism for binding access tokens to a client's mutual-TLS certificate, and OAuth protected resources are provided a method for ensuring that such an access token presented to it was issued to the client presenting the token.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8705"/>
          <seriesInfo name="DOI" value="10.17487/RFC8705"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC6819" target="https://www.rfc-editor.org/info/rfc6819" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6819.xml">
          <front>
            <title>OAuth 2.0 Threat Model and Security Considerations</title>
            <author fullname="T. Lodderstedt" initials="T." role="editor" surname="Lodderstedt"/>
            <author fullname="M. McGloin" initials="M." surname="McGloin"/>
            <author fullname="P. Hunt" initials="P." surname="Hunt"/>
            <date month="January" year="2013"/>
            <abstract>
              <t>This document gives additional security considerations for OAuth, beyond those in the OAuth 2.0 specification, based on a comprehensive threat model for the OAuth 2.0 protocol. This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6819"/>
          <seriesInfo name="DOI" value="10.17487/RFC6819"/>
        </reference>
        <reference anchor="RFC9101" target="https://www.rfc-editor.org/info/rfc9101" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9101.xml">
          <front>
            <title>The OAuth 2.0 Authorization Framework: JWT-Secured Authorization Request (JAR)</title>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <date month="August" year="2021"/>
            <abstract>
              <t>The authorization request in OAuth 2.0 described in RFC 6749 utilizes query parameter serialization, which means that authorization request parameters are encoded in the URI of the request and sent through user agents such as web browsers. While it is easy to implement, it means that a) the communication through the user agents is not integrity protected and thus, the parameters can be tainted, b) the source of the communication is not authenticated, and c) the communication through the user agents can be monitored. Because of these weaknesses, several attacks to the protocol have now been put forward.</t>
              <t>This document introduces the ability to send request parameters in a JSON Web Token (JWT) instead, which allows the request to be signed with JSON Web Signature (JWS) and encrypted with JSON Web Encryption (JWE) so that the integrity, source authentication, and confidentiality properties of the authorization request are attained. The request can be sent by value or by reference.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9101"/>
          <seriesInfo name="DOI" value="10.17487/RFC9101"/>
        </reference>
      </references>
    </references>
    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t>
   The author would like to acknowledge ongoing discussions within the
   OAuth and digital privacy communities that informed the design
   principles of this specification.</t>
    </section>
  </back>
</rfc>
