The Single Sign-On Multi-Factor portal for web apps
 
 
 
 
 
Go to file
Clément Michaud 07ad16b454 Merge pull request #37 from clems4ever/hotfix-redirect
Fix redirection url sent by email during identity validation
2017-06-01 22:53:17 +02:00
doc Fix error on identity validation endpoints in documentation 2017-01-29 01:45:12 +01:00
example Remove '/authentication/' base path from endpoint URLs 2017-05-14 17:41:56 +02:00
images Update the README with U2F support and new screenshots 2017-01-29 16:42:50 +01:00
scripts Choose deployment based on tag or master branch depending on Travis env vars 2017-06-01 22:46:42 +02:00
src Fix redirection url sent by email during identity validation 2017-06-01 22:08:20 +02:00
test Fix redirection url sent by email during identity validation 2017-06-01 22:08:20 +02:00
.gitignore First step to typescript transformation 2017-05-20 16:00:47 +02:00
.travis.yml Use git tags as docker tags when publishing 2017-06-01 21:34:47 +02:00
CONTRIBUTORS.md Fix contributors link 2016-12-18 12:59:40 +01:00
Dockerfile Migrate server to typescript 2017-05-20 16:01:18 +02:00
Gruntfile.js Fix packaging in travis 2017-05-20 16:00:55 +02:00
LICENSE Adding README, LICENSE and CONTRIBUTORS files 2016-12-17 20:26:46 +01:00
README.md Edit README to make the user add more subdomains in /etc/hosts for testing the example locally 2017-03-25 19:10:59 +01:00
config.template.yml domain for cookie - issue in example 2017-04-08 19:14:57 -04:00
docker-compose.dev.yml Install libgif-dev in travisci environment 2017-01-28 22:54:27 +01:00
docker-compose.yml Add the access_control entry in the config file to allow the user to define per group rules to access the subdomains 2017-03-25 15:17:21 +01:00
package.json 2.1.9 2017-06-01 22:46:47 +02:00
tsconfig.json Finish migration to typescript 2017-05-21 22:45:54 +02:00
tslint.json First step to typescript transformation 2017-05-20 16:00:47 +02:00

README.md

Authelia

license Build

Authelia is a complete HTTP 2-factor authentication server for proxies like nginx. It has been made to work with NGINX auth_request module and is currently used in production to secure internal services in a small docker swarm cluster.

Features

  • Two-factor authentication using either TOTP - Time-Base One Time password - or U2F - Universal 2-Factor - as 2nd factor.
  • Password reset with identity verification by sending links to user email address.
  • Access restriction after too many authentication attempts.

Deployment

If you don't have any LDAP and nginx setup yet, I advise you to follow the Getting Started. That way, you will not require anything to start.

Otherwise here are the available steps to deploy on your machine.

With NPM

npm install -g authelia

With Docker

docker pull clems4ever/authelia

Getting started

The provided example is docker-based so that you can deploy and test it very quickly. First clone the repo make sure you don't have anything listening on port 8080 before starting. Add the following lines to your /etc/hosts to simulate multiple subdomains

127.0.0.1       secret.test.local
127.0.0.1       secret1.test.local
127.0.0.1       secret2.test.local
127.0.0.1       home.test.local
127.0.0.1       mx1.mail.test.local
127.0.0.1       mx2.mail.test.local
127.0.0.1       auth.test.local

Then, type the following command to build and deploy the services:

docker-compose build
docker-compose up -d

After few seconds the services should be running and you should be able to visit https://home.test.local:8080/.

Normally, a self-signed certificate exception should appear, it has to be accepted before getting to the login page:

first-factor-page

1st factor: LDAP and ACL

An LDAP server has been deployed for you with the following credentials and access control list:

Type them in the login page and validate. Then, the second factor page should have appeared as shown below.

second-factor-page

2nd factor: TOTP (Time-Base One Time Password)

In Authelia, you need to register a per user TOTP secret before authenticating. To do that, you need to click on the register button. It will send a link to the user email address. Since this is an example, no email will be sent, the link is rather delivered in the file ./notifications/notification.txt. Paste the link in your browser and you'll get your secret in QRCode and Base32 formats. You can use Google Authenticator to store them and get the generated tokens required during authentication.

totp-secret

2nd factor: U2F (Universal 2-Factor) with security keys

Authelia also offers authentication using U2F devices like Yubikey USB security keys. U2F is one of the most secure authentication protocol and is already available for accounts on Google, Facebook, Github and more.

Like TOTP, U2F requires you register your security key before authenticating with it. To do so, click on the register button. This will send a link to the user email address. Since this is an example, no email will be sent, the link is rather delivered in the file ./notifications/notification.txt. Paste the link in your browser and you'll be asking to touch the token of your device to register it. You can now authenticate using your U2F device by simply touching the token.

u2f-validation

Password reset

With Authelia, you can also reset your password in no time. Click on the according button in the login page, provide the username of the user requiring a password reset and Authelia will send an email with an link to the user email address. For the sake of the example, the email is delivered in the file ./notifications/notification.txt. Paste the link in your browser and you should be able to reset the password.

Access Control

With Authelia, you can define your own access control rules for restricting the access to certain subdomains to your users. Those rules are defined in the configuration file and can be either default, per-user or per-group policies. Check out the config.template.yml to see how they are defined.

Documentation

Configuration

The configuration of the server is defined in the file configuration.template.yml. All the details are documented there. You can specify another configuration file by giving it as first argument of Authelia.

authelia config.custom.yml

API documentation

There is a complete API documentation generated with apiDoc and embedded in the repo under the doc/ directory. Simply open index.html locally to watch it.

Contributing to Authelia

Follow contributing file.

License

Authelia is licensed under the MIT License. The terms of the license are as follows:

The MIT License (MIT)

Copyright (c) 2016 - Clement Michaud

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.