Closed amitsharma2912 closed 5 years ago
@brentschmaltz ?
Doesn't appear to be valid xml. Here's a cool site you can use for SAML stuff: https://www.samltool.com/
@rasitha1 I have decrypted the above encrypted saml using the same website and it gives me a valid XML which I am able to even validate... so for sure the issue is not with token..
Looks like SamlSecurityTokenHandler.ValidateToken is expecting a plain text token(?). It doesn't seem to have any decryption support.
Maybe you have to override that and provide your own decryption? Looking at how JwtSecurityTokenHandler is implemented, CryptoProviderFactory might help... just a wild guess.
@blowdart @amitsharma2912 @rasitha1 we only support signed saml tokens in 5.3.0. @GeoK is working on allowing encrypted tokens.
As this is currently "by design", or really "we don't support this yet", I'm closing the issue.
Any idea when this functionality will be available ??? What else can i do to support this for now?? As this is the only functionality hindering our migration.
@amitsharma2912 https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/ is a better place for that question, that's where the implementation will happen.
IDX30011: Unable to read XML. Expecting XmlReader to be at ns.element: 'urn:oasis:names:tc:SAML:1.0:assertion.Assertion', found: 'http://www.w3.org/2001/04/xmlenc#.EncryptedData'.
at Microsoft.IdentityModel.Xml.XmlUtil.CheckReaderOnEntry(XmlReader reader, String element, String namespace) at Microsoft.IdentityModel.Tokens.Saml.SamlSerializer.ReadAssertion(XmlReader reader) at Microsoft.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler.ReadSamlToken(String token) at Microsoft.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) at Microsoft.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken) at AspNetCoreWsFederation.MyTokenValidator.ValidateToken(String securityToken, TokenValidationParameters validationParameters, SecurityToken& validatedToken) in C:\Users\asharma\Downloads\IdentityServer4.WsFederation-dev1\IdentityServer4.WsFederation-dev\src\AspNetCoreWsFederation\MyTokenValidator.cs:line 42 at Microsoft.AspNetCore.Authentication.WsFederation.WsFederationHandler.d__9.MoveNext()