Buongiorno,
nell’ottica di poter integrare l’autenticazione SPID anche in fase di test, ho pubblicato un metadata che, a fronte dello stesso entityId, prevede 2 servizi:
servizio-prod (default con indice 0) e servizio-test (con indice 1).
Per essere precisi, ‘servizio-prod’ coincide esattamente con l’entityID.
Il problema è che nelle richieste che faccio con PosteID (la mia identità SPID), il parametro AssertionConsumerServiceIndex sembra essere ignorato e le AuthnResponse vengono inviate sempre a ‘servizio-prod’, anche se imposto l’indice a ‘1’.
Metadata:
…
<md:AssertionConsumerService Binding=“urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST” Location=“servizio-prod” index=“0” isDefault=“true”/>
<md:AssertionConsumerService Binding=“urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST” Location=“servizio-test” index=“1”/>
<md:AttributeConsumingService index=“0”>
<md:ServiceName xml:lang=“it”>SERVIZIO</md:ServiceName>
<md:RequestedAttribute Name=“email”/>
<md:RequestedAttribute Name=“familyName”/>
<md:RequestedAttribute Name=“name”/>
</md:AttributeConsumingService>
<md:AttributeConsumingService index=“1”>
<md:ServiceName xml:lang=“it”>SERVIZIO TEST</md:ServiceName>
<md:RequestedAttribute Name=“email”/>
<md:RequestedAttribute Name=“familyName”/>
<md:RequestedAttribute Name=“name”/>
</md:AttributeConsumingService>
…
Request:
<saml2p:AuthnRequest xmlns:saml2p=“urn:oasis:names:tc:SAML:2.0:protocol”
AssertionConsumerServiceIndex=“1” AttributeConsumingServiceIndex=“1”
Destination=“https://posteid.poste.it/jod-fs/ssoserviceredirect”
ID="_1a76a7a4-b309-40cc-8eb0-31c2197c0361" IssueInstant=“2018-01-15T11:08:38.342Z” Version=“2.0”>
<saml2:Issuer xmlns:saml2=“urn:oasis:names:tc:SAML:2.0:assertion” Format=“urn:oasis:names:tc:SAML:2.0:nameid-format:entity” NameQualifier=“SERVIZIO-PROD”>
SERVIZIO-PROD
</saml2:Issuer>
<saml2p:NameIDPolicy AllowCreate=“true” Format=“urn:oasis:names:tc:SAML:2.0:nameid-format:transient”/>
<saml2:Conditions xmlns:saml2=“urn:oasis:names:tc:SAML:2.0:assertion” NotBefore=“2018-01-15T11:07:38.342Z” NotOnOrAfter=“2018-01-15T11:09:38.342Z”/>
<saml2p:RequestedAuthnContext Comparison=“minimum”>
<saml2:AuthnContextClassRef xmlns:saml2=“urn:oasis:names:tc:SAML:2.0:assertion”>urn:oasis:names:tc:SAML:2.0:ac:classes:SpidL1</saml2:AuthnContextClassRef>
</saml2p:RequestedAuthnContext>
</saml2p:AuthnRequest>
C’è qualcosa di sbagliato nella richiesta?
ho provato anche a modificare l’url nel campo Issuer, ma se imposto quella di test non mi viene accettata la richiesta