DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:adfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:adfs [2015-05-22 14:58] – version upped andiplugin:adfs [2024-03-12 14:27] (current) – question added asheenlevrai
Line 1: Line 1:
-====== adfs Plugin ======+====== ADFS Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 6: Line 6:
 email      : andi@splitbrain.org  email      : andi@splitbrain.org 
 type       : auth type       : auth
-lastupdate : 2015-04-29 +lastupdate : 2020-10-22 
-compatible : hrun+compatible : Hrun, Greebo, Hogfather
 depends    :  depends    : 
 conflicts  conflicts 
Line 15: Line 15:
 downloadurl: https://github.com/cosmocode/dokuwiki-plugin-adfs/zipball/master downloadurl: https://github.com/cosmocode/dokuwiki-plugin-adfs/zipball/master
 bugtracker : https://github.com/cosmocode/dokuwiki-plugin-adfs/issues bugtracker : https://github.com/cosmocode/dokuwiki-plugin-adfs/issues
-sourcerepo : https://github.com/cosmocode/dokuwiki-plugin-adfs/+sourcerepo : https://github.com/cosmocode/dokuwiki-plugin-adfs
 donationurl:  donationurl: 
  
 screenshot_img :  screenshot_img : 
 ---- ----
 +
 +The plugin was tested with Active Directory Federation Services on Windows Server 2008 and 2010. It might work with other SAML2 based Identity Providers, too. Users have reported it to work with SimpleSAMLphp and Okta.
 +
 +The plugin makes use of the [[https://github.com/onelogin/php-saml|php-saml]] library version 2.13.0 (included in the download).
  
 ===== Installation ===== ===== Installation =====
  
-[[http://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]+[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ==== Setup ADFS with SAML 2.0 ==== ==== Setup ADFS with SAML 2.0 ====
  
-The plugin was tested with Windows Server 2008. Please note that there is an updated version of the Federation Services for Windows Server 2008 that have to be **dowloaded separately**: [[http://www.microsoft.com/en-us/download/details.aspx?id=10909|Download them from Microsoft]].+Before you start, make sure you have a SSL certificate for the Federation Server and the WikiADFS requires SSL and will not withoutSelf-signed certificates will work, but a browser trusted ones is recommended for real-world usage.
  
-Run the installer and follow the wizard to set up the Federation Services, IIS and the needed certificate. For real world use a certificate signed by a well-known Authority is recommended but not needed. A self-signed one will work too.+**Windows Server 2008**: [[http://www.microsoft.com/en-us/download/details.aspx?id=10909|Download the updated Federation Services]] from Microsoft. Do not use the ones that come with the OS. Run the Installer and follow the wizard to set up the Federation Services, IIS and the needed certificate. 
  
-Your wiki has to be SSL secured as wellADFS will refuse to work without SSL! A browser accepted certificate is highly recommended.+**Windows Server 2010**: Open the Server Manager, select "Add roles and Features" and select "Active Directory Federation Services" from the list of Server roles. IIS is no longer required!
  
-Once the services are set up, add a new **Relying Party Trust** in the ADFS snap-in.+Once the services are set up, add a new **Relying Party Trust** in the ADFS snap-in (AD FS Management):
  
 For configuration use the following **Federation metadata address**: ''%%https://yourwiki/doku.php?do=adfs%%'' where ''yourwiki'' is your wiki server's address of course. For configuration use the following **Federation metadata address**: ''%%https://yourwiki/doku.php?do=adfs%%'' where ''yourwiki'' is your wiki server's address of course.
Line 41: Line 45:
 Enter any name and description, and select **Permit all users to access this relying party**. Enter any name and description, and select **Permit all users to access this relying party**.
  
-Finally run the **Edit Claim Rules** dialog. Add a new "Issuance Transform Rule" and pick "Send LDAP Attributes as Claims". Add the follwing:+Finally run the **Edit Claim Rules** dialog. Add a new "Issuance Transform Rule" and pick "Send LDAP Attributes as Claims". Add the following:
  
   * Claim rule name: User Attributes   * Claim rule name: User Attributes
Line 47: Line 51:
   * Mapping of LDAP attributes ((you have to type the right side, these names are not in the dropdown)):   * Mapping of LDAP attributes ((you have to type the right side, these names are not in the dropdown)):
     * User-Principal-Name -> ''login''     * User-Principal-Name -> ''login''
-    * E-Mail-Addresses -> ''mail''+    * E-Mail-Addresses -> ''email''
     * Token-Groups - unqualified Names -> ''groups''     * Token-Groups - unqualified Names -> ''groups''
     * Display-Name -> ''fullname''     * Display-Name -> ''fullname''
Line 53: Line 57:
 ==== Configure the Plugin ==== ==== Configure the Plugin ====
  
-There are two settings to configure in the [[plugin:config|Configuration Manager]]:+There are multiple settings to configure in the [[plugin:config|Configuration Manager]]. The easiest way to figure out what values to set is to use the "ADFS Configuration Helper" in the Admin interface - feed it your ADFS' metadata file and it will show you the correct values. Alternatively use the descriptions below.
  
-  * ''endpoint'' this is where your ADFS server provides the SAML 2.0 endpoint. It's usually ''%%https://<youradfs>/adfs/ls/%%'' +| ''idPEntityID'' | the EntityID your ADFS server identifies as. If you leave it at a random string, you will get an error telling you the correct ID | 
-  ''certificate'' this is the certificate you set up for the ADFS Server above+''endpoint'' this is where your ADFS server provides the SAML 2.0 endpoint. It's usually ''%%https://<youradfs>/adfs/ls/%%'' | 
 +''certificate'' this is the certificate you set up for the ADFS Server above. You can find the certificate in an XML file that is usually found under %%''https://<youradfs>/FederationMetadata/2007-06/FederationMetadata.xml''%%. Look for ''<IDPSSODescriptor *>'' -> ''<KeyDescriptor use="signing">'' -> ''<X509Certificate>''. It should be a long string of characters. Just paste that into the config. Make sure you use the signing key and not the encryption one. | 
 +| ''lowercase'' | ActiveDirectory is usually case insensitive, this means you can login as "Foo" or "foo". To make administration in the Wiki easier, both instances will be converted to "foo". Disable this option if your SAML provider is case-sensitive. | 
 +| ''autoprovisioning'' | By default the wiki will let in everyone who successfully authenticated via ADFS. When you disable this option you have to create the users manually in the wiki before they can login via ADFS. | 
 +| ''*_attr_name'' | These options configure the attributes where login, name, email and groups of users are read from. The correspondent to the names you set up in the //Claim Rules// above. |
  
-You can find the certificate in an XML file that is usually found under %%''https://<youradfs>/FederationMetadata/2007-06/FederationMetadata.xml''%%. Look for ''<IDPSSODescriptor *>'' -> ''<KeyDescriptor use="signing">'' -> ''<X509Certificate>''. It should be a long string of characters. Just paste that into the config. Make sure you use the signing key and not the encryption one.+Please make sure your users have valid email addresses set in the Active Directory! Otherwise certain DokuWiki features may not work for them. 
 + 
 +Once everything is set up, you can switch the [[config:authtype|authtype]] to ''adfs''.
  
-Once everything is set up you can switch the [[config:authtype|authtype]] to ''adfs''.+Be sure to configure a [[config:superuser]] from your Active Directory, so you can login as admin later on.
  
 +Important: make sure your Wiki and ADFS Server have the correct time! They may only drift apart by three minutes maximum or login will not work.
 ===== Usage ===== ===== Usage =====
  
-Clicking the login button will bring up the ADFS login formUsers can login with their Active Directory user name there and will be redirected to the wiki. If setup correctly, the ADFS form will use Single-Sign-On to log users in automatically.+Clicking the login button will redirect users to your ADFS serverThe server might automatically log in users using Single-Sign-On or simply provide a form where users can provide their Active Directory credentials.
  
-The login will be remembered by the wiki. Unless they log out explicitly subsequent visits will trigger the login process automatically. 
  
-Please make sure your users have valid email addresses set in the Active Directory! Otherwise certain DokuWiki features may not work for them.+===== Questions ===== 
 + 
 +2024-03-12 : Is this plugin still currently maintained? 
plugin/adfs.1432299533.txt.gz · Last modified: 2015-05-22 14:58 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki