
| bas_federation_metadata_requriements | October 2026 | |
| Norlander | Informational | [Page] |
This specification defines the metadata requirements for OAuth 2.0 Clients, Authorization Servers and Protected Resources participating in the BAS federation [BAS.Rules]. The metadata is published in Entity Configurations according to OpenID Federation 1.1 [OpenID.Federation] and [OpenID.Federation.Connect], as profiled by [OIDC.Sweden.Federation]. The requirements apply to the Resolved Metadata, meaning the metadata that results once the Trust Chain of an Entity has been applied to the declarations the Entity makes about itself. The OAuth 2.0 protocol itself follows the Ena OAuth 2.0 Interoperability Profile [Ena.OAuth2].¶
<YYYY-nnnn>¶
This document specifies the requirements on the metadata an Entity in BAS publishes. It is written for the organizations that operate such Entities, and for the developers and operators who implement them.¶
The requirements stated here apply to OAuth 2.0 Clients, Authorization Servers and Protected Resources that adhere to [Ena.OAuth2], which is the profile in use within BAS. This is the current scope rather than a permanent limitation. BAS may later admit other Entity Types, or Entities adhering to other profiles, and the requirements in this document would then not apply to them unaltered.¶
The requirements build on a number of specifications. [OpenID.Federation] defines how metadata is published and resolved, and [OIDC.Sweden.Federation] profiles OpenID Federation for use in Swedish federations, a profile that BAS follows. [Ena.OAuth2] defines the OAuth 2.0 metadata and the requirement levels that apply, and [BAS.Security] states the algorithm and key requirements that apply within the federation. This document does not restate [Ena.OAuth2] and does not lower any of its requirement levels.¶
The requirement chapters state what has to appear in the Resolved Metadata of an Entity, in addition to what [Ena.OAuth2] requires.¶
The requirements on organization metadata (Section 3) and on identifier bindings (Section 4.1, Section 5.1 and Section 6.1) are not specific to BAS, and are intended to move to [Ena.Federation] once it is published.¶
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This specification uses the terms "Entity", "Entity Configuration", "Entity Identifier", "Entity Type Identifier", "Leaf Entity", "Subordinate Statement", "Trust Anchor", "Trust Chain" and "Resolved Metadata" as defined in [OpenID.Federation], the term "Federation Protocol Entity" as defined in [OIDC.Sweden.Federation], the terms "Client", "Authorization Server" and "Protected Resource" as defined in [Ena.OAuth2], and the terms "Federation Operator", "Federation Registration Operator", "Federation Registration Entity" and "Federation Member" as defined in Section 1.2 of [BAS.Rules]. The term "Collaboration Context" (Swedish: samverkanskontext) is used as defined in Section 1.2 of [BAS.Rules].¶
This specification also defines the following term:¶
A requirement is placed in this specification only if it is needed for one of the following:¶
Everything else follows [Ena.OAuth2]. The information exchange between Entities, such as scopes and access decisions, is out of scope and is decided by the parties or by a Collaboration Context, see Section 2.3 of [BAS.Rules].¶
Every Client and Authorization Server in BAS, and every Protected Resource registered in BAS, MUST publish an Entity Configuration. Its metadata is carried in the metadata Claim under the Entity Type Identifier oauth_client, oauth_authorization_server or oauth_resource, as specified in Sections 5.1.3 to 5.1.5 of [OpenID.Federation.Connect]. These are the Entity Types that the allowed_entity_types constraint of the BAS Trust Anchor admits, see Section 4.2 of [BAS.Rules]. Hosted Entity Configurations are not yet defined for BAS, see Section 3.2 of [BAS.Rules].¶
The requirements apply to the Resolved Metadata, meaning the metadata that results from applying the Subordinate Statements of the Trust Chain to the Entity's own declarations, see Section 10 of [OpenID.Federation]. A parameter that is REQUIRED in the Resolved Metadata is therefore not always one the Entity declares itself: a Federation Registration Entity may assign it in the Subordinate Statement, and the Trust Anchor metadata policy may constrain it. Where that is the case, the tables below say so, and Section 7 shows how.¶
The Resolved Metadata of an Entity MUST conform to [Ena.OAuth2] for its Entity Type. A parameter not listed in this specification MAY be used at the requirement level given by [Ena.OAuth2] or, where that profile does not address it, by the specification that defines it.¶
Where a value is checked at registration, the tables say so. A checked value is set by the Federation Registration Entity in the Subordinate Statement it issues for the Entity, so that the Resolved Metadata always carries the value that was checked, see Section 7.2.¶
This document does not specify the Entity Statement Claims themselves, such as iss, sub, iat, exp, jwks, authority_hints and trust_marks. Those are defined by Section 3.1 of [OpenID.Federation] and profiled by [OIDC.Sweden.Federation]. Clients, Authorization Servers and Protected Resources are Federation Protocol Entities, and therefore always Leaf Entities, so their Entity Configurations MUST NOT contain metadata of the Entity Type federation_entity, see Section 2.2 of [OIDC.Sweden.Federation].¶
Within BAS, Swedish is the default language. Metadata values intended for human consumption are provided in Swedish (#sv) and English (#en) as [Ena.OAuth2] recommends. For every such parameter that an Entity provides with a Swedish value, the Federation Registration Entity assigns the corresponding parameter without a language tag, holding the Swedish value, in the Subordinate Statement. The Resolved Metadata therefore always contains it, and implementations without support for language tags can use it. A value without a language tag that the Entity declares itself is replaced by the assigned value.¶
"client_name#sv" : "Min tjänst", "client_name#en" : "My service", "client_name" : "Min tjänst" <- assigned by the Federation Registration Entity¶
The keys an Entity uses in the OAuth 2.0 protocol, as opposed to the Federation Entity Keys that sign its Entity Statements, are published in its oauth_client, oauth_authorization_server or oauth_resource metadata. Three representations are available, see Section 5.2.1 of [OpenID.Federation]. The requirement levels below follow [Ena.OAuth2], which states them separately for each Entity Type, and they therefore differ between the Entity Types.¶
| Parameter | Requirement | Description | Defined in |
|---|---|---|---|
jwks
|
REQUIRED for a Client, unless jwks_uri is used, see Section 2.2.2.4 of [Ena.OAuth2]. OPTIONAL for an Authorization Server and a Protected Resource. |
The Entity's JSON Web Key Set, included by value in the metadata. | Section 2 of [RFC7591] and Section 5.2.1 of [OpenID.Federation] |
jwks_uri
|
REQUIRED for an Authorization Server, see Section 3.1.1.3 of [Ena.OAuth2]. REQUIRED for a Client, unless jwks is used. OPTIONAL for a Protected Resource. |
A URL from which the Entity's JSON Web Key Set can be retrieved. The URL MUST use the HTTPS scheme. | Section 2 of [RFC7591], Section 2 of [RFC8414], Section 2 of [RFC9728] and Section 5.2.1 of [OpenID.Federation] |
signed_jwks_uri
|
OPTIONAL | A URL referencing a signed JWT that carries the Entity's JSON Web Key Set. The URL MUST use the HTTPS scheme, and the JWT MUST be signed with a Federation Entity Key. | Section 5.2.1 of [OpenID.Federation] |
It is RECOMMENDED that an Entity uses only one of the three representations, see Section 5.2.1.1 of [OpenID.Federation].¶
The keys an Entity publishes MUST meet the cryptographic requirements of [BAS.Security], which state the algorithms and minimum key lengths that apply within BAS, see Section 3 of [BAS.Security]. An Entity that replaces a key MUST follow the key rollover requirements of Section 4 of [BAS.Security], so that other parties in the federation are not disrupted. To facilitate a smooth key rollover, each JWK MUST include a kid parameter, also in the cases where the JWK Set holds a single key, see Section 4 of [BAS.Security].¶
The parameters below identify the Entity and the organization it is registered for, and describe them. They are defined in Section 5.2.2 of [OpenID.Federation] unless stated otherwise, and are published with the same meaning in oauth_client, oauth_authorization_server and oauth_resource metadata.¶
| Parameter | Requirement | Description | Defined in |
|---|---|---|---|
organization_name
|
REQUIRED. Assigned by the Federation Registration Entity; OPTIONAL for the Entity to supply. | The name of the organization the Entity is registered for. The value without a language tag MUST be the legal name of the organization. Values for #sv and #en MAY also be given. |
Section 5.2.2 of [OpenID.Federation] |
organization_identifier
|
REQUIRED. Assigned by the Federation Registration Entity; OPTIONAL for the Entity to supply. | The organization identifier of the organization the Entity is registered for, in one of the formats of Section 3.1. | Section 2 of [OIDC.Sweden.OrgId] |
contacts
|
REQUIRED | Contact addresses for the people or groups responsible for operating the Entity. The value MUST hold at least one email address. | Section 5.2.2 of [OpenID.Federation] and Section 2 of [RFC7591] |
display_name
|
OPTIONAL | A human-readable name of the Entity, given in the languages of Section 2.1. | Section 5.2.2 of [OpenID.Federation] |
description
|
OPTIONAL | A human-readable description of the Entity, given in the languages of Section 2.1. | Section 5.2.2 of [OpenID.Federation] |
keywords
|
OPTIONAL | Keywords describing the Entity. | Section 5.2.2 of [OpenID.Federation] |
logo_uri
|
OPTIONAL | An HTTPS URL of a logo for the Entity. | Section 5.2.2 of [OpenID.Federation] |
policy_uri
|
OPTIONAL | An HTTPS URL of documentation of the conditions and policies that apply to the Entity. | Section 5.2.2 of [OpenID.Federation] |
information_uri
|
OPTIONAL | An HTTPS URL of further information about the Entity. | Section 5.2.2 of [OpenID.Federation] |
organization_uri
|
OPTIONAL | An HTTPS URL of a web page of the organization the Entity is registered for. | Section 5.2.2 of [OpenID.Federation] |
The organization identifier formats are defined by the following:¶
The organization_identifier MUST be expressed as a GLUE-URI using ISO/IEC 6523 representation, in the format urn:glue:iso6523:<icd>:<identifier>. The recommended formats are listed below, and the list may be extended as needed.¶
| Identifier | ICD | Format |
|---|---|---|
| Swedish organization number | 0007 |
urn:glue:iso6523:0007:<organization-number>
|
| GLN (Global Location Number) | 0088 |
urn:glue:iso6523:0088:<gln>
|
| Domain-based eDelivery Participant Identifier | 0203 |
urn:glue:iso6523:0203:<domain>, for example urn:glue:iso6523:0203:foretaget.se
|
A Swedish organization number is a ten-digit string without a hyphen, according to [SKV709]. ICD 0007 is assigned to the Swedish Tax Agency (Skatteverket).¶
"organization_identifier" : "urn:glue:iso6523:0007:2021006883"¶
Example: the organization number of the Swedish Agency for Digital Government (Digg).¶
A Client's oauth_client metadata conforms to Section 2.2 of [Ena.OAuth2]. The table below lists only the parameters for which BAS adds a requirement, in addition to those in Section 3.¶
| Parameter | Requirement | Description | Defined in |
|---|---|---|---|
token_endpoint_auth_method
|
REQUIRED. Constrained by the Trust Anchor metadata policy. | The value MUST be private_key_jwt, see Section 4.2. |
Section 2 of [RFC7591] and Section 2.2.2.2 of [Ena.OAuth2] |
grant_types
|
REQUIRED. Constrained by the Trust Anchor metadata policy. | The grant types the Client uses. The value MUST be ["client_credentials"]. BAS is a machine-to-machine federation, and client_credentials is the only grant type used in it. |
Section 2 of [RFC7591] and Section 2.2.2.3 of [Ena.OAuth2] |
response_types
|
Assigned by the Trust Anchor metadata policy. | An empty array. A Client that uses no redirect-based grant has no response types, and the default of code in [RFC7591] would otherwise be implied. |
Section 2 of [RFC7591] |
The client identifier of a Client in BAS is its Entity Identifier. A Client MUST use its Entity Identifier as client_id at every Authorization Server it interacts with. This fulfils the requirement of Section 2.2.1 of [Ena.OAuth2] that a Client in a federative context uses the same client identifier for all registrations, and allows every Authorization Server to verify the Client's identity and organizational connection through its Trust Chain.¶
Within BAS, a Client authenticates using private_key_jwt as specified in Section 8.3.1 of [Ena.OAuth2], with keys published in its Resolved Metadata. This binds client authentication to the Client's Trust Chain: an Authorization Server verifies the authentication with a key it has obtained through the same chain that establishes the Client's identity. The other methods that [Ena.OAuth2] permits are not used in BAS, see Section 2 of [BAS.Security].¶
A Protected Resource is not required to be registered in BAS, see Section 8 of [BAS.Rules]. A Protected Resource that is registered in BAS MUST publish an Entity Configuration with oauth_resource metadata, see Section 2, and its Resolved Metadata MUST meet the requirements of this section and of Section 3. Within BAS, this replaces the optional publication of metadata in Section 4.3 of [Ena.OAuth2]. The oauth_resource metadata uses the parameters defined in Section 2 of [RFC9728], which Section 5.1.5 of [OpenID.Federation.Connect] makes available. The table below lists only the parameters for which BAS adds a requirement.¶
| Parameter | Requirement | Description | Defined in |
|---|---|---|---|
resource
|
REQUIRED | MUST be equal to the Protected Resource's Entity Identifier, see Section 6.1. | Section 2 of [RFC9728] and Section 4.3 of [Ena.OAuth2] |
authorization_servers
|
OPTIONAL | If present, MUST contain the Entity Identifier of at least one Authorization Server in BAS. It MAY also contain Authorization Servers outside BAS. Checked at registration, see Section 7.3. | Section 2 of [RFC9728] |
The resource identifier of a Protected Resource in BAS is its Entity Identifier. An Authorization Server uses it as the aud value of access tokens for the Protected Resource, see Section 6.1.1 of [Ena.OAuth2]. A Client and an Authorization Server can thereby resolve the intended audience of a token to a Trust Chain, and from it to the organization the Protected Resource is registered for.¶
The requirements of this specification are enforced through two mechanisms that differ in scope and in who controls them. The Trust Anchor metadata policy is federation-wide, identical for every Entity of a given Entity Type, and controlled by the Federation Operator. The values a Federation Registration Entity sets when it registers an Entity differ from one Entity to the next, and are controlled by the Federation Registration Operator that registered it.¶
A Trust Anchor issues Subordinate Statements only for its Immediate Subordinates, which within BAS are the Federation Registration Entities. A rule that is to reach every Leaf Entity therefore travels down the Trust Chain as a metadata policy, while a per-Entity value is set by the Leaf Entity's Immediate Superior. When metadata is resolved, the metadata Claim of the Subordinate Statement about the Leaf Entity is applied first, and the resolved metadata policy after that, see Section 6.1.4.2 of [OpenID.Federation].¶
The Trust Anchor metadata policy enforces the requirements of this specification and the choices of [BAS.Rules] and [BAS.Security] that can be expressed as policy. Conformance to [Ena.OAuth2] is the responsibility of each Entity and is checked at registration, see Section 7.3. The policy below is carried in the Subordinate Statements that the BAS Trust Anchor issues and uses the operators of Section 6.1.3.1 of [OpenID.Federation].¶
{
"metadata_policy": {
"oauth_client": {
"organization_name": { "essential": true },
"organization_identifier": { "essential": true },
"contacts": { "essential": true },
"token_endpoint_auth_method": {
"essential": true,
"one_of": ["private_key_jwt"]
},
"grant_types": {
"essential": true,
"subset_of": ["client_credentials"],
"superset_of": ["client_credentials"]
},
"response_types": { "value": [] }
},
"oauth_authorization_server": {
"organization_name": { "essential": true },
"organization_identifier": { "essential": true },
"contacts": { "essential": true },
"grant_types_supported": {
"essential": true,
"superset_of": ["client_credentials"]
},
"token_endpoint_auth_methods_supported": {
"essential": true,
"subset_of": ["private_key_jwt"],
"superset_of": ["private_key_jwt"]
},
"revocation_endpoint_auth_methods_supported": {
"subset_of": ["private_key_jwt"],
"superset_of": ["private_key_jwt"]
},
"introspection_endpoint_auth_methods_supported": {
"subset_of": ["private_key_jwt"],
"superset_of": ["private_key_jwt"]
},
"token_endpoint_auth_signing_alg_values_supported": {
"essential": true,
"superset_of": ["RS256", "ES256"],
"subset_of": ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512",
"PS256", "PS384", "PS512"]
}
},
"oauth_resource": {
"organization_name": { "essential": true },
"organization_identifier": { "essential": true },
"contacts": { "essential": true },
"resource": { "essential": true }
}
}
}
¶
The operators act as follows:¶
essential makes the parameter mandatory in the Resolved Metadata. An Entity whose Resolved Metadata lacks it fails policy resolution, and its Trust Chain is not valid.¶
one_of checks that a Client's token_endpoint_auth_method is private_key_jwt.¶
subset_of and superset_of with identical values require the value to be exactly that set, see Section 6.1.3.1.8 of [OpenID.Federation]. For a Client's grant_types, this means the Client uses client_credentials and nothing else. For an Authorization Server's client authentication methods, a method it supports outside BAS is removed from its Resolved Metadata, since Section 2 of [BAS.Security] prohibits other methods for Clients in BAS.¶
superset_of alone is a check that the value contains what BAS requires, and removes nothing. It is used for an Authorization Server's grant_types_supported, so that grant types it supports outside BAS remain visible to parties that agree to use them outside BAS. For token_endpoint_auth_signing_alg_values_supported it checks that RS256 and ES256 are declared, as Section 3.1 of [BAS.Security] requires, and subset_of removes algorithms that [BAS.Security] does not permit.¶
value assigns an empty response_types array to every Client, whatever the Client declares.¶
If BAS later admits further grant types, the Federation Operator updates the grant type values of the policy accordingly.¶
A Federation Registration Entity sets the parameters below in the metadata Claim of the Subordinate Statement it issues for an Entity, under the Entity's Entity Type, having applied the Registration Policies of Section 6 of [BAS.Rules]. The values replace any the Entity declares itself. Verified values are pinned: a change MUST be requested via the Federation Registration Operator, which checks it as at registration before the Subordinate Statement is updated, see Section 7.3 of [BAS.Rules].¶
| Parameter | Set when | Value |
|---|---|---|
organization_name
|
Always. Verified under verification of organisational affiliation. | The legal name of the organization, without a language tag. The #sv and #en values are set if the Federation Member has supplied them. |
organization_identifier
|
Always. Verified under verification of organisational affiliation. | The organization identifier of the Federation Member, in one of the formats of Section 3.1. |
| Parameters without language tag | Whenever the Entity supplies a #sv value. |
The Swedish value, see Section 2.1. |
The Federation Registration Entity also includes the registration_policy Claim defined in Section 2 of [OIDC.Sweden.RegPolicy] in the Subordinate Statement, listing the Registration Policy URI of every policy it has applied to the Entity. The Registration Policies are defined in Section 6 of [BAS.Rules]. Through the registration_policy constraint of Section 4.2 of [BAS.Rules], the Trust Anchor requires that the policy for verification of organisational affiliation has been applied to every Entity. A peer can therefore rely on organization_name and organization_identifier without checking them itself.¶
| Check | Registration policy URI |
|---|---|
| Verification of organisational affiliation |
https://id.ena-infrastructure.se/regpolicy/v1/orgconnection
|
| Verification of registration submitter | To be defined in a later version of [BAS.Rules], see its Section 6.2 |
The example below is non-normative. It shows the metadata and registration_policy Claims of a Subordinate Statement for a Client of the Swedish Agency for Digital Government (Digg), registered under the policy for verification of organisational affiliation. The issuer is illustrative.¶
{
"iss": "https://anslutning.example.se",
"sub": "https://client.digg.se",
"metadata": {
"oauth_client": {
"organization_name": "Myndigheten för digital förvaltning",
"organization_name#sv": "Myndigheten för digital förvaltning",
"organization_name#en": "The Swedish Agency for Digital Government",
"organization_identifier": "urn:glue:iso6523:0007:2021006883",
"client_name": "Ärendetjänst"
}
},
"registration_policy": [
"https://id.ena-infrastructure.se/regpolicy/v1/orgconnection"
]
}
¶
Some requirements cannot be expressed with the standard operators. They fall into two groups, with different consequences.¶
Identifier bindings. These carry the identity that BAS exists to make verifiable:¶
issuer is equal to its Entity Identifier (Section 5.1),¶
resource is equal to its Entity Identifier (Section 6.1), and¶
client_id is its Entity Identifier (Section 4.1).¶
A Federation Registration Entity MUST reject the registration of an Entity whose metadata does not meet the issuer binding or the resource binding above. A peer that finds either of them unmet MUST NOT use the Resolved Metadata. An Authorization Server MUST obtain a Client's metadata by resolving its client_id as an Entity Identifier through a Trust Chain to the BAS Trust Anchor.¶
Other requirements. These include conformance to [Ena.OAuth2], such as publishing either jwks or jwks_uri but not both, and using the HTTPS scheme for URLs. A Federation Registration Entity SHOULD reject the registration of an Entity whose metadata does not meet them. The requirements of [BAS.Security] are checked by the Federation Registration Operator at registration, see Section 9 of [BAS.Rules]. How a peer acts on a deviation is left to the peer.¶
Copyright (c) The Swedish Agency for Digital Government (Digg), 2026. All Rights Reserved.¶