bas_federation_rules October 2026
Norlander Informational [Page]
Published:
Author:
H. Norlander
The Swedish Agency for Digital Government (Digg)

BAS – Federation Rules and Policies 1.0 – draft 01

Abstract

This document states the rules and policies of the BAS federation, which is built upon OpenID Federation 1.1 and profiled by the Swedish OpenID Federation Deployment and Interoperability Profile.

Registration Number

<YYYY-nnnn>

▲

Table of Contents

1. Introduction

BAS (Swedish: Federationskontext BAS) is a federation context for machine-to-machine access within, and towards, the Swedish public sector. It is built upon [OpenID.Federation] and [OpenID.Federation.Connect], profiled by [OIDC.Sweden.Federation]. Its Entities are OAuth 2.0 Clients, Authorization Servers and Protected Resources following [Ena.OAuth2].

This document is the Federation Rules of BAS required by Section 2.1 of [OIDC.Sweden.Federation]. It is the entry document for the federation. It states what a participant has to comply with, and refers to the other BAS documents for the details. A participant that follows these rules thereby follows the documents they refer to:

Section 2, Federation Setup, covers the Federation Operator, the Federation Registration Operators, Collaboration Contexts and the federation endpoints, and Section 3, Entity Statements, covers the validity of Entity Statements. Section 4, Trust Chains, covers how Trust Chains are resolved, the constraints set by the Trust Anchor, and how long a Client Registration may remain valid. The Registration Policies applied when an Entity is registered are given in Section 6, Registration Policies, and how an Entity joins BAS is described in Section 7, Joining the Federation. Section 8, OAuth 2.0 Compliance, covers the requirements that OAuth 2.0 Clients, Authorization Servers and Protected Resources comply with, and Section 9, Security Requirements, covers the security requirements.

1.1. Requirements Notation and Conventions

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.

1.2. Terminology

Terms are used as defined in [OpenID.Federation], [OIDC.Sweden.Federation] and [Ena.OAuth2]. In addition, this document defines the following terms:

  • Federation Operator (federationsoperatör) - Operates the BAS Trust Anchor; Digg.
  • Federation Registration Operator (anslutningsoperatör) - Registers the Entities of Federation Members in BAS.
  • Federation Registration Entity (anslutningstjänst) - As defined in [OIDC.Sweden.Federation]; in BAS operated by a Federation Registration Operator.
  • Federation Member (federationsmedlem) - An organization connected to BAS, on whose behalf Entities are registered.
  • Collaboration Context (samverkanskontext) - A context in which a set of parties agree on the information exchange between their Entities, such as scopes and access decisions, see Section 2.3, Collaboration Contexts.

2. Federation Setup

2.1. The Federation Operator

The Swedish Agency for Digital Government (Digg) is the Federation Operator of BAS. Digg operates the Trust Anchor and maintains its metadata policy, see [BAS.Metadata]. The Federation Registration Entities are operated by Federation Registration Operators, not by the Federation Operator, see Section 2.2, Federation Registration Operators.

The base URL of BAS is https://fed.ena-infrastructure.se. Identifiers that the Federation Operator defines are formed under this URL. This is the base URL that Section 2.1 of [OIDC.Sweden.Federation] requires the Federation Rules to define. The Registration Policy URIs defined by [SIB.Registration] are an exception: they are shared across Ena and are formed under https://id.ena-infrastructure.se, see Section 6, Registration Policies.

The Entity Identifiers, endpoints and Federation Entity Keys of the Trust Anchor for each environment are published in [BAS.Structure].

2.2. Federation Registration Operators

Apart from the Trust Anchor, the Entities that provide federation services in BAS are operated by Federation Registration Operators. A Federation Registration Operator is connected to BAS under [SIB.Connection] and operates a Federation Registration Entity, through which it registers the Entities of Federation Members under [SIB.Registration]. The Federation Registration Entities of BAS are listed in [BAS.Structure].

2.3. Collaboration Contexts

Parties that exchange information within BAS may agree on the terms of the exchange in a Collaboration Context. A Collaboration Context MAY restrict further what BAS permits, in this document and in the documents it refers to, such as [BAS.Metadata] and [BAS.Security].

2.4. Federation Endpoints

The federation endpoints of the Trust Anchor and the Federation Registration Entities do not require client authentication, see Section 8.8 of [OpenID.Federation]. The endpoints of each environment are listed in [BAS.Structure].

3. Entity Statements

3.1. Validity

It is RECOMMENDED that an Entity set the validity of its Entity Configuration, as given by the exp Claim, to 7 days. An Entity that knows that a change to its metadata is about to happen MAY set a shorter validity.

New Entity Configurations SHOULD be published according to the recommendation in Section 2.4.1 of [OIDC.Sweden.Federation], that is, when half the lifetime of the current one has elapsed.

The Entity Configuration of the Trust Anchor, and the Subordinate Statements issued by the Trust Anchor and the Federation Registration Entities, have a validity of 7 days.

3.2. Hosted Entity Configurations

Hosted Entity Configurations will be defined in a later version of this document.

4. Trust Chains

4.1. Resolving Trust Chains

The BAS Trust Anchor provides a resolve endpoint, see Section 8.3 of [OpenID.Federation]. The endpoint of each environment is listed in [BAS.Structure]. Since the resolver is the Trust Anchor itself, an Entity that uses it does not need to configure trust in any other Entity than the Trust Anchor.

It is RECOMMENDED that Entities use the Trust Anchor's resolver to obtain the Resolved Metadata and Trust Marks of peer Entities, in line with Section 2.3 of [OIDC.Sweden.Federation]. An Entity that does so does not build or validate Trust Chains itself.

4.2. Constraints

Constraints are applied when Trust Chains are resolved and validated.

The BAS Trust Anchor sets two constraints in the Subordinate Statement it issues for each Federation Registration Entity: allowed_entity_types, see Section 6.2.3 of [OpenID.Federation], and registration_policy, see Section 3 of [OIDC.Sweden.RegPolicy].

The allowed_entity_types constraint holds oauth_client, oauth_authorization_server and oauth_resource. Entity Types not listed in the constraint are removed from the subject's metadata during Trust Chain resolution. The Entity Type federation_entity is always allowed and is not listed, see Section 6.2.3 of [OpenID.Federation].

The registration_policy constraint requires that the Registration Policies of Section 6, Registration Policies have been applied to every Entity registered by a Federation Registration Entity. A constraint rule is satisfied if at least one of the policies it lists appears in the registration_policy Claim of the Subordinate Statement, so the constraint holds one rule for each policy. A peer can therefore rely on what the policies check without checking it itself.

The example below is non-normative.

{
  "iss": "https://ta.example.se",
  "sub": "https://fre.example.se",
  ...
  "constraints": {
    "allowed_entity_types": [
      "oauth_client",
      "oauth_authorization_server",
      "oauth_resource"
    ],
    "registration_policy": [
      {
        "entity_types": [
          "oauth_client",
          "oauth_authorization_server",
          "oauth_resource"
        ],
        "policy": [
          "https://id.ena-infrastructure.se/regpolicy/v1/orgconnection"
        ]
      }
    ]
  }
}
Figure 1: Example of the constraints Claim of the Subordinate Statement issued by the BAS Trust Anchor for a Federation Registration Entity.

4.3. Validity of Client Registrations

A Client Registration, meaning the incorporation of a Client into the service configuration of an Authorization Server based on the Client's Resolved Metadata, MUST NOT remain valid longer than the Trust Chain of the Client from which it was made. An Authorization Server that can no longer obtain a valid Trust Chain for a Client MUST stop issuing access tokens to it.

With the validity periods of Section 3.1, Validity, an Entity removed from BAS can remain accepted for at most the remaining validity of the Trust Chain last resolved for it.

5. Trust Marks

Trust Marks will be defined in a later version of this document.

6. Registration Policies

A Registration Policy describes a policy under which an Entity was registered in the federation. The Registration Policies that were applied are listed in the registration_policy Claim of the Subordinate Statement issued for the Entity, see Section 2 of [OIDC.Sweden.RegPolicy]. BAS applies the Registration Policies of [SIB.Registration] below.

6.1. Verification of Organisational Affiliation

Identifier: https://id.ena-infrastructure.se/regpolicy/v1/orgconnection

When this policy has been applied, the Federation Registration Entity asserts that:

  • the Entity belongs to a Federation Member connected under [SIB.Connection],
  • organization_name is the name of that Federation Member, see [BAS.Metadata], and
  • organization_identifier holds the organization identifier of that Federation Member, in one of the formats of Section 3.1 of [BAS.Metadata].

The verification is performed as defined in [SIB.Registration]. These values are set in the Subordinate Statement issued for the Entity, and cannot be changed without the involvement of the Federation Registration Operator.

With the registration_policy constraint the Trust Anchor requires that every Entity has been registered under this policy. A peer can then rely on the organization information of an Entity without checking it itself.

6.2. Verification of Registration Submitter

Verification of Registration Submitter will be defined in a later version of this document.

7. Joining the Federation

7.1. Joining as a Federation Registration Operator

An organization joins BAS as a Federation Registration Operator by being connected in that role under [SIB.Connection]. The Federation Operator then registers its Federation Registration Entity by issuing a Subordinate Statement for it from the Trust Anchor, with the constraints of Section 4.2, Constraints. The Federation Registration Entity is listed in [BAS.Structure].

7.2. Joining as a Federation Member

Each organization in the federation has one or more administrators, who are appointed when the organization signs the relevant SIB agreement. How this is done is described in other documentation. The administrators register the organization's Entities via a Federation Registration Operator, see Section 2.2, Federation Registration Operators.

7.3. Updating a Registration

Metadata values that are checked during registration are pinned in the Subordinate Statement that the Federation Registration Entity issues for the Entity. These values are listed in [BAS.Metadata]. Since a pinned value overrides the value in the Entity Configuration, a change to such a value MUST be requested via the Federation Registration Operator, where it is checked in the same way as during registration before the Subordinate Statement is updated.

A change of the Federation Entity Keys of the Entity MUST also be requested via the Federation Registration Operator. An Entity Configuration is signed with a key from the jwks Claim of the Subordinate Statement issued for the Entity, see Section 4 of [OpenID.Federation], so a new key can only be used after the Federation Registration Entity has issued a Subordinate Statement that contains it.

Other changes, such as changes to its protocol keys, are made by the Entity itself, by publishing an updated Entity Configuration.

8. OAuth 2.0 Compliance

OAuth 2.0 Clients, Authorization Servers and Protected Resources MUST comply with the Ena OAuth 2.0 Interoperability Profile [Ena.OAuth2].

A Protected Resource is not required to be registered in BAS. The metadata of OAuth 2.0 Clients and Authorization Servers, and of Protected Resources registered in BAS, MUST meet the requirements of [BAS.Metadata].

[BAS.Metadata] profiles only the metadata that the federation needs. Protocol metadata follows [Ena.OAuth2]. The information exchange between Entities, such as scopes and access decisions, is out of scope, and is decided by the parties to the exchange or by a Collaboration Context, see Section 2.3, Collaboration Contexts.

9. Security Requirements

Participants in BAS MUST comply with the security requirements of [BAS.Security]. They apply to the keys and signatures of the OAuth 2.0 protocol as profiled by [Ena.OAuth2]. For Federation Entity Keys and the signing of Entity Statements, Section 6 of [OIDC.Sweden.Federation] applies.

The Federation Registration Operator checks that the security requirements are met when an Entity is registered.

10. Normative References

[BAS.Metadata]
Norlander, H., "BAS Federation Metadata Requirements 1.0 – draft 01", .
[BAS.Security]
Norlander, H., "BAS: Federation Security Requirements 1.0 – draft 01", .
[BAS.Structure]
Norlander, H., "BAS: OpenID Federation Structure 1.0 – draft 01", .
[Ena.OAuth2]
Lindström, M., "Ena OAuth 2.0 Interoperability Profile 1.0 – draft 01", , <https://ena-infrastructure.github.io/specifications/ena-oauth2-profile.html>.
[OIDC.Sweden.Federation]
Lindström, M. and S. Santesson, "Swedish OpenID Federation Deployment and Interoperability Profile 1.0", , <https://www.oidc.se/specifications/swedish-openid-federation-profile.html>.
[OIDC.Sweden.RegPolicy]
Lindström, M. and S. Santesson, "OpenID Federation Registration Policy 1.0 – draft 01", , <https://www.oidc.se/openid-federation-registration-policy/main.html>.
[OpenID.Federation]
Hedberg, R., Jones, M. B., Ed., De Marco, G., Solberg, A. Å., Bradley, J., and V. Dzhuvinov, "OpenID Federation 1.1", , <https://openid.net/specs/openid-federation-1_1.html>.
[OpenID.Federation.Connect]
Hedberg, R., Jones, M. B., Ed., De Marco, G., Solberg, A. Å., Bradley, J., and V. Dzhuvinov, "OpenID Federation for OpenID Connect 1.1", , <https://openid.net/specs/openid-federation-connect-1_1.html>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[SIB.Connection]
The Swedish Agency for Digital Government (Digg), "Anslutning – Tillämpningskrav och vägledning, version 12", .
[SIB.Registration]
The Swedish Agency for Digital Government (Digg), "Registrering – Tillämpningskrav och vägledning, version 13", .

Appendix A. Notices

Copyright (c) The Swedish Agency for Digital Government (Digg), 2026. All Rights Reserved.

Appendix B. Document History

1.0 - draft 01
Initial version.

Author's Address

Henric Norlander
The Swedish Agency for Digital Government (Digg)