What are AudienceRestrictionConditions in KentorAu

2019-07-27 04:28发布

问题:

Im working with Kentor Auth Services. Im getting an error when testing the SAML integration using Kentor Sample Idp

ID1035: The SAML Assertion did not contain any AudienceRestrictionConditions. To accept assertions without AudienceRestrictionConditions, set SecurityTokenHandlerConfiguration.AudienceRestriction.AudienceMode to AudienceUriMode.Never.

Can someone let me know why im getting this error. Also I'm seeing a field called Audience. I have left it as blank since im not sure what needs to be added there I have tried adding 'Never', but on checking the source it seems like it requires an Uri.

Can someone please let me know what needs to be given in this field?

回答1:

By default WIF/AuthServices checks the Audience restriction in the SAML response. To handle the error you need to do either of:

  • Put the EntityId of the SP in the Audience field.
  • Set spOptions.SystemIdentityModelIdentityConfiguration.AudienceRestriction.AudienceMode = AudienceUriMode.Never;.