2012-02-25 23:45:20 +01:00
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en"
lang="en" dir="ltr">
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< title > < / title >
<!-- metadata -->
< meta name = "generator" content = "Offline" / >
< meta name = "version" content = "Offline 0.1" / >
<!-- style sheet links -->
< link rel = "stylesheet" media = "all" type = "text/css" href = "../../../css/all.css" / >
< link rel = "stylesheet" media = "screen" type = "text/css" href = "../../../css/screen.css" / >
< link rel = "stylesheet" media = "print" type = "text/css" href = "../../../css/print.css" / >
< / head >
< body >
< div class = "dokuwiki export" >
2015-06-08 16:57:58 +02:00
< h1 class = "sectionedit1" id = "secure_token_handler" > Secure Token Handler< / h1 >
2012-02-25 23:45:20 +01:00
< div class = "level1" >
< / div >
2015-06-08 16:57:58 +02:00
<!-- EDIT1 SECTION "Secure Token Handler" [1 - 36] -->
< h2 class = "sectionedit2" id = "presentation" > Presentation< / h2 >
2012-02-25 23:45:20 +01:00
< div class = "level2" >
< p >
The Secure Token Handler is a special Handler that create a token for each request and send it to the protected application. The real user identifier is stored in a Memcached server and the protected application can the request the Memcached server to get user identifier.
< / p >
< p >
2015-06-08 16:57:58 +02:00
This mechanism allow to do < abbr title = "Single Sign On" > SSO< / abbr > on application with an unsafe link between Handler and the application, but with a safe link with the Memcached server.
2012-02-25 23:45:20 +01:00
< / p >
< / div >
2015-06-08 16:57:58 +02:00
<!-- EDIT2 SECTION "Presentation" [37 - 488] -->
< h2 class = "sectionedit3" id = "configuration" > Configuration< / h2 >
2012-02-25 23:45:20 +01:00
< div class = "level2" >
< / div >
2015-06-08 16:57:58 +02:00
<!-- EDIT3 SECTION "Configuration" [489 - 515] -->
2016-02-27 19:22:01 +01:00
< h3 class = "sectionedit4" id = "virtual_host" > Virtual host< / h3 >
2012-02-25 23:45:20 +01:00
< div class = "level3" >
2016-02-27 19:22:01 +01:00
< / div >
< h4 id = "apache" > Apache< / h4 >
< div class = "level4" >
2012-02-25 23:45:20 +01:00
< p >
2016-03-22 12:19:17 +01:00
Configure the virtual host like other < a href = "../../documentation/2.0/configvhost.html" class = "wikilink1" title = "documentation:2.0:configvhost" > protected virtual host< / a > but use Secure Token Handler instead of default Handler.
2012-02-25 23:45:20 +01:00
< / p >
2016-02-27 19:22:01 +01:00
< pre class = "code file apache" > PerlModule Lemonldap::NG::Handler::Specific::SecureToken
< < span class = "kw3" > VirtualHost< / span > *:< span class = "nu0" > 80< / span > >
2012-02-25 23:45:20 +01:00
< span class = "kw1" > ServerName< / span > secure.example.com
< span class = "co1" > # Load SecureToken Handler< / span >
2014-05-22 12:51:39 +02:00
PerlHeaderParserHandler Lemonldap::NG::Handler::Specific::SecureToken
2012-02-25 23:45:20 +01:00
...
< /< span class = "kw3" > VirtualHost< / span > > < / pre >
< / div >
2016-02-27 19:22:01 +01:00
< h4 id = "nginx" > Nginx< / h4 >
< div class = "level4" >
< p >
< p > < div class = "noteclassic" > This module uses Apache2 Filter and is not compatible with Nginx.
< / div > < / p >
< / p >
< / div >
<!-- EDIT4 SECTION "Virtual host" [516 - 1068] -->
2015-06-08 16:57:58 +02:00
< h3 class = "sectionedit5" id = "handler_parameters" > Handler parameters< / h3 >
2012-02-25 23:45:20 +01:00
< div class = "level3" >
< p >
2016-02-27 19:22:01 +01:00
SecureToken parameters are the following:
2012-02-25 23:45:20 +01:00
< / p >
< ul >
< li class = "level1" > < div class = "li" > < strong > Memcached servers< / strong > : addresses of Memcached servers, separated with spaces.< / div >
< / li >
< li class = "level1" > < div class = "li" > < strong > Token expiration< / strong > : time in seconds for token expiration (remove from Memcached server).< / div >
< / li >
< li class = "level1" > < div class = "li" > < strong > Attribute to store< / strong > : the session key that will be stored in Memcached.< / div >
< / li >
< li class = "level1" > < div class = "li" > < strong > Protected URLs< / strong > : Regexp of URLs for which the secure token will be sent, separated by spaces< / div >
< / li >
2015-06-08 16:57:58 +02:00
< li class = "level1" > < div class = "li" > < strong > Header name< / strong > : name of the HTTP header carrying the secure token.< / div >
2012-02-25 23:45:20 +01:00
< / li >
< li class = "level1" > < div class = "li" > < strong > Allow requests in error< / strong > : allow a request that has generated an error in token generation to be forwarded to the protected application without secure token (default: yes)< / div >
< / li >
< / ul >
2016-02-27 19:22:01 +01:00
< p >
< p > < div class = "noteimportant" >
Due to Handler < abbr title = "Application Programming Interface" > API< / abbr > change in 1.9, you need to set these attributes in < code > lemonldap-ng.ini< / code > and not in Manager, for example:
< / p >
< pre class = "code file ini" > < span class = "re0" > < span class = "br0" > [ < / span > handler< span class = "br0" > ] < / span > < / span >
< span class = "re1" > secureTokenMemcachedServers< / span > < span class = "sy0" > =< / span > < span class = "re2" > 127.0.0.1:11211< / span >
< span class = "re1" > secureTokenExpiration< / span > < span class = "sy0" > =< / span > < span class = "re2" > 60< / span >
< span class = "re1" > secureTokenAttribute< / span > < span class = "sy0" > =< / span > < span class = "re2" > uid< / span >
< span class = "re1" > secureTokenUrls< / span > < span class = "sy0" > =< / span > < span class = "re2" > .*< / span >
< span class = "re1" > secureTokenHeader< / span > < span class = "sy0" > =< / span > < span class = "re2" > Auth-Token< / span >
< span class = "re1" > secureTokenAllowOnError< / span > < span class = "sy0" > =< / span > < span class = "re2" > 1< / span > < / pre >
< p >
< / div > < / p >
< / p >
2012-02-25 23:45:20 +01:00
< / div >
2015-06-08 16:57:58 +02:00
< / div > <!-- closes <div class="dokuwiki export"> -->