SSO acceptance
Inbound rules for typed Web Browser SSO: service-provider finish_sso and
accept_unsolicited_sso, and identity-provider receive_sso.
SpValidationPolicy::recommended includes the service-provider rows below. It
also includes the Single Logout accept combination and leaves AuthnRequest
signing and identifier creation off. Those last three are not part of this
accept combination; they are recorded with logout and generation.
IdpValidationPolicy::recommended includes the identity-provider rows below
and the same logout accept combination. Default, new, try_new, and
the config builders are Recommended. Recommended does not select the
RSA-SHA2 XML-DSig profile. compatibility() is available by name. The
preset distinction is recorded in
validation presets.
Normative text is SAML Core 2.0, Profiles 2.0, and Bindings 2.0, as corrected by Approved Errata 05. HTTP-POST-SimpleSign is the supported CD04 binding. Schema citations are the OASIS assertion and protocol schemas.
Outbound AuthnRequest signing, identifier creation, and logout are not part of the service-provider accept combination. Single Logout acceptance is classified in single-logout.md. Replay and metadata trust stay caller arguments, classified in metadata-and-replay.md. A response resolved from an HTTP-Artifact follows the HTTP-POST rows below, with the differences in web-browser-sso-artifact.md.
Service provider
finish_sso and accept_unsolicited_sso read SpValidationPolicy. Callers
select the accept combination by setting the fields below.
| Rule | Actor | Direction | Level |
|---|---|---|---|
Expose each accepted AuthnStatement’s context and locality |
Accepting service provider | Inbound finish_sso, accept_unsolicited_sso, and finish_paos_sso |
Optional data exposure. Core §§2.7.2, 2.7.2.1, and 2.7.2.2; assertion schema AuthnContextType and SubjectLocalityType. Each AuthnSession keeps the class and declaration references, by-value declaration presence, authenticating authorities in document order, and optional Address and DNSName with that statement’s session values. Data comes from the same selected, verified assertion, including after decryption. References retain AuthnContextReference’s received-value behavior; URI whitespace is collapsed. The library exposes this information without judging whether it meets the requested context. No new receiver rejection or assurance policy is added |
| Do not require a signature directly on the Assertion | Accepting service provider | Inbound | Library hardening, off. AssertionSignaturePolicy::AllowUnsignedForCompatibility. RequireSigned is the hardening |
Require a Response signature when an EncryptedAssertion uses CBC |
Accepting service provider | Inbound | Recommendation, on. ResponseSignaturePolicy::RequireForEncryptedCbc. Relax it with AllowUnsignedEncryptedCbc. RequireSigned on every response is separate library hardening |
Decrypt an <EncryptedAssertion> |
Accepting service provider | Inbound | Mandatory. Conformance §3.4 and Core §2.3.4. Decrypted with the service provider’s decryption_key whatever XmlEncryptionPolicy selects. encrypt_assertions also rejects a plaintext <Assertion>; that is library policy. Each <EncryptedAssertion> of a response is decrypted, and each decrypted <Assertion> is evaluated as a plaintext one is. One that does not decrypt, for example one encrypted for another recipient, rejects the response with Crypto, as OpenSAML’s DecryptAssertions does by default; that rejection is library policy. A response may mix <Assertion> and <EncryptedAssertion> children (Core §3.3.3); when its signature covers the Response, the whole Response is decrypted, and its plaintext and decrypted assertions are evaluated alike. A mixed response whose signatures cover only its plaintext assertions is rejected with Crypto; that rejection is library policy. Under RequireSigned, each <Assertion>, plaintext or decrypted, must carry its own signature. Without a decryption_key the response has no assertion to accept |
Decrypt an <EncryptedID> in the assertion <Subject> |
Accepting service provider | Inbound | Mandatory. Conformance §3.4 and Core §2.2.4. Decrypted with the decryption_key whatever XmlEncryptionPolicy selects, as receive_slo does. The builder requires the key once encrypt_ids is selected. Without a decryption_key the assertion has no <NameID>, and the response is rejected |
Decrypt an <EncryptedAttribute> in an <AttributeStatement> |
Accepting service provider | Inbound | Mandatory. Conformance §3.4 and Core §2.7.3.2. Decrypted with the decryption_key whatever XmlEncryptionPolicy selects. One that does not decrypt, for example one encrypted for another recipient, rejects the response with Crypto, as OpenSAML’s DecryptAttributes does by default. Without a decryption_key, an <EncryptedAttribute> is not decoded and is not an attribute of the session |
Find the <xenc:EncryptedKey> of an <EncryptedAssertion>, <EncryptedID>, or <EncryptedAttribute> |
Accepting service provider | Inbound | Core §6.2 as replaced by Errata 05 E43: an included key SHOULD be embedded in EncryptedData or referenced from it with a ds:RetrievalMethod of type EncryptedKey. Both are resolved. A key beside EncryptedData with no reference, which E43 lets an implementation associate by position, is not resolved, and neither is the multicast ds:KeyName to xenc:CarriedKeyName reference. Both fail with Crypto |
An <EncryptedAssertion> holds one <xenc:EncryptedData> followed only by <xenc:EncryptedKey>, and its plaintext is one <Assertion> |
Accepting service provider | Inbound | Mandatory for the children: the EncryptedElementType schema of Core §2.3.4. Library policy for the plaintext: Core §2.3.4 requires that content of the producer. Either failure returns ProtocolProfile |
| Verify the signature, then decrypt | Accepting service provider | Inbound | Recommendation, on, with no relaxation. Errata 05 E93 replaces Core §6.2: when CBC is used, a relying party SHOULD require integrity protection before it processes assertions that contain encrypted data. Typed acceptance always verifies a signature over the assertion or the response first, for every data-encryption algorithm. Without a covered Response, a response with several assertions is rejected with Unsupported and nothing is decrypted |
Reject a plaintext <NameID> or <Attribute> once its encrypted form is selected |
Accepting service provider | Inbound | Library policy, the same rule a service provider applies to a plaintext <Assertion> under encrypt_assertions. No OASIS receiver rule requires it. SamlError::EncryptionRequired names the element. There is no relaxation; leave the capability unselected to accept both forms |
The plaintext is one <NameID> or one <Attribute> in the assertion namespace |
Accepting service provider | Inbound | Library policy. Core §2.2.4 and §2.7.3.2 require that content of the producer. The decrypted element is placed in the same location and the response is validated again against the protocol profile. An <EncryptedID> that carries a <BaseID> or an <Assertion>, which Core allows, returns Unsupported. Any other content returns ProtocolProfile |
| Do not require the RSA-SHA2 XML signature profile | Accepting service provider | Inbound | Library hardening, off. Conformance §4.1 requires RSAwithSHA1, and Core §5.4.4 does not require a verifier to reject other transforms |
| Do not verify with MD5, RIPEMD-160, or an RSA key shorter than 2048 bits | Accepting service provider | Inbound | Library policy, on. XmlSignatureProfile::ExcludeWeakAlgorithms. AllowProviderSupportedForCompatibility relaxes it. See weak algorithms and keys |
Evaluate an <AudienceRestriction> that is present |
Accepting service provider | Inbound | Mandatory when the element is present. AudienceValidationPolicy::EvaluatePresentRestrictions. Validate also rejects a missing restriction. That extra rejection is library hardening. Recommended uses EvaluatePresentRestrictions |
Several <AudienceRestriction> elements are all required, and audiences inside one restriction are alternatives |
Accepting service provider | Inbound | Mandatory when the elements are present. Core §2.5.1.4, Approved Errata 05 E46. No off switch beyond the audience policy above |
Reject a <Conditions> child that is not understood |
Accepting service provider | Inbound | Mandatory. Core §2.5.1.1. Indeterminate is rejected. No off switch |
<OneTimeUse> does not affect validity and the assertion is not retained |
Accepting service provider | Inbound | Mandatory when the element is present. Core §2.5.1.5. Always Valid. The typed session is not kept for a later exchange |
<ProxyRestriction> does not affect validity |
Accepting service provider | Inbound | Mandatory when the element is present. Core §2.5.1.6. Always Valid. This service provider does not issue a later assertion |
| Evaluate every bearer assertion, and every assertion shares one issuer and one principal | Accepting service provider | Inbound | Mandatory. Approved Errata 05 E26, Profiles §§4.1.4.2 and 4.1.4.3. One successful bearer confirmation confirms that assertion. Each assertion with a bearer SubjectConfirmation, including one decrypted from an <EncryptedAssertion>, takes the bearer, audience, Conditions time window, and SessionNotOnOrAfter checks. Profiles §4.1.4.2 / E26 lets an assertion without a bearer confirmation be included and leaves its processing outside the profile. Such an assertion still takes the issuer and principal rule of this row, the Conditions child row, and the signature rows; its audience, time window, SessionNotOnOrAfter, and confirmations are not evaluated. Rejecting the whole response over such an assertion is library policy. The assertion fields of SsoSession come from the first bearer assertion in document order. Every other assertion stays only in raw_flow().saml_content, and a caller that relies on one evaluates it. A later bearer assertion passed the same checks; its statements, attributes, and SessionNotOnOrAfter are not in SsoSession. The principal is NameID value, Format, NameQualifier, and SPNameQualifier. An omitted Format is urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified (Core §2.2.2). Replay storage keeps every direct assertion identifier until that assertion’s latest bearer NotOnOrAfter that parses as an instant, or, without one, as long as the session assertion |
A present Response Issuer is the identity provider |
Accepting service provider | Inbound finish_sso and accept_unsolicited_sso |
Library policy, whatever the response status. Profiles §4.1.4.2, as replaced by Approved Errata 05 E17, has the identity provider put its own unique identifier in a present Response <Issuer>; no rule there or in Core §3.2.2 has the service provider reject another value. A present Issuer other than the identity provider’s entity ID, or more than one Issuer (which the protocol schema forbids), returns IssuerMismatch. The looser rule is not applied because the session would otherwise be accepted while raw_flow().saml_content carries a Response Issuer that was never compared. E17 also has the identity provider include Issuer when the response is signed or an assertion is encrypted; that rule obligates the identity provider only, and Core §3.2.2 makes Issuer optional on a response, so a response without one is accepted. The assertion Issuer is compared by the issuer and principal row |
| An unsigned sibling assertion is not a second signed assertion | Accepting service provider | Inbound | Mandatory. Errata 05 E26, Profiles §4.1.4.5. Several assertions are accepted only when the response is signed or every assertion is directly signed |
UTC IssueInstant on the Response and the Assertion |
Accepting service provider | Inbound | Mandatory. No off switch. Core §1.3.3 forbids a producer from generating a leap second and does not require the receiver to reject one |
| HTTP POST protects each assertion with a signature on the Assertion or the Response | Accepting service provider | Inbound | Mandatory. Errata 05 E26, Profiles §4.1.4.5 |
Verify any signature present on the Response or its assertions |
Accepting service provider | Inbound | Mandatory. Profiles §4.1.4.3, kept by Errata 05 E26. Under XmlSignatureProfile::ExcludeWeakAlgorithms, the value Recommended uses, and StrictRsaSha2, a Signature child of the Response, of one of its <Assertion> children, or of a decrypted <Assertion> that does not verify returns SamlError::SignatureVerification with XmlSignature, even when another signature authenticates the response, and under AssertionSignaturePolicy::RequireSigned as well. A Response signature that verifies only after its assertions are decrypted does not verify on the delivered message and is rejected the same way. HTTP-Redirect and HTTP-POST-SimpleSign verify these embedded signatures as well as the detached one; those checks do not require the embedded signatures to cover the assertion. AllowProviderSupportedForCompatibility, which Compatibility and the raw API use, keeps the samlify-port behaviour: only the first signature of the message must verify, and the detached bindings verify only the detached signature unless the Assertion must be signed |
Bearer Recipient, NotOnOrAfter, and InResponseTo |
Accepting service provider | Inbound | Mandatory. Errata 05 E26, Profiles §4.1.4.3. An unsolicited response must not carry InResponseTo |
An unsolicited response carries no InResponseTo, empty or not |
Accepting service provider | Inbound accept_unsolicited_sso |
Mandatory for bearer SubjectConfirmationData: Errata 05 E26, Profiles §4.1.4.3 has the service provider verify that the attribute is not present, and an empty attribute is present. Library policy for the Response: Profiles §4.1.4.3 names only the bearer confirmation, and Core §3.2.2 and Profiles §4.1.5 forbid the identity provider from writing the attribute. Rejecting it on the Response keeps one rule for both elements. The protocol and assertion schemas type InResponseTo as NCName, so an empty value is not valid either way. Either returns SamlError::InResponseToMismatch with an empty actual. OpenSAML reads an empty value as absent. The raw parse_unsolicited_login_response still does, for samlify-port compatibility |
A present bearer NotBefore opens the confirmation window |
Accepting service provider | Inbound | Mandatory when the attribute is present. Core §2.4.1.2: the subject cannot be confirmed before NotBefore. A bearer confirmation whose NotBefore has not been reached, after the skew below, is not satisfied. A value that is not an xs:dateTime is invalid under the assertion schema; a schema-valid value the timestamp parser cannot read (no time zone, a year above 9999) is also not satisfied, as for bearer NotOnOrAfter, as library policy. A namespace-qualified NotBefore on SubjectConfirmationData returns SamlError::ProtocolProfile, as library policy, so it cannot be read as the SAML attribute. Errata 05 E26 forbids the identity provider from writing NotBefore on a Web Browser SSO bearer confirmation (Profiles §4.1.4.2). That producer rule does not reject a NotBefore the window has reached |
Allow five minutes of clock skew on NotBefore and NotOnOrAfter |
Relying party | Inbound | Recommendation. Approved Errata 05 E92 adds Core §1.3.3 guidance to Conditions and to SubjectConfirmationData. A new SamlValidationContext uses five minutes, the top of the three-to-five-minute range. NotBefore is accepted that early. NotOnOrAfter stays exclusive after that allowance. Library policy for an instant the runtime cannot represent: a NotOnOrAfter that the skew moves past the latest supported instant (the end of year 9999) stays open, and a NotBefore that the skew cannot shift inside that range is rejected. An AuthnStatement@SessionNotOnOrAfter or replay deadline that cannot be represented still fails with TimeWindowInvalid. The same NotOnOrAfter drift also widens AuthnStatement@SessionNotOnOrAfter. That session check is existing library policy, not an E92 insertion for the attribute. ClockSkew::strict is zero. An explicit skew replaces the five minutes. This is not a validation-preset field |
| Apply a caller-supplied outstanding logout to a later assertion for the same principal and session | Accepting service provider | Inbound finish_sso_with_outstanding_logout and accept_unsolicited_sso_with_outstanding_logout |
Mandatory when the caller supplies the logout. Core §3.7.3.1. Typed NameID values must be equal, and a Format on the logout must match (Core §3.3.4), compared as xs:anyURI with whitespace collapsed. An omitted or unspecified Format compares values only (Core §2.2.2, Errata E60); a typed LogoutRequest NameID carries the received Format. NameQualifier, SPNameQualifier, and SPProvidedID are not compared. No SessionIndex applies to every session of that principal. The context NotOnOrAfter skew applies. At or after that deadline the logout does not reject. finish_sso and accept_unsolicited_sso omit the check. No session store |
A present Destination identifies the actual recipient |
Accepting service provider | Inbound | Mandatory. Core §3.2.2. A signed HTTP-Redirect or HTTP-POST message carries Destination, and the recipient verifies it |
A present Destination and the bearer Recipient of an unsolicited response are compared with the assertion consumer that received it |
Accepting service provider | Inbound accept_unsolicited_sso |
Mandatory. Core §3.2.2 has the recipient check Destination against the location at which the message was received, and Profiles §4.1.4.3 as replaced by Errata 05 E26 has the service provider check that Recipient matches the assertion consumer service URL to which the response was delivered. SamlValidationContext::with_recipient_endpoint supplies that URL. Profiles §4.1.5 only recommends the default endpoint for an unsolicited response, so a response to another published assertion consumer is accepted. Library policy: a supplied URL that this service provider does not publish as an AssertionConsumerService for the incoming binding returns Invalid, although Core §3.2.2 compares only with the receiving location. The looser rule is not applied because the URL is caller input, and the restriction keeps a value derived from the request from naming an endpoint this service provider does not operate for that binding. receive_sso applies the same restriction. Library policy: without a supplied URL, the default assertion consumer for the incoming binding is expected, selected by the indexed-default algorithm in generation. The looser rule cannot be applied because without a supplied URL the library is not told which endpoint received the response |
Check the bearer Address |
Accepting service provider | Inbound | Optional. Stays off. Profiles §4.1.4.3 |
A status other than Success is returned as an error |
Accepting service provider | Inbound finish_sso and accept_unsolicited_sso |
SamlError::StatusNotSuccess with both codes. Profiles §4.1.4.3 requires the service provider to verify any signature present on the response, so a present signature is verified first. Library policy: the status is read only after that signature, the Issuer, InResponseTo, and Destination checks pass, so an unrelated error response returns that check’s error. No OASIS rule orders these checks. The Issuer check is the Response Issuer row. The response need not be signed, because identity providers often send unsigned error responses. Shibboleth SP 3.5.2 SAML2Consumer.cpp also reads the status before it requires an authenticated message. Library policy: finish_sso rejects an error response without InResponseTo, although Core §3.2.2 has the responder omit it when it could not determine the request ID. An unsolicited error response is not checked for an absent InResponseTo |
A received RelayState longer than 80 bytes is accepted |
Accepting service provider | Inbound finish_sso and accept_unsolicited_sso |
Bindings §3.4.3, §3.5.3, and HTTP-POST-SimpleSign CD-04 §2.3 forbid the entity creating the message from exceeding 80 bytes and have no receiver rule. SsoSession::relay_state reports the value. Library policy for the bound: a value longer than MAX_RECEIVED_RELAY_STATE_BYTES, 4096 bytes, returns SamlError::Invalid. It is a resource limit on unauthenticated input, not an OASIS rule |
At most one RelayState value |
Accepting service provider | Inbound finish_sso and accept_unsolicited_sso |
Library policy. Bindings §3.4.3, §3.5.3, and HTTP-POST-SimpleSign CD-04 §2.3 define one RelayState value per message and have no receiver rule for a repeat. The looser rule is not applied because saml-rs compares, reports, or echoes only one value, and a caller’s framework may read another. A second RelayState, matched by its decoded name, returns SamlError::Invalid, as for a second SAMLRequest or SAMLResponse |
RelayState the request carried comes back unchanged |
Accepting service provider | Inbound finish_sso |
Library policy. Bindings §3.4.3, §3.5.3, and HTTP-POST-SimpleSign CD-04 §2.3 oblige the identity provider to return the exact value and have no receiver rule. A different, empty, or missing value returns SamlError::RelayStateMismatch. An empty value the request carried is compared the same way |
RelayState the identity provider adds is accepted |
Accepting service provider | Inbound finish_sso when the request carried none, and accept_unsolicited_sso |
Optional for the identity provider. Bindings §3.4.3, §3.5.3, and HTTP-POST-SimpleSign CD-04 §2.3 let it include RelayState, to be interpreted by profile or prior agreement. An empty value is accepted the same way. SsoSession::relay_state reports the value, and the caller interprets it |
HTTP-POST-SimpleSign verifies the raw XML octets, then RelayState when present, then SigAlg |
Accepting service provider | Inbound | Mandatory when that binding is used. CD-04 §2.6. An absent RelayState is omitted |
Base64 message content and the detached Signature value ignore ASCII whitespace and reject any other character outside the alphabet |
Accepting service provider | Inbound | Library policy. Bindings §3.4.4.1 and §3.5.4 encode the message with RFC 2045 base64, and RFC 2045 §6.8 says a decoder ignores characters outside the base64 alphabet. Space, tab, line feed, form feed, and carriage return are ignored. Any other character, including vertical tab and Unicode spaces, is rejected. The looser rule is not applied because Bindings §3.4.4.1 requires the sender to remove whitespace and §3.5.4 allows only line wrapping, so any other character means the value was altered, and ignoring it would hide that. HTTP-POST-SimpleSign uses the same decoder. The detached Signature value of HTTP-Redirect and HTTP-POST-SimpleSign follows the same rule; Bindings §3.4.4.1 also requires the sender to remove whitespace from it |
Identity provider
receive_sso reads IdpValidationPolicy.authn_requests and
IdpValidationPolicy.xml_signatures. The accept combination is
AuthnRequestValidationPolicy::AllowUnsignedVerifyIfPresent.
| Rule | Actor | Direction | Level |
|---|---|---|---|
Require a signed AuthnRequest |
Identity provider | Inbound | Optional. Stays off unless RequireSigned |
Reject an unsigned AuthnRequest from a service provider whose metadata sets AuthnRequestsSigned |
Identity provider | Inbound receive_sso and receive_paos_sso |
Mandatory when any SAML 2.0 SPSSODescriptor of the service provider sets AuthnRequestsSigned to true. Metadata §2.4.4 as amended by Errata 05 E7: an identity provider that receives an unsigned <samlp:AuthnRequest> from such a service provider MUST return a SAML error response and MUST NOT fulfill the request. Under AllowUnsignedVerifyIfPresent, an unsigned request on any binding receive_sso accepts, or over PAOS, returns SamlError::SignatureMissing and no Received<AuthnRequest>, so it cannot be fulfilled. A signed request is verified as under RequireSigned. The flag is read from the SAML 2.0 role descriptors only, as described in metadata rules. The crate does not build the SAML error response, because a rejected request leaves no Received<AuthnRequest> to answer, and this row does not claim it. RequireSigned already requires the signature. AllowUnsignedForCompatibility is the samlify-port hatch and does not apply the rule. The raw IdentityProvider::parse_login_request applies it only with the EntitySetting an IdpConfig produces |
| Do not verify with MD5, RIPEMD-160, or an RSA key shorter than 2048 bits | Identity provider | Inbound | Library policy, on. XmlSignatureProfile::ExcludeWeakAlgorithms. AllowProviderSupportedForCompatibility relaxes it. See weak algorithms and keys |
| Verify a signature that is present | Identity provider | Inbound | Mandatory. Core §3.2.1. AllowUnsignedForCompatibility is the samlify-port hatch and does not verify it |
UTC IssueInstant |
Identity provider | Inbound | Mandatory. No off switch. An inbound leap-second value stays accepted |
Limit an AuthnRequest IssueInstant to a caller-chosen maximum age |
Identity provider | Inbound receive_sso |
Library hardening, off. Core §1.3.3 requires a UTC IssueInstant and does not define a maximum age. Enabling it can reject a conformant request. AuthnRequestAgePolicy::Disabled is the default on SamlValidationContext::new. Bounded { max_age } accepts an instant at or after now - max_age - past_tolerance and at or before now + future_tolerance, both edges inclusive. Past tolerance is the NotOnOrAfter skew when that skew is positive, otherwise zero. Future tolerance is the magnitude of the NotBefore skew when that skew is negative, otherwise zero. ClockSkew::five_minutes widens only a Bounded window. An inverted skew does not shrink max_age. max_age of zero leaves that skew neighborhood. The check runs after signature and Destination handling and before replay storage. It is not a field of IdpValidationPolicy and it is not part of recommended() or Compatibility |
A present Destination matches the actual receiving SSO URL, and a signed request carries Destination |
Identity provider | Inbound | Mandatory. Core §3.2.1; Bindings §§3.4.5.2, 3.5.5.2; SimpleSign §2.4. A missing Destination is rejected once RequireSigned or AllowUnsignedVerifyIfPresent authenticates the signature. with_recipient_endpoint supplies the URL, or a unique published Location is inferred. Explicit selection for multiple endpoints and the published-URL restriction are library policy. SSO ResponseLocation is unused under Metadata §2.2.2/E41 |
AssertionConsumerServiceURL or AssertionConsumerServiceIndex belongs to the service provider |
Identity provider | Inbound | Mandatory. Profiles §4.1.4.1. The check runs when the response is issued |
Expose ForceAuthn when present; leave it absent when omitted |
Identity provider | Inbound receive_sso |
Optional. Core §3.4.1. Omission stays absent. Presence does not reject the request |
Expose IsPassive when present; leave it absent when omitted |
Identity provider | Inbound receive_sso |
Optional. Core §3.4.1. Omission stays absent. Presence does not reject the request |
Expose RequestedAuthnContext when present; leave it absent when omitted |
Identity provider | Inbound receive_sso and receive_paos_sso |
Core §3.4.1 and §3.3.2.2.1 as corrected by Errata 05 E45. AuthnRequest::requested_authn_context keeps the references in request order, most preferred first, because order is significant in an AuthnRequest. An omitted Comparison is exact. Presence does not reject the request. Answering it is in generation rules |
RequestedAuthnContext follows RequestedAuthnContextType |
Identity provider | Inbound receive_sso and receive_paos_sso |
Mandatory. Protocol schema. One or more AuthnContextClassRef, or one or more AuthnContextDeclRef, in the assertion namespace, and not both. Comparison is unqualified and is exact, minimum, maximum, or better. The element occurs at most once. A request that breaks one of these checks is rejected; other content of the element is not checked. A reference that is not an absolute URI is kept, with anyURI whitespace collapsed, and is not rejected |
ForceAuthn and IsPassive are unqualified booleans |
Identity provider | Inbound receive_sso and receive_paos_sso |
Mandatory. Schema AuthnRequestType. Values are true, false, 1, and 0, with surrounding XML whitespace (XML Schema Part 2 §§3.2.2 and 4.3.6). A qualified attribute is rejected |
NameIDPolicy AllowCreate is a boolean and AssertionConsumerServiceIndex is an unsignedShort |
Identity provider | Inbound receive_sso and receive_paos_sso |
Mandatory. Schemas NameIDPolicyType and AuthnRequestType. XML Schema Part 2 §4.3.6 collapses the whitespace of both datatypes (§§3.2.2 and 3.3.23) before the lexical value is read, so surrounding space, tab, carriage return, and line feed are ignored. AllowCreate is true, false, 1, or 0, and the index is a decimal from 0 to 65535. Another value, including one padded with a non-XML space, is SamlError::Invalid |
Expose a requested Subject when present; leave it absent when omitted |
Identity provider | Inbound receive_sso |
Optional. Core §3.4.1 and §3.4.1.4 / E75. A valid subject does not reject the request |
No identifier in that Subject means the presenter is the requested subject |
Identity provider | Inbound receive_sso |
Core §3.4.1. <BaseID> stays distinct and is not decoded |
Decrypt a requested <EncryptedID> |
Identity provider | Inbound receive_sso and receive_paos_sso |
Mandatory. Conformance §3.4: the identity provider processes the requested <NameID> (Core §3.4.1), so it processes the encrypted form. Decrypted with the decryption_key and returned as RequestedSubjectIdentifier::NameId. The EncryptedKey is found as for the assertion EncryptedID. Library policy: an unsigned request is decrypted only when its EncryptedData names AES-GCM. Profiles §4.1.4.1 lets the request be unsigned, and Errata 05 E93 asks for integrity protection before CBC-encrypted data is processed; AES-GCM authenticates the ciphertext. Without a key, for an unsigned CBC request, or when the plaintext is not one <NameID>, it stays RequestedSubjectIdentifier::EncryptedId, and the identity provider answers with an error <Response> (Core §3.4.1.4) |
Requested <NameID> keeps its content and qualifier attributes |
Identity provider | Inbound receive_sso |
Core §3.3.4. A qualified NameQualifier, SPNameQualifier, or SPProvidedID is rejected |
NameIDPolicy keeps SPNameQualifier |
Identity provider | Inbound receive_sso and receive_paos_sso |
Core §3.4.1.1. NameIdPolicy::sp_name_qualifier returns the received value. A policy with only SPNameQualifier is present. Presence does not reject the request. An identity provider that cannot return an identifier in that namespace answers with an error <Response>, which may carry InvalidNameIDPolicy. When the policy Format is a §8.3 format other than unspecified or encrypted and the identity provider returns an assertion, Errata 05 E15 requires the returned NameID SPNameQualifier to be identical (identity provider, generating the Response). The answer is checked as in Web Browser SSO generation. A qualified SPNameQualifier is rejected, as schema NameIDPolicyType has no attribute wildcard |
One Subject and one identifier element |
Identity provider | Inbound receive_sso |
A second Subject, a second identifier, or a foreign namespace is rejected |
A received RelayState longer than 80 bytes is accepted |
Identity provider | Inbound receive_sso |
Bindings §3.4.3, §3.5.3, and HTTP-POST-SimpleSign CD-04 §2.3 forbid the entity creating the message from exceeding 80 bytes and have no receiver rule. The same sections require the identity provider to return the exact value, so Received<AuthnRequest>::relay_state keeps it and respond_sso echoes it. Library policy for the bound: a value longer than MAX_RECEIVED_RELAY_STATE_BYTES, 4096 bytes, returns SamlError::Invalid. It is a resource limit on unauthenticated input, not an OASIS rule |
At most one RelayState value |
Identity provider | Inbound receive_sso |
Library policy. Bindings §3.4.3, §3.5.3, and HTTP-POST-SimpleSign CD-04 §2.3 define one RelayState value per message and have no receiver rule for a repeat. The looser rule is not applied because saml-rs compares, reports, or echoes only one value, and a caller’s framework may read another. A second RelayState, matched by its decoded name, returns SamlError::Invalid, as for a second SAMLRequest or SAMLResponse |
HTTP-Redirect verifies SAMLRequest, RelayState when present, then SigAlg, using the original URL-encoded values |
Identity provider | Inbound AuthnRequest | Mandatory when the request is signed with that binding. Bindings §3.4.4.1. The message is raw-inflated after base64 decoding |
HTTP-POST-SimpleSign verifies the raw XML octets, then RelayState when present, then SigAlg |
Identity provider | Inbound AuthnRequest | Mandatory when that binding is used. CD-04 §2.6 |
Base64 message content and the detached Signature value ignore ASCII whitespace and reject any other character outside the alphabet |
Identity provider | Inbound AuthnRequest | Library policy. Bindings §3.4.4.1 and §3.5.4 encode the message with RFC 2045 base64, and RFC 2045 §6.8 says a decoder ignores characters outside the base64 alphabet. Space, tab, line feed, form feed, and carriage return are ignored. Any other character, including vertical tab and Unicode spaces, is rejected. The looser rule is not applied because Bindings §3.4.4.1 requires the sender to remove whitespace and §3.5.4 allows only line wrapping, so any other character means the value was altered, and ignoring it would hide that. HTTP-POST-SimpleSign uses the same decoder. The detached Signature value of HTTP-Redirect and HTTP-POST-SimpleSign follows the same rule; Bindings §3.4.4.1 also requires the sender to remove whitespace from it |