Sto implementando SSO basato su SAML per una delle applicazioni Web php. Sto usando google come IDP. Ho usato il plugin Laravel 5 - Saml2 e configurato secondo i passaggi indicati nella sua documentazione. Ho anche aggiunto questa app nella console di amministrazione di google come app SAML utilizzando i passaggi indicati con here e url entityId e acs configurati in saml2_settings.php. Tuttavia non sono in grado di configurare i certificati x509cert. Quando mi ha colpito URL di accesso, l'utente viene reindirizzato a Google per l'autenticazione tuttavia quando mi immette le credenziali non ritorna all'applicazione e dando seguente errore:SSO basato su SAML con Laravel
- That’s an error.
Error: app_not_configured_for_user
Service is not configured for this user.
seguito è il mio file saml2_settings:
'sp' => array(
// Specifies constraints on the name identifier to be used to
// represent the requested subject.
// Take a look on lib/Saml2/Constants.php to see the NameIdFormat supported
'NameIDFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
// Usually x509cert and privateKey of the SP are provided by files placed at
// the certs folder. But we can also provide them with the following parameters
'x509cert' => 'I ADDED x509certs here which I downloaded from google',
'privateKey' => '',
//LARAVEL - You don't need to change anything else on the sp
// Identifier of the SP entity (must be a URI)
'entityId' => 'snipeit', //LARAVEL: This would be set to saml_metadata route
// Specifies info about where and how the <AuthnResponse> message MUST be
// returned to the requester, in this case our SP.
'assertionConsumerService' => array(
// URL Location where the <Response> from the IdP will be returned
'url' => 'http://dev.sb.com/snipeit/public/account/profile', //LARAVEL: This would be set to saml_acs route
//SAML protocol binding to be used when returning the <Response>
//message. Onelogin Toolkit supports for this endpoint the
//HTTP-Redirect binding only
'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
),
// Specifies info about where and how the <Logout Response> message MUST be
// returned to the requester, in this case our SP.
'singleLogoutService' => array(
// URL Location where the <Response> from the IdP will be returned
'url' => '', //LARAVEL: This would be set to saml_sls route
// SAML protocol binding to be used when returning the <Response>
// message. Onelogin Toolkit supports for this endpoint the
// HTTP-Redirect binding only
'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
),
),
// Identity Provider Data that we want connect with our SP
'idp' => array(
// Identifier of the IdP entity (must be a URI)
'entityId' => '',
// SSO endpoint info of the IdP. (Authentication Request protocol)
'singleSignOnService' => array(
// URL Target of the IdP where the SP will send the Authentication Request Message
'url' => $idp_host,
// SAML protocol binding to be used when returning the <Response>
// message. Onelogin Toolkit supports for this endpoint the
// HTTP-POST binding only
'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
),
// SLO endpoint info of the IdP.
'singleLogoutService' => array(
// URL Location of the IdP where the SP will send the SLO Request
'url' => $idp_host . '/saml2/idp/SingleLogoutService.php',
// SAML protocol binding to be used when returning the <Response>
// message. Onelogin Toolkit supports for this endpoint the
// HTTP-Redirect binding only
'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
),
// Public x509 certificate of the IdP
'x509cert' => 'SAME CERTIFICATES I ADDED HERE AS WELL', /*
* Instead of use the whole x509cert you can use a fingerprint
* (openssl x509 -noout -fingerprint -in "idp.crt" to generate it)
*/
// 'certFingerprint' => '',
),
Qualcuno può aiutarmi per favore.
Smartin, sembra che tu sappia molto su SAML2 in Laravel 5. Puoi aiutarmi con questo? http://stackoverflow.com/questions/42396868/laravel-5-integrate-with-saml-2-with-existing-idp – ihue