|
| 1 | +# Openid Federation |
| 2 | + |
| 3 | +The OPENID federation specification has officially been published by the OPENID connect Working group, the 31 may 2024. |
| 4 | + |
| 5 | +The objective of this new specification is to establish a trust relationship between the OPENID Server and the relying parties. |
| 6 | +Therefore the manual provisioning of the Relying Parties via a web portal or a dedicated REST.API will not be needed anymore. |
| 7 | +There are some advantages to use OPENID federation : |
| 8 | + |
| 9 | +* Less human administration. |
| 10 | +* Relying Parties can manage their properties such as the redirect_uri. |
| 11 | +* Easily establish a trust relationship between the OPENID server and the relying party. |
| 12 | + |
| 13 | +The OPENID federation is already required by other technologies such as the issuance of [Verifiable Credentials](https://openid.github.io/OpenID4VP/openid-4-verifiable-presentations-wg-draft.html#section-11.2). |
| 14 | +In this context, the OPENID federation is used to establish a trust relationship between an electronical wallet / verifier and a credential issuer. |
| 15 | +Suppose both applications adhere to a known trust scheme, for example `BSc chemistry degree`, the electronical wallet will be able to call its federation API to determine if the Credential Issuer is indeed a member of the federation/trust scheme that it says it is. |
| 16 | +For more information about the interactions between the electronical wallet and the credential issuer, you can refer to the [official documentation](https://openid.github.io/OpenID4VP/openid-4-verifiable-presentations-wg-draft.html). |
| 17 | + |
| 18 | +This specification takes all its concepts from the Public Key Infrastructure (PKI), but there are some differences between both : |
| 19 | +* The Public Key Infrastructure are using certificates, and the Certificate Authority are installed in the Trusted Root Certificate Authorities certificate store. It contains the root certificates of all CAs that Windows trusts. |
| 20 | +* The OPENID federation is using Entity Statement. Each entity involved in the trust chain has a REST.API which expose some operations describe in the [specification](https://openid.net/specs/openid-federation-1_0.html). |
| 21 | + |
| 22 | +Before going further, we are going to explain the Public Key Infrastructure. |
| 23 | + |
| 24 | +## Chain of trust in Public Key Infrastructure (PKI) |
| 25 | + |
| 26 | +The purpose of a PKI is to facilitate the secure electronic transfer of information for a range of network activities such as e-commerce, internet banking and confidential email. |
| 27 | + |
| 28 | +PKI uses cryptographic public keys that are connected to a digital certificate, which authenticates the device or user sending the digital communication. |
| 29 | +Digital certificates are issued by a trusted source, a certificate authority (CA), and act as a type of digital passport to ensure that the sender is who they say they are. |
| 30 | + |
| 31 | +The client who receive a Digital certificate, for example a browser who visit a secure website, the client validates if the issuer of this certificate exists in its list of trusted root certificates. If there is no match, the client tries to resolve the chain of trust by finding the trusted root certificate authority which has signed the issuing CA certificate. |
| 32 | + |
| 33 | +The chain of trust is an important concept because it proves that the certificate comes from a trusted source. The usage of certificate store is sufficient to resolve a chain of trust. |
| 34 | + |
| 35 | +There are three basic types of entities that comprise a valid chain of trust : |
| 36 | + |
| 37 | +* Root CA certificate : The Root CA certificate is a self-signed X.509 certificate. This certificate acts as a trust anchor, used by all the Relying Parties as the starting point for path validation. The Root CA private key is used to sign the Intermediate CA certificates. |
| 38 | + |
| 39 | +* Intermediate CA certificate : the intermediate CA certificate sits between the Root CA certificate and the end entity certificate. The intermediate CA certificate signs the end entity certificates. |
| 40 | + |
| 41 | +* End-Entity certificate : The end entity certificate is the server certificate that is issued to the website domain. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +This chain of trust is also present in the Openid federation specification. |
| 46 | + |
| 47 | +## Chain of trust in OPENID federation |
| 48 | + |
| 49 | +The chain of trust in the Openid federation is made of more than two Entity Statements. |
| 50 | + |
| 51 | +An entity statement is a signed Json Web Token (JWT). The subject of the JWT is the Entity itself. The issuer of the JWT is the party that issued the Entity Statement. |
| 52 | +All entities in a federation publish an Entity Statement about themselves called an Entity configuration. |
| 53 | + |
| 54 | +Entities whose statements build a trust chain are categorized as : |
| 55 | + |
| 56 | +* Trust anchor : An Entity that represents a trusted third party. |
| 57 | + |
| 58 | +* Leaf : In an Openid connect identify federation, a Relying Party or a protected resource. |
| 59 | + |
| 60 | +* Intermediate : Neither e leaf entity nor a trust anchor. |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +The resolution of the trust chain is more complex than the one present in the public key infrastructure. |
| 65 | + |
| 66 | +Considering the following entities : |
| 67 | +* Relying party : http://localhost:7001 |
| 68 | + |
| 69 | +* Trust anchor : http://localhost:7000 |
| 70 | + |
| 71 | +The algorithm used to fetch the trust chain is made of the following actions : |
| 72 | + |
| 73 | +1. Retrieve the entity configuration from the endpoint `http://localhost:7001/.well-known/openid-federation`. |
| 74 | + |
| 75 | +2. Store the Json Web Token into the trust chain. |
| 76 | + |
| 77 | +3. Parse the Json Web Token and retrieve the list of `authority_hints` from the payload. |
| 78 | + |
| 79 | +4. For each record in the `authority_hints`, execute the following actions : |
| 80 | + |
| 81 | + 4.1. Retrieve the entity configuration from the `authority_hint` (`<authority_hint>/.well-known/openid-federation`). |
| 82 | + |
| 83 | + 4.2. Parse the Json Web Token and extract the `federation_fetch_endpoint`. |
| 84 | + |
| 85 | + 4.3. Fetch the entity configuration of the relying party `http://localhost:7001` (`<authority_hint>/<federation_fetch_endpoint>?sub=http://localhost:7000`) and store the result into the trust chain. |
| 86 | + |
| 87 | +5. The last entity configuration coming from the `/.well-known/openid-federation` is the trust-anchor and must be stored into the trust chain. |
| 88 | + |
| 89 | +At the end, the trust-chain must contains three records. |
| 90 | + |
| 91 | +## Difference between PKI and OPENID federation |
| 92 | + |
| 93 | +The structure of the trust chain between both technologies is similar and is made of the same components. |
| 94 | +The difference resides in the terminology of the entity used and their nature. |
| 95 | +In PKI, an entity is a certificate, however in OPENID federation, an entity is represented as an Entity Statement. |
| 96 | + |
| 97 | +| PKI | Openid federation | |
| 98 | +| --------------------------- | ----------------- | |
| 99 | +| Root CA certificate | Trust anchor | |
| 100 | +| Intermediate CA certificate | Intermediate | |
| 101 | +| End-entity certificate | Leaf | |
| 102 | + |
| 103 | +The trust chain algorithm proposed by OPENID federation is more complex than the one used by PKI. |
| 104 | +In OPENID federation, a set of HTTP request are executed to retrieve a list of Entity Statements, but in PKI only the certificate store is used. |
| 105 | + |
| 106 | +Now you understand the differences between PKI and the OPENID federation, we are going to explain how a Relying Party can register itself against an OPENID Identity Server. |
| 107 | + |
| 108 | +## Client registration |
| 109 | + |
| 110 | +AUTOMATIC or EXPLICIT |
| 111 | + |
| 112 | +## Demo |
| 113 | + |
| 114 | +# Resources |
| 115 | + |
| 116 | +https://www.keyfactor.com/blog/certificate-chain-of-trust/ |
0 commit comments