Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

# Testmöte – prioriterade testfall

Testspecifikationer version 0.2.0 (draft), [`test-specifications/`](https://github.com/diggsweden/sib-context-org-access/tree/main/test-specifications/). Beskrivningarna är testfallens *Purpose*.

## 1. Metadata policy

**Varför:** Policyn är grunden. Ett fel här ger fel Resolved Metadata i hela federationen. TA-BAS-006 säkerställer att alla Clients kan autentisera hos alla AS (`private_key_jwt` och obligatoriska algoritmer).

| Testfall | Beskrivning |
| :--- | :--- |
| [TA-BAS-005](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#ta-bas-005) Verifying that the metadata policy matches the published BAS policy | Assert that the TA applies exactly the metadata policy that the federation has published, to all Entities resolved through it. |
| [TA-BAS-006](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#ta-bas-006) Verifying client authentication and algorithm constraints in the policy | Assert that the policy enforces the single client authentication method of BAS and the signature algorithms that every Entity validates, so that any Client can authenticate at any Authorization Server. |
| [TA-BAS-007](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#ta-bas-007) Verifying the values that the policy assigns | Assert that the only values the BAS policy assigns, rather than constrains, are values that follow from the BAS requirements, as the Swedish profile requires (see [TA-OS-035](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_oidf_sweden_test.md#ta-os-035)). |
| [TA-OS-034](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_oidf_sweden_test.md#ta-os-034) Verifying that the metadata policy is well-formed | Assert that the metadata policy can be resolved by any compliant implementation without producing a policy error. |

## 2. Organisationsidentitet

**Varför:** BAS kärnvärde: att det är känt vilken organisation som står bakom varje Entity. Ett fel här gör federationen meningslös.

| Testfall | Beskrivning |
| :--- | :--- |
| [FRE-BAS-003](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#fre-bas-003) Verifying organization parameters | Assert that the FRE assigns the verified name and identifier of the organization that owns the Entity, so that peers can see which organization an Entity is registered for. |

## 3. Låsta värden

**Varför:** Utan den kan en Entity skriva över sin egen verifierade organisationsidentitet. Ligger utanför dagens omfattning eftersom den kräver en ändring (TR8), men bör köras tidigt.

| Testfall | Beskrivning |
| :--- | :--- |
| [FRE-BAS-012](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#fre-bas-012) Changing a verified value in the Entity Configuration | Assert that an Entity cannot change a verified value by changing its own Entity Configuration. |

## 4. Identifierarbindningar

**Varför:** §7.3-bindningarna (`issuer`, `resource`, `client_id`) fångas inte av policyn. Här skyddar bara FRE:n och peern. RES-BAS-007 är negativ (TE17) och kräver FED-TI.

| Testfall | Beskrivning |
| :--- | :--- |
| [FRE-BAS-007](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#fre-bas-007) Verifying the Resolved Metadata of registered Entities | Assert that every Entity the FRE publishes meets the BAS requirements, so that the registration, seen as a black box, has admitted only Entities that meet them. |
| [RES-BAS-007](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_bas_test.md#res-bas-007) Entities that break requirements the policy cannot express | Find out how the resolver handles metadata that breaks BAS requirements that the policy cannot express. Peers MUST NOT use Resolved Metadata that breaks the `issuer` or `resource` binding. How a peer acts on other deviations is left to the peer. |

## 5. Resolved Metadata via resolvern

**Varför:** Det peers faktiskt använder: att organisationsidentiteten och policyfiltreringen når fram via resolvern.

| Testfall | Beskrivning |
| :--- | :--- |
| [RES-BAS-004](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_bas_test.md#res-bas-004) Organization parameters in Resolved Metadata | Assert that the resolver delivers the verified organization values that the Federation Registration Entity has set, which is the primary purpose of BAS metadata. |
| [RES-BAS-002](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_bas_test.md#res-bas-002) Resolved Metadata of an Authorization Server | Assert that the resolver applies the BAS policy to an Authorization Server, so that peers only see the client authentication method and algorithms that BAS permits, while grant types that the Authorization Server supports outside BAS remain visible. |
| [RES-BAS-003](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_bas_test.md#res-bas-003) Resolved Metadata of a Client | Assert that the resolver applies the BAS policy and the values set by the Federation Registration Entity to a Client. |

## 6. Policyn avvisar felaktiga Entities

**Varför:** Visar att policyn faktiskt avvisar felaktiga Entities (TE8a–f). Meningsfull först när policyn enforcas.

| Testfall | Beskrivning |
| :--- | :--- |
| [RES-BAS-005](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_bas_test.md#res-bas-005) Entities that fail the BAS policy | Assert that the resolver applies the `essential`, `superset_of` and `one_of` checks of the BAS policy, for Clients, Authorization Servers and Protected Resources (see [RES-OS-025](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_oidf_sweden_test.md#res-os-025)). |

## 7. Protokollnycklar

**Varför:** Propagering av protokollnycklar. Om de inte når fram i tid slutar autentiseringen fungera. Kräver väntan över en livscykel.

| Testfall | Beskrivning |
| :--- | :--- |
| [RES-BAS-008](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_bas_test.md#res-bas-008) Propagation of a new protocol key | Assert that a new protocol key reaches peers that use the resolver before the Entity starts to use it, under the key rollover rules of BAS. |

## 8. Tillåtna Entity Types

**Varför:** `allowed_entity_types`: att till exempel `openid_relying_party` (TE19) inte kommer in.

| Testfall | Beskrivning |
| :--- | :--- |
| [TA-BAS-008](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#ta-bas-008) Verifying the Entity Types admitted in BAS | Assert that the Trust Anchor only admits the Entity Types that BAS covers, and that its Immediate Subordinates are the Federation Registration Entities. |
| [RES-BAS-010](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_bas_test.md#res-bas-010) Entity Type not admitted in BAS | Assert that the resolver applies the `allowed_entity_types` constraint that the Trust Anchor sets, so that peers do not see metadata of Entity Types that BAS does not admit. |

## 9. Språk och FRE-värden

**Varför:** Språkregeln och att FRE:n bara sätter tillåtna värden. Påverkar interoperabiliteten, men inte säkerheten.

| Testfall | Beskrivning |
| :--- | :--- |
| [FRE-BAS-004](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#fre-bas-004) Verifying language-tagged values | Assert that the Federation Registration Entity assigns a value without a language tag, holding the Swedish value, for human-readable parameters, so that implementations without language tag support can use them. |
| [FRE-BAS-005](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#fre-bas-005) Verifying that the FRE sets no other values | Assert that the Federation Registration Entity only sets the values that \[[BAS.Metadata](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#bas-metadata)\] assigns to it, since all other assigned or constrained values are controlled by the Federation Operator through the Trust Anchor. |

## 10. Nycklar och TLS

**Varför:** Nycklar och TLS. Viktiga baskrav, men generiska och inte BAS-specifika.

| Testfall | Beskrivning |
| :--- | :--- |
| [TA-BAS-001](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#ta-bas-001) Verifying the federation keys against the BAS rules | Assert that the Trust Anchor's Federation Entity Keys meet the requirements that apply to them in BAS. \[[BAS.Security](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#bas-security)\] does not apply to Federation Entity Keys. For them, Section 9 of \[[BAS.Rules](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#bas-rules)\] makes Section 6 of \[[OIDC.Sweden.Federation](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#oidc-sweden-federation)\] apply. |
| [TA-BAS-002](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/ta_bas_test.md#ta-bas-002) TLS configuration | Assert that all TA endpoints are protected by TLS according to the federation's security requirements. |
| [FRE-BAS-001](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#fre-bas-001) Verifying the federation keys against the BAS rules | Assert that the FRE's Federation Entity Keys meet the requirements that apply to them in BAS. \[[BAS.Security](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#bas-security)\] does not apply to Federation Entity Keys. For them, Section 9 of \[[BAS.Rules](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#bas-rules)\] makes Section 6 of \[[OIDC.Sweden.Federation](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#oidc-sweden-federation)\] apply. |
| [FRE-BAS-002](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/fre_bas_test.md#fre-bas-002) TLS configuration | Assert that all FRE endpoints, and any hosted Entity Configurations, are protected by TLS according to the federation's security requirements. |
| [RES-BAS-001](https://github.com/diggsweden/sib-context-org-access/blob/main/test-specifications/resolver_bas_test.md#res-bas-001) TLS configuration | Assert that the resolve endpoint is protected by TLS according to the federation's security requirements. |