增加 Authelia

This commit is contained in:
HPCesia 2024-11-17 17:01:02 +08:00
commit cd0b432d7a
7 changed files with 158 additions and 0 deletions

View File

@ -0,0 +1,38 @@
additionalProperties:
formFields:
- default: 9091
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: a_random_string_with_20_or_more_chars
envKey: PANEL_STORAGE_ENCRYPTION_KEY
labelEn: Storage encryption key
labelZh: 存储加密密钥
required: true
rule: paramComplexity
type: password
- default: a_random_alphanumeric_string_with_64_or_more_chars
envKey: PANEL_SESSION_SECRET
labelEn: Session password
labelZh: 会话加密密钥
required: true
rule: paramComplexity
type: password
- default: "a_random_alphanumeric_string_with_64_or_more_chars"
envKey: PANEL_RESET_PWD_SECRET
labelEn: Reset password secret
labelZh: 重置密码加密密钥
required: true
rule: paramComplexity
type: password
- default: Asia/Shanghai
edit: true
envKey: TIME_ZONE
labelEn: Time zone
labelZh: 时区
required: true
type: text

View File

@ -0,0 +1,51 @@
server:
address: "tcp://:9091"
authentication_backend:
file:
path: "/config/users_database.yml"
totp:
disable: false
issuer: "authelia.com"
identity_validation:
reset_password:
jwt_algorithm: "HS512"
session:
cookies:
- name: "authelia_session"
domain: "example.com"
authelia_url: "https://authelia.example.com"
expiration: "1 hour"
inactivity: "5 minutes"
remember_me: "1 week"
access_control:
default_policy: "deny"
rules:
- domain: "public.example.com"
policy: "bypass"
- domain: "private.example.com"
policy: "one_factor"
- domain: "secure.example.com"
policy: "two_factor"
regulation:
max_retries: 3
find_time: "2 minutes"
ban_time: "5 minutes"
storage:
local:
path: "/config/db.sqlite3"
notifier:
filesystem:
filename: "/config/notification.txt"
# smtp:
# username: 'test'
# password: 'password'
# address: 'smtp://mail.example.com:25'
# sender: 'admin@example.com'

View File

@ -0,0 +1,19 @@
---
###############################################################
# Users Database #
###############################################################
# This file can be used if you do not have an LDAP set up.
# List of users
users:
authelia:
disabled: false
displayname: "Authelia User"
# Password is authelia
password: "$6$rounds=50000$BpLnfgDsc2WD8F2q$Zis.ixdg9s/UOJYrs56b5QEZFiZECu0qZVNsIYxBaNJ7ucIL.nlxVCT5tqh8KHG8X4tlwCFm5r6NTOZZ5qRFN/"
email: authelia@authelia.com
groups:
- admins
- dev
...

View File

@ -0,0 +1,24 @@
services:
authelia:
container_name: ${CONTAINER_NAME}
image: authelia/authelia:4.38.17
restart: unless-stopped
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:9091"
volumes:
- ./data:/config
labels:
createdBy: "Apps"
environment:
- PUID=1000
- PGID=1000
- TZ=${TIME_ZONE}
- AUTHELIA_STORAGE_ENCRYPTION_KEY=${PANEL_STORAGE_ENCRYPTION_KEY}
- AUTHELIA_SESSION_SECRET=${PANEL_SESSION_SECRET}
- AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET=${PANEL_RESET_PWD_SECRET}
networks:
1panel-network:
external: true

6
authelia/README.md Normal file
View File

@ -0,0 +1,6 @@
## 简介
Authelia 是一个开源的身份验证和授权服务器,它通过 Web 界面提供应用程序的两因素认证2FA和单点登录SSO。它作为反向代理的伴侣能够允许、拒绝或重定向请求。
有关详细信息,请访问 https://www.authelia.com/。
## 配置

20
authelia/data.yml Normal file
View File

@ -0,0 +1,20 @@
name: Authelia
tags:
- 工具
title: 一个提供双因素认证和单点登录SSO的应用程序的开源身份验证和授权服务器
type: 工具
description: 一个提供双因素认证和单点登录SSO的应用程序的开源身份验证和授权服务器
additionalProperties:
key: authelia
name: Authelia
tags:
- Tool
shortDescZh: 一个提供双因素认证和单点登录SSO的应用程序的开源身份验证和授权服务器
shortDescEn: an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO)
type: tool
crossVersionUpdate: true
limit: 0
recommend: 0
website: https://www.authelia.com/
github: https://github.com/authelia/authelia/
document: https://www.authelia.com/

BIN
authelia/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB