J'utilise docker compose.
J'ai effectué la mise à jour et reconfigurer l'ensemble vers les versions les plus récentes du :
- reverse proxy swag vers la version : 2.9.0-ls288
- authelia vers la version : authelia : 4.38.4
Cependant, authelia ne fait plus son job. Quand je saisie l'url du service en question par ex; portainer.monsite.duckdns.org j'arrive directement sur la page de connexion de portainer et non sur la page d'authentification d'authelia.
Alors que j'ai comme règle par defaut : deny, puis en fonction du service, soit le bypass ou le two-factor. Quand je saisi l'url directe d'authelia : auth.monsite.duckdns.org, j'arrive bien sur la page d'authentification.
Les logs indiquent rien de particulier. J'ai beau chercher, je ne comprends pas, ci-dessous les différentes configurations.
Si quelqu'un aurait une idée, une solution, en vous remerciant par avance pour votre aide. ---
---> Stacks authelia
services:
authelia:
image: authelia/authelia:latest
container_name: authelia
environment:
- TZ=Europe/Paris
- PUID=998
- PGID=100
volumes:
- /srv/dev-disk-by-uuid-c0e6c9e9-b147-402f-a8bb-xxxxxxxxxxx/docker/app/authelia/config:/config
expose:
- 9091
ports:
- 9091:9091
networks:
- swag
labels:
- diun.enable=true
restart: unless-stopped
networks:
swag:
name: swag
------> configuration.yml
# yamllint disable rule:comments-indentation
---
###############################################################################
# Authelia Configuration #
###############################################################################
theme: 'dark'
default_2fa_method: ''
server:
address: 'tcp://:9091/'
disable_healthcheck: false
headers:
csp_template: ''
log:
level: 'debug'
format: 'text'
file_path: '/config/authelia.log'
keep_stdout: false
telemetry:
metrics:
enabled: false
address: 'tcp://:9959/metrics'
totp:
disable: false
issuer: 'monsite.duckdns.org'
algorithm: 'SHA1'
digits: 6
period: 30
skew: 1
secret_size: 32
webauthn:
disable: false
timeout: '60 seconds'
display_name: 'Authelia'
attestation_conveyance_preference: 'indirect'
user_verification: 'preferred'
identity_validation:
reset_password:
# token_lifespan: '5 minutes'
# jwt_algorithm: 'HS256'
jwt_secret: 'xipA58Q3TaHg80Gi0I5oOrWerMfYsUFB16okvZgVx0v60jO318Kue2S3b0NNiNv'
ntp:
address: 'udp://time.cloudflare.com:123'
version: 4
max_desync: '3 seconds'
disable_startup_check: false
disable_failure: false
authentication_backend:
password_reset:
disable: false
custom_url: ''
refresh_interval: '5 minutes'
file:
path: '/config/users_database.yml' #le fichier est bien présent et configuré
watch: false
search:
email: false
case_insensitive: false
password:
algorithm: 'argon2'
argon2:
variant: 'argon2id'
iterations: 3
memory: 65536
parallelism: 4
key_length: 32
salt_length: 16
password_policy:
standard:
enabled: false
min_length: 8
max_length: 0
require_uppercase: true
require_lowercase: true
require_number: true
require_special: true
zxcvbn:
enabled: false
min_score: 3
access_control:
default_policy: 'deny'
networks:
- name: internal
networks:
- 10.10.0.0/16
- 192.168.1.0/24
rules:
- domain: '*.monsite.duckdns.org'
policy: one_factor
networks: internal
- domain:
- 'nextcloud.monsite.duckdns.org'
- 'collabora.monsite.duckdns.org'
policy: two_factor
- domain:
- '*.monsite.duckdns.org'
- 'portainer.monsite.duckdns.org'
policy: two_factor
session:
name: 'authelia_session'
same_site: 'lax'
inactivity: '5m'
expiration: '1h'
remember_me: '1M'
cookies:
- domain: 'monsite.duckdns.org'
authelia_url: 'https://auth.monsite.duckdns.org'
default_redirection_url: 'https://nextcloud.monsite.duckdns.org'
name: 'authelia_session'
same_site: 'lax'
inactivity: '5m'
expiration: '1h'
remember_me: '1d'
regulation:
max_retries: 3
find_time: '2 minutes'
ban_time: '5 minutes'
storage:
encryption_key: 'pQzrRCohlduF7tZeYkuLr12PrOKpFNKOPufrvSUxM5HJZT55Ru4n2iZn2iZvpa5Q'
local:
path: '/config/db.sqlite3'
notifier:
disable_startup_check: false
smtp:
address: 'smtp.monsite.fr:587'
timeout: '5 seconds'
username: 'username@site.fr'
password: 'zHyS-3z79aD-KN'
sender: "Authelia <username@site.fr"
subject: '[Authelia] {title}'
startup_check_address: 'username@site.fr'
...
------> portainer.subdomain.conf
## Version 2023/05/31
# make sure that your portainer container is named portainer
# make sure that your dns has a cname set for portainer
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name portainer.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth (requires ldap-location.conf in the location block)
#include /config/nginx/ldap-server.conf;
# enable for Authelia (requires authelia-location.conf in the location block)
include /config/nginx/authelia-server.conf;
# enable for Authentik (requires authentik-location.conf in the location block)
#include /config/nginx/authentik-server.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable for ldap auth (requires ldap-server.conf in the server block)
#include /config/nginx/ldap-location.conf;
# enable for Authelia (requires authelia-server.conf in the server block)
include /config/nginx/authelia-location.conf;
# enable for Authentik (requires authentik-server.conf in the server block)
#include /config/nginx/authentik-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app portainer;
set $upstream_port 9000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_hide_header X-Frame-Options; # Possibly not needed after Portainer 1.20.0
}
location ~ (/portainer)?/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app portainer;
set $upstream_port 9000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_hide_header X-Frame-Options; # Possibly not needed after Portainer 1.20.0
}
}
------> log du container authelia :
time="2024-03-19T21:23:09+01:00" level=debug msg="Loaded Configuration Sources" files="[/config/configuration.yml]" filters="[]"
time="2024-03-19T21:23:09+01:00" level=debug msg="Process user information" gid=998 uid=998
time="2024-03-19T21:23:09+01:00" level=info msg="Authelia v4.38.4 is starting"
time="2024-03-19T21:23:09+01:00" level=info msg="Log severity set to debug"