• Stars
    star
    231
  • Rank 172,488 (Top 4 %)
  • Language
    Lua
  • License
    GNU Affero Genera...
  • Created almost 11 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple SSO for NGINX, written in Lua

SSOwat

A simple LDAP SSO for NGINX, written in Lua.

Translation status

Issues

Requirements

  • nginx-extras from Debian wheezy-backports
  • lua-json
  • lua-ldap
  • lua-filesystem
  • lua-socket
  • lua-rex-pcre

OR

Installation

  • Fetch the repository
git clone https://github.com/YunoHost/SSOwat /etc/ssowat

NGINX configuration

  • Add SSOwat's NGINX configuration (http{} scope)
nano /etc/nginx/conf.d/ssowat.conf
lua_shared_dict cache 10m;
init_by_lua_file   /etc/ssowat/init.lua;
access_by_lua_file /etc/ssowat/access.lua;

You can also put the access_by_lua_file directive in a server{} scope if you want to protect only a vhost.

SSOwat configuration

mv /etc/ssowat/conf.json.example /etc/ssowat/conf.json
nano /etc/ssowat/conf.json

If you use YunoHost, you may want to edit the /etc/ssowat/conf.json.persistent file, since the /etc/ssowat/conf.json will often be overwritten.

Available parameters

Only the portal_domain SSOwat configuration parameters is required, but it is recommended to know the others to fully understand what you can do with it.


portal_domain

Domain of the authentication portal. It has to be a domain, IP addresses will not work with SSOwat (Required).


portal_path

URI of the authentication portal (default: /ssowat/). This path must end with “/”.


portal_port

Web port of the authentication portal (default: 443 for https, 80 for http).


portal_scheme

Whether authentication should use secure connection or not (default: https).


domains

List of handled domains (default: similar to portal_domain).


ldap_host

LDAP server hostname (default: localhost).


ldap_group

LDAP group to search in (default: ou=users,dc=yunohost,dc=org).


ldap_identifier

LDAP user identifier (default: uid).


ldap_attributes

User's attributes to fetch from LDAP (default: ["uid", "givenname", "sn", "cn", "homedirectory", "mail", "maildrop"]).


ldap_enforce_crypt

Let SSOwat re-encrypt weakly-encrypted LDAP passwords into the safer sha-512 (crypt) (default: true).


allow_mail_authentication

Whether users can authenticate with their mail address (default: true).


login_arg

URI argument to use for cross-domain authentication (default: sso_login).


additional_headers

Array of additionnal HTTP headers to set once user is authenticated (default: { "Remote-User": "uid" }).


session_timeout

The session expiracy time limit in seconds, since the last connection (default: 86400 / one day).


session_max_timeout

The session expiracy time limit in seconds (default: 604800 / one week).


redirected_urls

Array of URLs and/or URIs to redirect and their redirect URI/URL (example: { "/": "example.org/subpath" }).


redirected_regex

Array of regular expressions to be matched against URLs and URIs and their redirect URI/URL (example: { "example.org/megusta$": "example.org/subpath" }).


default_language

Language code used by default in views (default: en).


permissions

The list of permissions depicted as follows:

"myapp.main": {
    "auth_header": true,
    "label": "MyApp",
    "public": true,
    "show_tile": true,
    "uris": [
        "example.tld/myapp"
    ],
    "users": [
        "JaneDoe",
        "JohnDoe"
    ]
},
"myapp.admin": {
    "auth_header": true,
    "label": "MyApp (admin)",
    "public": false,
    "show_tile": false,
    "uris": [
        "example.tld/myapp/admin"
    ],
    "users": [
        "JaneDoe"
    ]
},
"myapp.api": {
    "auth_header": false,
    "label": "MyApp (api)",
    "public": true,
    "show_tile": false,
    "uris": [
        "re:domain%.tld/%.well%-known/.*"
    ],
    "users": []
}

auth_header

Does the SSO add an authentication header that allows certain apps to connect automatically? (True by default)

label

A user-friendly name displayed in the portal and in the administration panel to manage permission. (By convention it is of the form: Name of the app (specificity of this permission))

public

Can a person who is not connected to the SSO have access to this authorization?

show_tile

Display or not the tile in the user portal.

uris

A list of url attatched to this permission, a regex url start with re:.

users

A list of users which is allowed to access to this permission. If public.

More Repositories

1

yunohost

YunoHost is an operating system aiming to simplify as much as possible the administration of a server. This repository corresponds to the core code, written mostly in Python and Bash.
Python
2,012
star
2

apps

YunoHost apps catalog
Python
197
star
3

doc

YunoHost documentation
SCSS
145
star
4

yunohost-admin

Web administration interface for YunoHost
Vue
88
star
5

install_script

YunoHost installation scripts
Shell
73
star
6

issues

General issue tracker for the YunoHost project
71
star
7

example_ynh

Example package for YunoHost applications.
Shell
60
star
8

project-organization

YunoHost project organization
TeX
36
star
9

moulinette

A small Python framework meant to easily create programs with unified CLI and API.
Python
35
star
10

ynh-dev

Dev environement wrapper, based on Incus, to develop on YunoHost
Shell
35
star
11

package_check

Shell script which check package actions: install, remove, upgrade, backup, restore…
Shell
21
star
12

package_linter

Linter for YunoHost applications packages
Python
17
star
13

tartiflette

A delicious dashboard for YunoHost stuff
Python
17
star
14

yunorunner

Job manager/scheduler for YunoHost apps CI tests
Python
14
star
15

pepettes

HTML
12
star
16

dynette

YunoHost DynDNS Server
Python
12
star
17

Vagrantfile

Vagrantfile to create yunohost box jessie/wheezy and stable/testing/unstable
Ruby
8
star
18

cd_build_v1

SimpleCDD build scripts for YunoHost
Shell
8
star
19

packages_old

[not used anymore] YunoHost Debian package sources
Python
8
star
20

vinaigrette

Build those damn .deb's
Shell
7
star
21

doyunohost

Digital Ocean deployment script
Python
6
star
22

Kremlin

YunoHost VPS deployer for comrades
Python
6
star
23

inside-yunohost

How does YunoHost work - https://yunohost.github.io/inside-yunohost/
CSS
5
star
24

CI_package_check

Shell
5
star
25

apps_v1

PHP
5
star
26

yunohost-ci

CI for YunoHost
Shell
5
star
27

install-app

Install to YunoHost - widget and page
JavaScript
5
star
28

YunoPorts

Tool to display opened ports on YunoHost instances
PHP
5
star
29

build.yunohost.org

The page with all YunoHost Images
HTML
4
star
30

yunotest

Tests for YunoHost
Python
3
star
31

ci

prototype ci using vagrant
Python
3
star
32

check-http

small server to check if a yunohost instance is reachable via http for LE check
Python
3
star
33

transpay

Somehow fork of https://gitlab.kokakiwi.net/transposees/transpay/ to update it for our needs
Python
3
star
34

yunohost-cdl-2017

JimboJoe's presentation of YunoHost at 2017 Capitole du Libre - Slides are under CC-BY-SA (images might not all be)
2
star
35

cd_build

SimpleCDD build scripts for YunoHost
Shell
2
star
36

clinette

Command line client for DynDns admin operation
Shell
2
star
37

yunohost-fosdem-2019

Talk at FOSDEM 2019 by Aleks
CSS
2
star
38

yunohost-portal

YunoHost portal using Nuxt.js
Vue
2
star
39

yunohost-fosdem-2017

Bram's presentation of YunoHost at 2017 FOSDEM - Slides are under CC-BY-SA (images might not all be)
HTML
2
star
40

test_apps

Dummy apps designed for unit tests of Yunohost
Shell
2
star
41

news

YunoHost community news
2
star
42

yunohost-artwork

🎨 YunoHost related logos and artwork
1
star
43

weblate2xmpp

display in our devroom when a % of translated strings has changed on weblate
Python
1
star
44

forum2xmpp

Send message on XMPP chatroom about new post from Discourse forum
Python
1
star
45

webhooks

github's webhooks endpoint to get alertes on matrix
Python
1
star
46

moulinette_ruby

Ruby
1
star
47

yunohost_demo

Shell
1
star
48

yunohost-jdll-2022

Conférence et atelier aux JDLL 2022
HTML
1
star
49

yunohost-debootstrap

Debootstrap script for yunohost
1
star
50

lxd_img_builder

Shell
1
star
51

yunohost-pses-2017

Aleks and ljf's presentation of YunoHost at 2017 PSES - Slides are under CC-BY-SA (images might not all be)
1
star
52

lal

Web list of YunoHost apps
CSS
1
star
53

ypac

Python
1
star
54

m18nify

a tool to ease the applying of m18n.n utilitary on yunohost's source code
Python
1
star
55

dynette-admin

Admin interface for dynette
JavaScript
1
star