2013-10-15 10:11:39 +02:00
|
|
|
SSOwat
|
|
|
|
======
|
|
|
|
|
2013-10-16 11:59:48 +02:00
|
|
|
A simple LDAP SSO for nginx, written in Lua
|
2013-10-15 10:11:39 +02:00
|
|
|
|
2013-10-15 10:16:42 +02:00
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
2013-10-16 11:59:48 +02:00
|
|
|
- Nginx-extras from Debian wheezy-backports
|
2013-10-16 20:47:37 +02:00
|
|
|
- lua-json
|
2013-10-16 11:59:48 +02:00
|
|
|
- lua-ldap
|
2013-10-16 12:00:08 +02:00
|
|
|
|
2013-10-16 20:47:37 +02:00
|
|
|
**OR**
|
2013-10-16 12:00:08 +02:00
|
|
|
|
2013-10-16 11:59:48 +02:00
|
|
|
- Nginx "Openresty" flavored : http://openresty.org/
|
|
|
|
- lua-ldap
|
2013-10-15 10:16:42 +02:00
|
|
|
|
2013-10-16 20:47:37 +02:00
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
2013-10-16 20:50:02 +02:00
|
|
|
* Fetch the repository
|
2013-10-16 20:50:36 +02:00
|
|
|
|
2013-10-16 20:47:37 +02:00
|
|
|
```bash
|
|
|
|
git clone https://github.com/Kloadut/SSOwat /etc/ssowat
|
2013-10-16 20:50:02 +02:00
|
|
|
```
|
2013-10-16 20:50:36 +02:00
|
|
|
|
2013-10-16 20:50:02 +02:00
|
|
|
* Edit SSOwat configuration
|
2013-10-16 20:50:36 +02:00
|
|
|
|
2013-10-16 20:50:02 +02:00
|
|
|
```
|
2013-10-16 20:47:37 +02:00
|
|
|
nano /etc/ssowat/conf.json
|
|
|
|
```
|
|
|
|
|
|
|
|
Nginx conf
|
|
|
|
----------
|
2013-10-15 10:16:42 +02:00
|
|
|
|
2013-10-16 20:50:02 +02:00
|
|
|
* Add SSOwat's Nginx configuration
|
2013-10-16 20:50:36 +02:00
|
|
|
|
2013-10-16 20:47:37 +02:00
|
|
|
```bash
|
|
|
|
nano /etc/nginx/conf.d/ssowat.conf
|
|
|
|
```
|
2013-10-15 10:11:39 +02:00
|
|
|
|
2013-10-15 10:13:34 +02:00
|
|
|
```nginx
|
|
|
|
|
2013-10-16 20:47:37 +02:00
|
|
|
init_by_lua_file /etc/ssowat/init.lua;
|
|
|
|
access_by_lua_file /etc/ssowat/access.lua;
|
2013-10-15 10:11:39 +02:00
|
|
|
|
|
|
|
server {
|
2013-10-16 20:47:37 +02:00
|
|
|
listen 80; # Do not forget HTTPS for production
|
2013-10-15 10:11:39 +02:00
|
|
|
|
2013-10-16 20:50:02 +02:00
|
|
|
location /ssowat {
|
2013-10-16 20:47:37 +02:00
|
|
|
alias /etc/ssowat/portal;
|
2013-10-16 11:31:51 +02:00
|
|
|
default_type text/html;
|
2013-10-16 20:47:37 +02:00
|
|
|
index index.html;
|
2013-10-16 11:31:51 +02:00
|
|
|
}
|
2013-10-15 10:11:39 +02:00
|
|
|
}
|
|
|
|
|
2013-10-15 10:13:34 +02:00
|
|
|
```
|
2013-10-16 20:47:37 +02:00
|
|
|
|
|
|
|
**That's it !**
|