Uso dell'applicazione SP di test in OAM/SP

Questo articolo dimostra come abilitare e utilizzare l'applicazione SP di test in OAM/SP, che è molto utile quando OAM è un SP e vengono impostati accordi federativi. Offre le funzionalità riportate di seguito.

Questo strumento è molto utile per diagnosticare i problemi nei flussi SAML/OpenID prima dell'attivazione di SSO Federation.

Si tratta di un'applicazione Web che esercita la funzionalità SP di OAM tramite un browser senza creare alcuna sessione OAM:

Abilitazione/disabilitazione del test del motore SP

L'applicazione di prova SP è disattivata e deve essere abilitata prima di poterla utilizzare.

Nota: dopo aver utilizzato l'applicazione SP di test, è necessario disabilitarla.

Per abilitare o disabilitare l'applicazione Test SP, è necessario eseguire i seguenti comandi OAM WLST:

  1. Immettere l'ambiente WLST eseguendo: $IAM_ORACLE_HOME/common/bin/wlst.sh.

  2. Connettersi al server di amministrazione WLS: connect().

  3. Passare alla diramazione Runtime dominio: domainRuntime().

  4. Eseguire il comando TestSPEngine().

    1. Per abilitare il motore SP di prova: configureTestSPEngine("true")

    2. Per disabilitare il motore SP di prova: configureTestSPEngine("false")

  5. Uscire dall'ambiente WLST: exit().

Uso del test motore provider di servizi

Avvio SSO Federation

L'avvio del flusso SSO Federation comporta quanto segue.

L'URL da utilizzare per accedere all'applicazione Test SP è: http(s)://oam-runtime-host:oam-runtime-port/oamfed/user/testspss

L'applicazione SP di test visualizza un elenco a discesa con l'elenco IdPs per eseguire SSO Federation con:

Descrizione dell'immagine Initiate_Federation_SSO.jpg

Dopo aver selezionato IdP, fare clic sul pulsante Avvia SSO che attiva SSO Federation con il valore IdP specificato.

Risultato dell'operazione di prova SP

Quando IdP reindirizza l'utente con l'asserzione SAML/risposta OpenID a OAM/SP, il server convalida la risposta, la mappa a un record utente LDAP e restituisce il risultato all'applicazione SP di test che visualizza:

Descrizione dell'immagine Test_SP_Operation_Result.jpg

Diagnosi dei problemi

Se SSO Federation tra un IdP e un OAM/SP non funziona, il motore SP di test può essere uno strumento efficace con i log OAM per diagnosticare i problemi.

Problemi di mapping

Se l'asserzione SSO in entrata non può essere mappata a un record utente LDAP locale, l'applicazione SP di test può mostrare:

In questo esempio, gli amministratori di IdP e OAM/SP hanno accettato di utilizzare SAML 2.0 e identificare l'utente tramite l'indirizzo di posta elettronica. Il problema qui è che l'indirizzo e-mail per alice in IdP è alice.appleton@oralce.com, mentre nella directory LDAP utilizzata da OAM/SP, l'indirizzo e-mail è alice@oracle.com

L'applicazione Test SP visualizza le seguenti informazioni alla fine del flusso:

Descrizione dell'immagine Mapping_Issues_Result.jpg

I file di log OAM mostrano il seguente messaggio di errore e il messaggio SAML:

<Feb 28, 2014 7:18:05 AM PST> <Warning>

<oracle.security.fed.eventhandler.fed.proVles.sp.sso.assertion.Saml20AssertionProcessor><FED-15108> <User was not found during configure based authentication using NameIDmapping for name identifier: alice.appleton@oracle.com name identifier format :urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress and message :<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"Destination="http://adc00pcc.us.oracle.com:23002/oam/server/fed/sp/sso" ID="idaWfL5-f37nhQWh0WWjHbobsVetM-" InResponseTo="id-hqkZGMV-wEO5-CulpYxArIvr91Y14dA-WSRYZ8zP" IssueInstant="2014-02-28T15:18:05Z"Version="2.0"><saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"Format="urn:oasis:names:tc:SAML:2.0:nameidformat:entity">http://adc00peq.us.oracle.com:7499/fed/idp</saml:Issuer><samlp:Status><samlp:StatusCodeValue="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertionxmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="id-PoODBDUeoiSY4ajPCQ86yjZWkw-"IssueInstanattributet="2014-02-28T15:18:05Z" Version="2.0"><saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameidformat:entity">http://adc00peq.us.oracle.com:7499/fed/idp</saml:Issuer><dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><dsig:Reference URI="#id-PoOD-BDUeoiSY4ajPCQ86yjZWkw-"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>X5ojFxrpBOS4klosM5jcBOF8Bqg=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>VJKJOBOowHZ4lVkHjX4w2YHi+0ZAa4ez/+D+ketAQcOxxtwOZPcBYERwkMgazudMh0XEMbIkwsBTVwb4tX+uV327Gjlp1hXc0uYnm2n8mZfen9Ppru6jTES4N7PoD3mOpCfFEHBUJg118DihWGLfzBWw7LMLaN2A</dsig:SignatureValue></dsig:Signature><saml:Subject><saml:NameIDFormat="urn:oasis:names:tc:SAML:1.1:nameidformat:emailAddress">alice.appleton@oracle.com</saml:NameID><saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml:SubjectConfirmationData InResponseTo="id-hqkZGMV-wEO5-CulpYxArIvr91Y14dA-WSRYZ8zP" NotOnOrAfter="2014-02-28T15:23:05Z"Recipient="http://adc00pcc.us.oracle.com:23002/oam/server/fed/sp/sso"/></saml:SubjectConfirmation></saml:Subject><saml:ConditionsNotBefore="2014-02-28T15:18:05Z" NotOnOrAfter="2014-02-28T15:23:05Z"><saml:AudienceRestriction><saml:Audience>http://adc00pcc.us.oracle.com:23002/oam/fed</saml:Audience></saml:AudienceRestriction></saml:Conditions><saml:AuthnStatement AuthnInstant="2014-02-28T15:18:05Z" SessionIndex="id-2i7BY1gGnhukoBSDmrvkBIaG-NI-" SessionNotOnOrAfter="2014-02-28T16:18:05Z"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>

Problemi di convalida della risposta

Se non è possibile convalidare l'asserzione SSO in entrata, l'applicazione SP di test può mostrare:

In questo esempio, gli amministratori di IdP e OAM/SP hanno accettato di utilizzare SAML 2.0 ma IdP non firma l'asserzione come richiesto da OAM/SP (in genere l'asserzione è firmata: per questo esempio ho disabilitato la firma su IdP per mostrare l'errore) L'applicazione Test SP riporta le seguenti informazioni alla fine del flusso:

Descrizione dell'immagine Response_Validation_Issues_Result.jpg

I file di log OAM mostrano il seguente messaggio di errore e il messaggio SAML:

<Feb 28, 2014 7:23:05 AM PST> <Error><oracle.security.fed.eventhandler.fed.profiles.utils.CheckUtils> <FEDSTS-18003><Assertion is not signed.><Feb 28, 2014 7:23:05 AM PST> <Error><oracle.security.fed.eventhandler.fed.profiles.sp.sso.v20.ProcessResponseEventHandler><FED-18012> <Assertion cannot be validated: <samlp:Responsexmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"Destination="http://adc00pcc.us.oracle.com:23002/oam/server/fed/sp/sso" ID="id-De7M27k5CWpBsuGzgaxwHgwqV1g-" InResponseTo="id-fX4nHKLCMcAZjHvsKfCORDZLmIDcQMpVYjqmxQb"IssueInstant="2014-02-28T15:23:05Z"Version="2.0"><saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"Format="urn:oasis:names:tc:SAML:2.0:nameidformat:entity">http://adc00peq.us.oracle.com:7499/fed/idp</saml:Issuer><samlp:Status><samlp:StatusCodeValue="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertionxmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="id-EAdQSXjroyYNuuWbaBWZVdBtu8-"IssueInstant="2014-02-28T15:23:05Z" Version="2.0"><saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameidformat:entity">http://adc00peq.us.oracle.com:7499/fed/idp</saml:Issuer><saml:Subject><saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameidformat:emailAddress">alice@oracle.com</saml:NameID><saml:SubjectConfirmationMethod="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml:SubjectConfirmationDataInResponseTo="id-fX4nHKLCMcA-ZjHvsKfCORDZLmIDcQMpVYjqmxQb"NotOnOrAfter="2014-02-28T15:28:05Z"Recipient="http://adc00pcc.us.oracle.com:23002/oam/server/fed/sp/sso"/></saml:SubjectConfirmation></saml:Subject><saml:ConditionsNotBefore="2014-02-28T15:23:05Z" NotOnOrAfter="2014-02-28T15:28:05Z"><saml:AudienceRestriction><saml:Audience>http://adc00pcc.us.oracle.com:23002/oam/fed</saml:Audience></saml:AudienceRestriction></saml:Conditions><saml:AuthnStatement AuthnInstant="2014-02-28T15:23:05Z" SessionIndex="id--0QWpaU2AV-L7UpNvLH5Bn7Z5Xk-" SessionNotOnOrAfter="2014-02-28T16:23:05Z"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>

Altre risorse di apprendimento

Esplora altri laboratori su docs.oracle.com/learn o visita altri contenuti di formazione gratuiti sul canale Oracle Learning YouTube. Inoltre, visitare education.oracle.com/learning-explorer per diventare un Oracle Learning Explorer.

Per la documentazione sul prodotto, visitare Oracle Help Center.