test: add local dev authelia
This commit is contained in:
parent
d0dd3d81dd
commit
fe40fbf6b2
7 changed files with 1776 additions and 3 deletions
41
Makefile
Normal file
41
Makefile
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
SHELL := bash
|
||||||
|
.ONESHELL:
|
||||||
|
.SHELLFLAGS := -eu -o pipefail -c
|
||||||
|
.DELETE_ON_ERROR:
|
||||||
|
MAKEFLAGS += --warn-undefined-variables
|
||||||
|
MAKEFLAGS += --no-builtin-rules
|
||||||
|
|
||||||
|
PWD := $(shell pwd)
|
||||||
|
AUTHELIA_HOME := ${PWD}/dev/authelia
|
||||||
|
AUTHELIA_CONFIG := ${AUTHELIA_HOME}/config/configuration.yml
|
||||||
|
|
||||||
|
AUTHELIA_LOG := ${PWD}/tmp/authelia.log
|
||||||
|
AUTHELIA_PID := ${PWD}/tmp/authelia.pid
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean: authelia-stop
|
||||||
|
rm -rf ${AUTHELIA_LOG}
|
||||||
|
|
||||||
|
.PHONY: authelia-restart
|
||||||
|
authelia-restart:
|
||||||
|
${MAKE} authelia-stop
|
||||||
|
${MAKE} authelia-start
|
||||||
|
|
||||||
|
.PHONY: authelia-start
|
||||||
|
authelia-start: ${AUTHELIA_PID}
|
||||||
|
|
||||||
|
${AUTHELIA_PID}: ${AUTHELIA_CONFIG}
|
||||||
|
mkdir -p ${AUTHELIA_HOME}/tmp/
|
||||||
|
cd ${AUTHELIA_HOME}
|
||||||
|
authelia --config ${AUTHELIA_CONFIG} &> ${AUTHELIA_LOG} &
|
||||||
|
echo $$! > ${AUTHELIA_PID}
|
||||||
|
|
||||||
|
.PHONY: authelia-log
|
||||||
|
authelia-log:
|
||||||
|
less ${AUTHELIA_LOG}
|
||||||
|
|
||||||
|
.PHONY: authelia-stop
|
||||||
|
authelia-stop: PID = $(shell cat ${AUTHELIA_PID})
|
||||||
|
authelia-stop:
|
||||||
|
rm -rf ${AUTHELIA_PID}
|
||||||
|
kill -9 ${PID}
|
||||||
1693
dev/authelia/config/configuration.yml
Normal file
1693
dev/authelia/config/configuration.yml
Normal file
File diff suppressed because it is too large
Load diff
BIN
dev/authelia/config/db.sqlite3
Normal file
BIN
dev/authelia/config/db.sqlite3
Normal file
Binary file not shown.
0
dev/authelia/config/notification.txt
Normal file
0
dev/authelia/config/notification.txt
Normal file
37
dev/authelia/config/users_database.yml
Normal file
37
dev/authelia/config/users_database.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
# yamllint disable rule:line-length
|
||||||
|
---
|
||||||
|
###############################################################
|
||||||
|
# Users Database #
|
||||||
|
###############################################################
|
||||||
|
|
||||||
|
# This file can be used if you do not have an LDAP set up.
|
||||||
|
|
||||||
|
users:
|
||||||
|
authelia:
|
||||||
|
disabled: false
|
||||||
|
displayname: "Test User"
|
||||||
|
password: "$argon2id$v=19$m=32768,t=1,p=8$eUhVT1dQa082YVk2VUhDMQ$E8QI4jHbUBt3EdsU1NFDu4Bq5jObKNx7nBKSn1EYQxk" # Password is 'authelia'
|
||||||
|
email: authelia@authelia.com
|
||||||
|
groups:
|
||||||
|
- admins
|
||||||
|
- dev
|
||||||
|
given_name: 'Robert'
|
||||||
|
family_name: 'Zimmerman'
|
||||||
|
middle_name: 'Allen'
|
||||||
|
nickname: 'Bob'
|
||||||
|
profile: 'https://en.wikipedia.org/wiki/Bob_Dylan'
|
||||||
|
picture: 'https://kelvinokaforart.com/wp-content/uploads/2023/01/Bob-Dylan.jpg'
|
||||||
|
website: 'https://www.bobdylan.com/'
|
||||||
|
gender: 'male'
|
||||||
|
birthdate: '1941-05-24'
|
||||||
|
zoneinfo: 'America/Chicago'
|
||||||
|
locale: 'en-US'
|
||||||
|
phone_number: '+1 (425) 555-1212'
|
||||||
|
phone_extension: '1000'
|
||||||
|
address:
|
||||||
|
street_address: '2-3 Kitanomarukoen'
|
||||||
|
locality: 'Chiyoda City'
|
||||||
|
region: 'Tokyo'
|
||||||
|
postal_code: '102-8321'
|
||||||
|
country: 'Japan'
|
||||||
|
# yamllint enable rule:line-length
|
||||||
|
|
@ -21,6 +21,8 @@
|
||||||
next-ls
|
next-ls
|
||||||
|
|
||||||
sqlite
|
sqlite
|
||||||
|
gnumake
|
||||||
|
authelia
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isLinux [
|
++ lib.optionals stdenv.isLinux [
|
||||||
# For ExUnit Notifier on Linux.
|
# For ExUnit Notifier on Linux.
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,10 @@ defmodule Putzplan.Accounts.User do
|
||||||
strategies do
|
strategies do
|
||||||
oidc :oidc do
|
oidc :oidc do
|
||||||
client_id "putzplan"
|
client_id "putzplan"
|
||||||
base_url "http://localhost:8080/realms/master/"
|
base_url "http://127.0.0.1:9091"
|
||||||
client_secret "Kc3DkJiIrIr59HQhDmneqqB3iy6H8gxH"
|
client_secret "insecure_secret"
|
||||||
nonce true
|
nonce true
|
||||||
redirect_uri "http://localhost:4000/auth"
|
redirect_uri "http://127.0.0.1:4000/auth"
|
||||||
authorization_params [scope: "profile email"]
|
authorization_params [scope: "profile email"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue