Background
After the recent launch of a service in the Canadian Access Federation (CAF) federated feed, we identified that IdPs running AD FS were not respecting the existence of <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> in our SPs metadata, and were continuing to sign assertions using SHA-1. RHEL10 no longer supports the SHA-1 algorithm by default, and this was preventing users from logging in to our service.
Issue
The Get-ADFSTkSecureHashAlgorithm function of the ADFSToolkit was not correctly searching for a <alg:SigningMethod> elements in metadata, so all RPs imported to AD FS were being set or overwritten with SHA-1 as the configured SignatureAlgorithm.
Replication
- Create a sandbox AD FS environment.
- Create a new Federation Configuration using the CAF defaults
- Import an EntityId that has
<alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> present in the top-level <md:Extensions> section of the <EntityDescriptor>. I used https://cowil.uvic.ca as an example.
- Check the SignatureAlgorithm of the newly imported Relaying Party trust. The result is
> Get-AdfsRelyingPartyTrust -Identifier "https://cowil.uvic.ca" | Select Name,SignatureAlgorithm
Name SignatureAlgorithm
---- ------------------
CAF:cowil.uvic.ca http://www.w3.org/2000/09/xmldsig#rsa-sha1
- Manually change the SignatureAlgorithm by running
Set-AdfsRelyingPartyTrust -TargetIdentifier "https://cowil.uvic.ca" -SignatureAlgorithm "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256".
- Check the SignatureAlgorithm of the newly imported Relaying Party trust. The result is
> Get-AdfsRelyingPartyTrust -Identifier "https://cowil.uvic.ca" | Select Name,SignatureAlgorithm
Name SignatureAlgorithm
---- ------------------
CAF:cowil.uvic.ca http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
- Force a re-import of the same SP.
- Notice that the SignatureAlgorithm has regressed
> Get-AdfsRelyingPartyTrust -Identifier "https://cowil.uvic.ca" | Select Name,SignatureAlgorithm
Name SignatureAlgorithm
---- ------------------
CAF:cowil.uvic.ca http://www.w3.org/2000/09/xmldsig#rsa-sha1
Background
After the recent launch of a service in the Canadian Access Federation (CAF) federated feed, we identified that IdPs running AD FS were not respecting the existence of
<alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>in our SPs metadata, and were continuing to sign assertions using SHA-1. RHEL10 no longer supports the SHA-1 algorithm by default, and this was preventing users from logging in to our service.Issue
The
Get-ADFSTkSecureHashAlgorithmfunction of the ADFSToolkit was not correctly searching for a<alg:SigningMethod>elements in metadata, so all RPs imported to AD FS were being set or overwritten with SHA-1 as the configured SignatureAlgorithm.Replication
<alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>present in the top-level<md:Extensions>section of the<EntityDescriptor>. I usedhttps://cowil.uvic.caas an example.Set-AdfsRelyingPartyTrust -TargetIdentifier "https://cowil.uvic.ca" -SignatureAlgorithm "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256".