-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Currently, the institution.yaml (definition of accepted endpoints) is generated manually, based upon the Federation Metadata url. The certificate in this configuration expires. This does not cause an issue, because the certificate validity date is not validated.
However, the expiration of the certificate does cause institutions to generate and apply a new certificate, and this causes authentications to fail, because then the validation of XML signature on the SAML assertion / response will fail.
To solve this, we want to load and cache the information from the Federation Metadata url. There are two places where metadata refresh can be triggered
- Before sending an AuthnRequest - we need tot sso_location and entity_id to send and AuthnRequest to the Azure IdP.
- We also need to use an unusual "just-in-time" trigger for refreshing the metadata of an entity – we refresh the metadata when we receive a SAML Response that was signed with a different certificate than that we have in our cache for the entity / institution. See Automate AzureMFA metadata retrieval and update #194 (comment) for why.
-
Add global config parameters for
federation_metadata_cache_location -
Be backwards compatible. If no
metadata_urlis configured for an entry ininstitution.yml, use the current behaviour -
If :
- a SAML Response is received, AND
metadata_urlis present for an entry ininstitutions.yml, AND- no cache entry is present when sending the AutnRequest OR the certificate in the Signature in the SAML Response does not match one of the certificates from the cache then:
- fetch the new metadata for the institution from the
metadata_url - cache the information from the metadata (entityid, ssolocation, certificate) in a configurable file path.
- use a separate cache file for each key in
institutions.yml, using the key in the filename of the cash file.
- fetch the new metadata for the institution from the
-
An entry in institution.yml must at least hold:
- identifier
- email_domains
- and either
- metadata_location
- or
- entity_id
- sso_location
- certificates
-
log:
- metadata cache-misses
- signature validation failures
- refreshing of metadata (start, success, failure),
- the certificate that triggered a cache refresh.
- on cache write all the info that was written to the cache:
- certificates
- entity_id
- sso_location
Metadata
Metadata
Assignees
Type
Projects
Status