I’m working with SAML authentication and I’m curious about the size restriction for the ID attribute in the AuthnRequest element. In my setup, the ID attribute seems to be quite long. Is there a specific size limit I should be aware of ?
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:AuthnRequest
xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="https://test.com/portal/samlsso" Destination="https://dev.com/app/sso/saml" ForceAuthn="false"
ID="_1d598e4f2e8cc7238f98979349c7d58e28a96e6c59637a2as60nk123487_85d5a88c24a15c5b5ed36cc400887683" IssueInstant="2024-03-29T11:15:17.058Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" ProviderName="portal" Version="2.0">
<saml2:Issuer
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">https://test.com/portal
</saml2:Issuer>
<saml2p:NameIDPolicy AllowCreate="true" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"/>
</saml2p:AuthnRequest>
I referred to this documention (section 1.3.4). It seems, it is talking about 160 bits of randomness and not about size restriction. Is my interpretation of this correct ?
Any insights to relevant specifications would be greatly appreciated. Thanks!
Rishika Chandra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.