Skip to content
Snippets Groups Projects
Commit 5d901886 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

added documentation on cas ldap auth module my mads

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@913 44740490-163a-0410-bde0-09ae8108e29a
parent bd49b0e8
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,12 @@ ...@@ -16,6 +16,12 @@
<email>andreas.solberg@uninett.no</email> <email>andreas.solberg@uninett.no</email>
</author> </author>
<author>
<firstname>Mads</firstname>
<surname>Freek</surname>
</author>
</articleinfo> </articleinfo>
<section> <section>
...@@ -194,14 +200,13 @@ ...@@ -194,14 +200,13 @@
<para>If this is multiple attributes, they will be joined into a <para>If this is multiple attributes, they will be joined into a
search query with the following form: search query with the following form:
<literal>(|(&lt;attr1&gt;=&lt;username&gt;)(&lt;attr2&gt;=&lt;username&gt;)...)</literal> <literal>(|(&lt;attr1&gt;=&lt;username&gt;)(&lt;attr2&gt;=&lt;username&gt;)...)</literal></para>
</para>
</listitem> </listitem>
<listitem> <listitem>
<para><literal>auth.ldap.search.username</literal>: The user we <para><literal>auth.ldap.search.username</literal>: The user we
should authenticate to the LDAP server as before searching. should authenticate to the LDAP server as before searching. Leave
Leave this as <literal>NULL</literal> if it isn't necessary to this as <literal>NULL</literal> if it isn't necessary to
authenticate to the server before searching.</para> authenticate to the server before searching.</para>
</listitem> </listitem>
...@@ -269,6 +274,171 @@ ...@@ -269,6 +274,171 @@
author.</para> author.</para>
</note> </note>
</section> </section>
<section>
<title>Configuring the 'login-CAS-LDAP' module for
authentication</title>
<para>If you want to connect your identity provider using either CAS or
CAS in combination with LDAP (for attribute retrieval), you may use the
login-cas-ldap module. It is found in
<filename>auth/login-cas-ldap.php</filename>.</para>
<para>The following parameters should be configured in
config/cas-ldap.php:</para>
<itemizedlist>
<listitem>
<para>make an entry for each identity provider using the identity ID
as key</para>
</listitem>
<listitem>
<para>you should make a sub entry with 'cas' as key and the
following parameters:</para>
<glosslist>
<glossentry>
<glossterm>login</glossterm>
<glossdef>
<para>the url of the login service of the CAS server</para>
</glossdef>
</glossentry>
</glosslist>
</listitem>
</itemizedlist>
<para>We recomment you always use 'renew=true'v to be able to comply
with a SAML2 'force-auth' request. In addition you may configure either
a 'validate' or a 'serviceValdate' (simpleSAMLphp supports both CAS
ver.1 and ver.2).</para>
<para>'validate' is the CAS ver.1 YES/NO\r&lt;username&gt;style
validation which only returns a user name to simpleSAMLphp and which
requires subsequent use of LDAP to retrieve the attributes. The value of
this parameter is the url of the validate service of the CAS
server.</para>
<para>'serviceValidate' is the url of the CAS servers' ver.2 validation.
In some cases the CAS server returns attributes in non-standard XML
format. The login-cas-ldap module allows you to map a list of attribute
names to Xpath expressions which are returned to simpleSAMLphp from the
auth-module. The list is named 'attributes' (see example for further
information).</para>
<para>If you want to use LDAP for retrieving attributes you should make
sub entry with 'ldap' as key and the following parameters:</para>
<glosslist>
<glossentry>
<glossterm>servers</glossterm>
<glossdef>
<para>a space separated list of urls in OpelLDAP format (see
example)</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>starttls</glossterm>
<glossdef>
<para>(set to true to secure (encrypt) the LDAP connection)</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>searchbase</glossterm>
<glossdef>
<para>the starting point for the LDAP search (simpleSAMLphp always
uses sub-tree search)</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>searchattributes</glossterm>
<glossdef>
<para>an array of attribute names to search for (when used in this
combination with CAS only one value is needed)</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>dnpattern</glossterm>
<glossdef>
<para>a pattern for a dn for the user where %username% is replaced
with the actual user name for constructing the dn of the users'
entry. If used no search for the user is performed and the
constructed dn is used in stead.</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>attributes</glossterm>
<glossdef>
<para>the list of attributes retrieved from the users'
entry</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>priv_user_dn (optional)</glossterm>
<glossdef>
<para>the dn of a priviliged user who is allowed to search and
read the whole LDAP sub-tree for the user if anonynous search and
read is not allowed</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>priv_user_pw (optional)</glossterm>
<glossdef>
<para>the password of the priviiliged user</para>
</glossdef>
</glossentry>
</glosslist>
<para>Samle configuration:</para>
<programlisting>$casldapconfig = array (
'idpentityid.example.org' =&gt; array(
'cas' =&gt; array(
'login' =&gt; 'https://idpentityid.example.org/cas/login',
'validate' =&gt; 'https://idpentityid.example.org/cas/validate',
),
'ldap' =&gt; array(
'servers' =&gt; 'idpentityid.example.org',
'enable_tls' =&gt; false,
'searchbase' =&gt; 'dc=example,dc=org',
'searchattributes' =&gt; 'uid',
'attributes' =&gt; array('cn', 'mail'),
),
),
'idpentityid2.example.org' =&gt; array(
'cas' =&gt; array(
'login' =&gt; 'https://idpentityid2.example.org/login',
'validate' =&gt; 'https://idpentityid2.example.org/validate',
),
'ldap' =&gt; array(
'servers' =&gt; 'ldap://idpentityid2.example.org',
'enable_tls' =&gt; false,
'searchbase' =&gt; 'ou=users,dc=example,dc=org',
'searchattributes' =&gt; array('uid', 'mail'), # array for being able to login with either uid or mail.
'attributes' =&gt; null,
'priv_user_dn' =&gt; 'uid=admin,ou=users,dc=example,dc=org',
'priv_user_pw' =&gt; 'xxxxx',
),
),
);</programlisting>
</section>
</section> </section>
<section> <section>
...@@ -783,8 +953,8 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt ...@@ -783,8 +953,8 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt
<glossterm>description</glossterm> <glossterm>description</glossterm>
<glossdef> <glossdef>
<para>A longer description of the SP. This can be a string, or an <para>A longer description of the SP. This can be a string, or
associative array with language code =&gt; translation an associative array with language code =&gt; translation
pairs.</para> pairs.</para>
</glossdef> </glossdef>
</glossentry> </glossentry>
...@@ -859,10 +1029,10 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt ...@@ -859,10 +1029,10 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt
<glossdef> <glossdef>
<para>The default behaviour of simpleSAMLphp is to sign the <para>The default behaviour of simpleSAMLphp is to sign the
Assertion element in the SAML 2.0 response sent to SPs. This Assertion element in the SAML 2.0 response sent to SPs. This
option allows you to override this behaviour on a per SP option allows you to override this behaviour on a per SP basis.
basis. Set this to <literal>TRUE</literal> to sign the Set this to <literal>TRUE</literal> to sign the Response
Response element. <literal>FALSE</literal> will make the SP element. <literal>FALSE</literal> will make the SP sign the
sign the Assertion. If this option is unset, the value from Assertion. If this option is unset, the value from
<literal>saml2.signresponse</literal> in <literal>saml2.signresponse</literal> in
<literal>config.php</literal> will be used. That value is <literal>config.php</literal> will be used. That value is
<literal>FALSE</literal> by default.</para> <literal>FALSE</literal> by default.</para>
...@@ -898,8 +1068,8 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt ...@@ -898,8 +1068,8 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt
<title>Scoped attributes</title> <title>Scoped attributes</title>
<para>It is possible to configure some attributes to be scoped, and <para>It is possible to configure some attributes to be scoped, and
include the Scope-attribute on the attribute values. This is enabled include the Scope-attribute on the attribute values. This is enabled by
by setting the <literal>scopedattributes</literal>-option in either setting the <literal>scopedattributes</literal>-option in either
<filename>shib13-sp-remote.php</filename> or <filename>shib13-sp-remote.php</filename> or
<filename>shib13-idp-hosted.php</filename>. If both are defined, the SP <filename>shib13-idp-hosted.php</filename>. If both are defined, the SP
configuration is used.</para> configuration is used.</para>
...@@ -913,7 +1083,7 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt ...@@ -913,7 +1083,7 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt
<programlisting>/* <programlisting>/*
* Example of scopedattributes option. Will use scoped attribute for eduPersonPrincipalName. * Example of scopedattributes option. Will use scoped attribute for eduPersonPrincipalName.
*/ */
'scopedattributes' => array('eduPersonPrincipalName'),</programlisting> 'scopedattributes' =&gt; array('eduPersonPrincipalName'),</programlisting>
</section> </section>
</section> </section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment