lemonldap-ng/doc/pages/documentation/current/authsaml.html
2019-04-10 20:29:24 +02:00

323 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<title>documentation:2.0:authsaml</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="noindex,nofollow"/>
<meta name="keywords" content="documentation,2.0,authsaml"/>
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="LemonLDAP::NG"/>
<link rel="start" href="authsaml.html"/>
<link rel="contents" href="authsaml.html" title="Sitemap"/>
<link rel="stylesheet" type="text/css" href="lib/exe/css.php.t.bootstrap3.css"/>
<!-- //if:usedebianlibs
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
//elsif:useexternallibs
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
//elsif:cssminified
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
//else -->
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
<!-- //endif -->
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:2.0';var JSINFO = {"id":"documentation:2.0:authsaml","namespace":"documentation:2.0"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.bootstrap3.js"></script>
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script>
<!-- //endif -->
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.js"></script>
<!-- //endif -->
</head>
<body>
<div class="dokuwiki export container">
<!-- TOC START -->
<div id="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>
<ul class="toc">
<li class="level1"><div class="li"><a href="#presentation">Presentation</a></div></li>
<li class="level1"><div class="li"><a href="#configuration">Configuration</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#saml_service">SAML Service</a></div></li>
<li class="level2"><div class="li"><a href="#authentication_and_userdb">Authentication and UserDB</a></div></li>
<li class="level2"><div class="li"><a href="#register_lemonldapng_on_partner_identity_provider">Register LemonLDAP::NG on partner Identity Provider</a></div></li>
<li class="level2"><div class="li"><a href="#register_partner_identity_provider_on_lemonldapng">Register partner Identity Provider on LemonLDAP::NG</a></div>
<ul class="toc">
<li class="level3"><div class="li"><a href="#metadata">Metadata</a></div></li>
<li class="level3"><div class="li"><a href="#exported_attributes">Exported attributes</a></div></li>
<li class="level3"><div class="li"><a href="#options">Options</a></div></li>
</ul></li>
</ul></li>
</ul>
</div>
</div>
<!-- TOC END -->
<h1 class="sectionedit1" id="saml">SAML</h1>
<div class="level1">
<div class="table sectionedit2"><table class="inline table table-bordered table-striped">
<thead>
<tr class="row0 roweven">
<th class="col0 centeralign"> Authentication </th><th class="col1 centeralign"> Users </th><th class="col2 centeralign"> Password </th>
</tr>
</thead>
<tr class="row1 rowodd">
<td class="col0 centeralign"></td><td class="col1 centeralign"></td><td class="col2"> </td>
</tr>
</table></div>
<!-- EDIT2 TABLE [21-84] -->
</div>
<!-- EDIT1 SECTION "SAML" [1-85] -->
<h2 class="sectionedit3" id="presentation">Presentation</h2>
<div class="level2">
<p>
<abbr title="LemonLDAP::NG">LL::NG</abbr> can use SAML2 to get user identity and grab some attributes defined in user profile on its Identity Provider (IDP). In this case, <abbr title="LemonLDAP::NG">LL::NG</abbr> acts like an SAML2 Service Provider (SP).
</p>
<p>
Several IDPs are allowed, in this case the user will choose the IDP he wants. You can preselect IDP with an IDP resolution rule.
</p>
<p>
For each IDP, you can configure attributes that are collected. Some can be mandatory, so if they are not returned by IDP, the session will not open.
</p>
<div class="notetip"><abbr title="LemonLDAP::NG">LL::NG</abbr> can also act as <a href="idpsaml.html" class="wikilink1" title="documentation:2.0:idpsaml">SAML IDP</a>, that allows one to interconnect two <abbr title="LemonLDAP::NG">LL::NG</abbr> systems.
</div>
</div>
<!-- EDIT3 SECTION "Presentation" [86-693] -->
<h2 class="sectionedit4" id="configuration">Configuration</h2>
<div class="level2">
</div>
<!-- EDIT4 SECTION "Configuration" [694-720] -->
<h3 class="sectionedit5" id="saml_service">SAML Service</h3>
<div class="level3">
<p>
See <a href="samlservice.html" class="wikilink1" title="documentation:2.0:samlservice">SAML service</a> configuration chapter.
</p>
<div class="noteimportant">Browser implementations of formAction directive are inconsistent (e.g. Firefox doesn&#039;t block the redirects whereas Chrome does).
Administrators may have to modify formAction value with wildcard likes *.
<p>
In Manager, go in :
</p>
<p>
<code>General Parameters</code> &gt; <code>Advanced Parameters</code> &gt; <code>Security</code> &gt; <code>Content Security Policy</code> &gt; <code>Form destination</code>
</p>
</div>
</div>
<!-- EDIT5 SECTION "SAML Service" [721-1170] -->
<h3 class="sectionedit6" id="authentication_and_userdb">Authentication and UserDB</h3>
<div class="level3">
<p>
In <code>General Parameters</code> &gt; <code>Authentication modules</code>, set:
</p>
<ul>
<li class="level1"><div class="li"> Authentication module: <abbr title="Security Assertion Markup Language">SAML</abbr> v2</div>
</li>
<li class="level1"><div class="li"> Users module: Same (eq <abbr title="Security Assertion Markup Language">SAML</abbr>)</div>
</li>
</ul>
<div class="notetip">As passwords will not be managed by <abbr title="LemonLDAP::NG">LL::NG</abbr>, you can disable <a href="portalmenu.html#menu_modules" class="wikilink1" title="documentation:2.0:portalmenu">menu password module</a>.
</div>
</div>
<!-- EDIT6 SECTION "Authentication and UserDB" [1171-1467] -->
<h3 class="sectionedit7" id="register_lemonldapng_on_partner_identity_provider">Register LemonLDAP::NG on partner Identity Provider</h3>
<div class="level3">
<p>
After configuring <abbr title="Security Assertion Markup Language">SAML</abbr> Service, you can export metadata to your partner Identity Provider.
</p>
<p>
They are available at the EntityID <abbr title="Uniform Resource Locator">URL</abbr>, by default: <a href="http://auth.example.com/saml/metadata" class="urlextern" title="http://auth.example.com/saml/metadata" rel="nofollow">http://auth.example.com/saml/metadata</a>. You can also use <a href="http://auth.example.com/saml/metadata/sp" class="urlextern" title="http://auth.example.com/saml/metadata/sp" rel="nofollow">http://auth.example.com/saml/metadata/sp</a> to have only SP related metadata.
</p>
</div>
<!-- EDIT7 SECTION "Register LemonLDAP::NG on partner Identity Provider" [1468-1806] -->
<h3 class="sectionedit8" id="register_partner_identity_provider_on_lemonldapng">Register partner Identity Provider on LemonLDAP::NG</h3>
<div class="level3">
<p>
In the Manager, select node <code><abbr title="Security Assertion Markup Language">SAML</abbr> identity providers</code> and click on <code>Add <abbr title="Security Assertion Markup Language">SAML</abbr> IDP</code>. The IDP name is asked, enter it and click OK.
</p>
</div>
<h4 id="metadata">Metadata</h4>
<div class="level4">
<p>
You must register IDP metadata here. You can do it either by uploading the file, or get it from IDP metadata <abbr title="Uniform Resource Locator">URL</abbr> (this require a network link between your server and the IDP):
</p>
<p>
<img src="documentation/manager-saml-metadata.png" class="mediacenter" alt="" />
</p>
<div class="notetip">You can also edit the metadata directly in the textarea
</div>
</div>
<h4 id="exported_attributes">Exported attributes</h4>
<div class="level4">
<p>
For each attribute, you can set:
</p>
<ul>
<li class="level1"><div class="li"> <strong>Key name</strong>: name of the key in LemonLDAP::NG session (for example “uid” will then be used as $uid in access rules)</div>
</li>
<li class="level1"><div class="li"> <strong>Mandatory</strong>: if set to On, then session will not open if this attribute is not given by IDP.</div>
</li>
<li class="level1"><div class="li"> <strong>Name</strong>: <abbr title="Security Assertion Markup Language">SAML</abbr> attribute name.</div>
</li>
<li class="level1"><div class="li"> <strong>Friendly Name</strong>: optional, <abbr title="Security Assertion Markup Language">SAML</abbr> attribute friendly name.</div>
</li>
<li class="level1"><div class="li"> <strong>Format</strong> (optional): <abbr title="Security Assertion Markup Language">SAML</abbr> attribute format.</div>
</li>
</ul>
<p>
<img src="documentation/manager-saml-attributes.png" class="mediacenter" alt="" />
</p>
</div>
<h4 id="options">Options</h4>
<div class="level4">
</div>
<h5 id="general_options">General options</h5>
<div class="level5">
<ul>
<li class="level1"><div class="li"> <strong>Resolution Rule</strong>: rule that will be applied to preselect an IDP for a user. You have access to all environment variable <em>(like user <abbr title="Internet Protocol">IP</abbr> address)</em> and all session keys.</div>
</li>
</ul>
<p>
For example, to preselect this IDP for users coming from 129.168.0.0/16 network and member of “admin” group:
</p>
<pre class="code">$ENV{REMOTE_ADDR} =~ /^192\.168/ and $groups =~ /\badmin\b/</pre>
</div>
<h5 id="authentication_request">Authentication request</h5>
<div class="level5">
<ul>
<li class="level1"><div class="li"> <strong>NameID format</strong>: force NameID format here (email, persistent, transient, etc.). If no value, will use first NameID Format activated in metadata.</div>
</li>
<li class="level1"><div class="li"> <strong>Force authentication</strong>: set ForceAuthn flag in authentication request</div>
</li>
<li class="level1"><div class="li"> <strong>Passive authentication</strong>: set IsPassive flag in authentication request</div>
</li>
<li class="level1"><div class="li"> <strong>Allow proxied authentication</strong>: allow an authentication response to be issued from another IDP that the one we register (proxy IDP). If you disallow this, you should also disallow direct login form IDP, because proxy restriction is set in authentication requests.</div>
</li>
<li class="level1"><div class="li"> <strong>Allow login from IDP</strong>: allow a user to connect directly from an IDP link. In this case, authentication is not a response to an issued authentication request, and we have less control on conditions.</div>
</li>
<li class="level1"><div class="li"> <strong>Requested authentication context</strong>: this context is declared in authentication request. When receiving the request, the real authentication context will be mapped to an internal authentication level (see <a href="samlservice.html#authentication_contexts" class="wikilink1" title="documentation:2.0:samlservice">how configure the mapping</a>), that you can check to allow or deny session creation.</div>
</li>
<li class="level1"><div class="li"> <strong>Allow <abbr title="Uniform Resource Locator">URL</abbr> as RelayState</strong>: Set to On if the RelayState value sent by IDP is the <abbr title="Uniform Resource Locator">URL</abbr> where the user must be redirected after authentication.</div>
</li>
</ul>
</div>
<h5 id="session">Session</h5>
<div class="level5">
<ul>
<li class="level1"><div class="li"> <strong>Adapt session lifetime</strong>: session lifetime will be adapted from <code>SessionNotOnOrAfter</code> value found in authentication response. It means that if the IDP propose to close session earlier than the default LemonLDAP::NG timeout, the session _utime will be modified so that session is erased at the date indicated by the IDP.</div>
</li>
<li class="level1"><div class="li"> <strong>Force UTF-8</strong>: this will force UTF-8 conversion of attributes values collected from IDP.</div>
</li>
<li class="level1"><div class="li"> <strong>Store <abbr title="Security Assertion Markup Language">SAML</abbr> Token</strong>: allows one to keep <abbr title="Security Assertion Markup Language">SAML</abbr> token (assertion) inside user session. Don&#039;t enable it unless you need to replay this token on an application.</div>
</li>
<li class="level1"><div class="li"> <strong>Attribute containing user identifier</strong>: set the value of <abbr title="Security Assertion Markup Language">SAML</abbr> attribute (“Name”) that should be used as user main identifier ($user). If empty, the NameID content is used.</div>
</li>
</ul>
</div>
<h5 id="signature">Signature</h5>
<div class="level5">
<p>
These options override service signature options (see <a href="samlservice.html#general_options" class="wikilink1" title="documentation:2.0:samlservice">SAML service configuration</a>).
</p>
<ul>
<li class="level1"><div class="li"> <strong>Sign <abbr title="Single Sign On">SSO</abbr> message</strong>: sign <abbr title="Single Sign On">SSO</abbr> message</div>
</li>
<li class="level1"><div class="li"> <strong>Check <abbr title="Single Sign On">SSO</abbr> message signature</strong>: check <abbr title="Single Sign On">SSO</abbr> message signature</div>
</li>
<li class="level1"><div class="li"> <strong>Sign SLO message</strong>: sign SLO message</div>
</li>
<li class="level1"><div class="li"> <strong>Check SLO message signature</strong>: check SLO message signature</div>
</li>
</ul>
</div>
<h5 id="binding">Binding</h5>
<div class="level5">
<ul>
<li class="level1"><div class="li"> <strong><abbr title="Single Sign On">SSO</abbr> binding</strong>: force binding to use for <abbr title="Single Sign On">SSO</abbr> (http-redirect, http-post, etc.)</div>
</li>
<li class="level1"><div class="li"> <strong>SLO binding</strong>: force binding to use for SLO (http-redirect, http-post, etc.)</div>
</li>
</ul>
<div class="noteclassic">If no binding defined, the default binding in IDP metadata will be used.
</div>
</div>
<h5 id="security">Security</h5>
<div class="level5">
<ul>
<li class="level1"><div class="li"> <strong>Encryption mode</strong>: set the encryption mode for this IDP (None, NameID or Assertion).</div>
</li>
<li class="level1"><div class="li"> <strong>Check time conditions</strong>: set to Off to disable time conditions checking on authentication responses.</div>
</li>
<li class="level1"><div class="li"> <strong>Check audience conditions</strong>: set to Off to disable audience conditions checking on authentication responses.</div>
</li>
</ul>
</div>
<h5 id="display">Display</h5>
<div class="level5">
<p>
Used only if you have more than 1 <abbr title="Security Assertion Markup Language">SAML</abbr> Identity Provider declared
</p>
<ul>
<li class="level1"><div class="li"> <strong>Display name</strong>: Name of the IDP</div>
</li>
<li class="level1"><div class="li"> <strong>Logo</strong>: Logo of the IDP</div>
</li>
<li class="level1"><div class="li"> <strong>Order</strong>: Number to sort IDP display</div>
</li>
</ul>
<div class="notetip">The chosen logo must be in Portal icons directory (<code>portal/static/common/icons/</code>). You can set a custom icon by setting the icon file name directly in the field and copy the logo file in portal icons directory
</div>
</div>
<!-- EDIT8 SECTION "Register partner Identity Provider on LemonLDAP::NG" [1807-] --></div>
</body>
</html>