Open christianfelicite opened 4 years ago
https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language
The principal (via an HTTP user agent) requests a target resource at the service provider:
https://sp.example.com/myresource
The service provider performs a security check on behalf of the target resource. If a valid security context at the service provider already exists, skip steps 2–7.
The service provider determines the user's preferred identity provider (by unspecified means) and redirects the user agent to the SSO Service at the identity provider:
https://idp.example.org/SAML2/SSO/Redirect?SAMLRequest=request
The value of the SAMLRequest parameter (denoted by the placeholder request above) is the Base64 encoding of a deflated
The user agent issues a GET request to the SSO service at the URL from step 2. The SSO service processes the AuthnRequest (sent via the SAMLRequest URL query parameter) and performs a security check. If the user does not have a valid security context, the identity provider identifies the user (details omitted).
The SSO service validates the request and responds with a document containing an XHTML form:
<form method="post" action="https://sp.example.com/SAML2/SSO/POST" ...>
<input type="hidden" name="SAMLResponse" value="response" />
...
<input type="submit" value="Submit" />
</form>
The value of the SAMLResponse element (denoted by the placeholder response above) is the base64 encoding of a
The user agent issues a POST request to the assertion (#425) consumer service at the service provider. The value of the SAMLResponse parameter is taken from the XHTML form at step 4.
The assertion consumer service processes the response, creates a security context at the service provider and redirects the user agent to the target resource.
The user agent requests the target resource at the service provider (again):
https://sp.example.com/myresource
Since a security context exists, the service provider returns the resource to the user agent.
https://auth0.com/blog/how-saml-authentication-works/
Workflow très détaillé !!
Now, a user is trying to gain access to Zagadat using SAML authentication.
This is the process flow:
https://www.zoho.com/developer/help/extensions/saml.html
SAML Terminologies and Workflow Security Assertion Markup Language (SAML) is an XML-based standard that allows you to exchange authentication data between one service and another. Zoho provides single sign-on for connected apps using SAML. Here, Zoho acts as the identity provider (IdP) and the application is the service provider (SP).
The developer must be familiar with the following terms before building an SAML-enabled connected app.
Service Provider(SP) #422 - The system that provides the service to the user. In this case, the web application the user wants to connect Zoho CRM with acts as the SP.
Identity Provider(IdP) #421 - The system that manages the identity information of the users, including user name, password and other crucial data. In this case, Zoho acts as the IdP
Entity ID - A unique ID that allows the SP and IdP can identify each other. The Entity ID for Zoho CRM will be generated once you create the connected app. Provide this ID to the application you want to connect with Zoho CRM. The Entity ID for the web app will be provided in the SAML documentation for that application.
ACS URL (Assertion Consumer Service URL) - The Identity Provider will send the SAML response to this URL. This URL will be provided by the service provider.
Single Sign-on (SSO)- A session and user authentication service that permits a user to use one set of login credentials (e.g., name and password) to access multiple application.
Subject Type - Subject type indicates the value that the Service provider expects. E.g., user name, user ID, etc.
Name ID Format - The format in which the name ID must be specified. The name ID format you specify must be the same in both the IdP and SP.
https://www.gluu.org/resources/documents/articles/how-does-saml-work-idps-sps/
5 benefits of using SAML:
There are many reasons to use a SAML IDP like the Gluu Server, including:
https://www.acipia.fr/infrastructure/securite/saml-sso-authentification-deleguee/
Grâce à SAML la DSI peut implémenter son propre portail d’identification (IdP). Celui-ci assurera en toute autonomie l’authentification des utilisateurs. Cette identité sera transmise aux fournisseurs de service habilités au travers d’un échange SAML. Dans cette transmission le fournisseur (SP) n’aura accès qu’aux seules informations strictement nécessaires.
Lors de la connexion à l’application externe, celle-ci renvoie l’utilisateur inconnu vers l’IdP de l’entreprise. Cet IdP est un service web accessible en HTTPS. Il peut être hébergé en interne ou en externe.
L’utilisateur prouve ensuite son identité à l’IdP. Cette phase peut se faire par une authentification explicite (login / mot de passe) ou par la propagation d’un jeton préexistant. C’est notamment possible dans le cas d’une authentification Kerberos sur un domaine Active Directory. Dans ce dernier cas la phase d’authentification est transparente pour l’utilisateur.
L’IdP va alors générer un « jeton », sorte de carte d’identité de l’utilisateur, valable uniquement pour le service sollicité et pour un temps donné. Dans ce jeton on trouvera notamment :
Dans le mode le plus pratique, l’assertion n’est pas transmise directement de l’IdP vers le SP, mais par l’intermédiaire de l’utilisateur lui-même. Par un mécanisme de rebond HTTP, l’IdP va fournir au navigateur client le jeton à transmettre au fournisseur de service. On peut comparer à la carte d’identité fournie par la préfecture pour être présentée à toute autorité.
Le fournisseur de service reçoit le jeton de la part de l’utilisateur. Le SP a choisi de faire confiance à cet IdP. Aussi valide-t-il la signature et l’intégrité du jeton, ainsi que la période de validité. Si les tests sont concluants le SP ouvre une session à l’utilisateur. Modalités pratiques
La mise en place d’un IdP interne à l’entreprise n’est pas très complexe. Il s’agit principalement d’un serveur Web embarquant un composant capable de générer des jetons SAML ou OpenID. Le composant libre simpleSAMLphp est particulièrement polyvalent et souple.
Du côté des fournisseurs de service il faut valider que ceux-ci acceptent un mode d’authentification implémenté par l’IdP. On choisira en général SAML 2.0, OpenID ou Shiboleth.
425
426
467