Authelia: увеличено время жизни сессии, Outline получает refresh token
- session cookies: inactivity 1 week, expiration 1 month, remember_me 3 months вместо дефолтных 5 минут / 1 часа / 1 месяца - клиенту outline-app выданы scope offline_access и grant refresh_token с кастомным lifespan (refresh token 3 месяца): без них ValidateSSOAccessTask не мог продлить access token и ротацией jwtSecret убивал все сессии Outline - consent_mode переведён в pre-configured, чтобы при повторном входе не показывался экран согласия
This commit is contained in:
@@ -875,16 +875,18 @@ session:
|
|||||||
## The inactivity time before the session is reset. If expiration is set to 1h, and this is set to 5m, if the user
|
## The inactivity time before the session is reset. If expiration is set to 1h, and this is set to 5m, if the user
|
||||||
## does not select the remember me option their session will get destroyed after 1h, or after 5m since the last
|
## does not select the remember me option their session will get destroyed after 1h, or after 5m since the last
|
||||||
## time Authelia detected user activity.
|
## time Authelia detected user activity.
|
||||||
# inactivity: '5 minutes'
|
## Дефолты (5 минут / 1 час) для личного сервера слишком агрессивны: любая пауза в работе
|
||||||
|
## заставляет логиниться заново. Держим сессию живой неделю простоя.
|
||||||
|
inactivity: "1 week"
|
||||||
|
|
||||||
## The time before the session cookie expires and the session is destroyed if remember me IS NOT selected by the
|
## The time before the session cookie expires and the session is destroyed if remember me IS NOT selected by the
|
||||||
## user.
|
## user.
|
||||||
# expiration: '1 hour'
|
expiration: "1 month"
|
||||||
|
|
||||||
## The time before the cookie expires and the session is destroyed if remember me IS selected by the user. Setting
|
## The time before the cookie expires and the session is destroyed if remember me IS selected by the user. Setting
|
||||||
## this value to -1 disables remember me for this session cookie domain. If allowed and the user uses the remember
|
## this value to -1 disables remember me for this session cookie domain. If allowed and the user uses the remember
|
||||||
## me checkbox this overrides the expiration option and disables the inactivity option.
|
## me checkbox this overrides the expiration option and disables the inactivity option.
|
||||||
# remember_me: '1 month'
|
remember_me: "3 months"
|
||||||
|
|
||||||
## Cookie Session Domain default 'name' value.
|
## Cookie Session Domain default 'name' value.
|
||||||
# name: 'authelia_session'
|
# name: 'authelia_session'
|
||||||
@@ -1370,13 +1372,17 @@ identity_providers:
|
|||||||
|
|
||||||
## The lifespans configure the expiration for these token types in the duration common syntax. In addition to this
|
## The lifespans configure the expiration for these token types in the duration common syntax. In addition to this
|
||||||
## syntax the lifespans can be customized per-client.
|
## syntax the lifespans can be customized per-client.
|
||||||
# lifespans:
|
## Дефолты: access_token '1 hour', authorize_code '1 minute', id_token '1 hour', refresh_token '90 minutes'.
|
||||||
## Configures the default/fallback lifespan for given token types. This behaviour applies to all clients and all
|
##
|
||||||
## grant types but you can override this behaviour using the custom lifespans.
|
## Outline раз в час (после каждого auth.info, если lastSignedInAt старше часа) запускает
|
||||||
# access_token: '1 hour'
|
## ValidateSSOAccessTask: обновляет access token по refresh token и дёргает userinfo. Если обновить
|
||||||
# authorize_code: '1 minute'
|
## не удалось — ротирует jwtSecret пользователя и убивает ВСЕ свои сессии, то есть выкидывает на
|
||||||
# id_token: '1 hour'
|
## повторный вход. С дефолтным refresh token в 90 минут это происходит почти при каждом визите.
|
||||||
# refresh_token: '90 minutes'
|
lifespans:
|
||||||
|
custom:
|
||||||
|
outline:
|
||||||
|
access_token: "1 hour"
|
||||||
|
refresh_token: "3 months"
|
||||||
|
|
||||||
## Cross-Origin Resource Sharing (CORS) settings.
|
## Cross-Origin Resource Sharing (CORS) settings.
|
||||||
# cors:
|
# cors:
|
||||||
@@ -1486,20 +1492,25 @@ identity_providers:
|
|||||||
# audience: []
|
# audience: []
|
||||||
|
|
||||||
## Scopes this client is allowed to request.
|
## Scopes this client is allowed to request.
|
||||||
|
## offline_access нужен, чтобы Authelia выдала refresh token: без него Outline не может
|
||||||
|
## продлить access token и убивает свою сессию (см. кастомный lifespan 'outline' выше).
|
||||||
scopes:
|
scopes:
|
||||||
- "openid"
|
- "openid"
|
||||||
- "profile"
|
- "profile"
|
||||||
- "email"
|
- "email"
|
||||||
|
- "offline_access"
|
||||||
|
|
||||||
## Grant Types configures which grants this client can obtain.
|
## Grant Types configures which grants this client can obtain.
|
||||||
## It's not recommended to define this unless you know what you're doing.
|
## It's not recommended to define this unless you know what you're doing.
|
||||||
# grant_types:
|
grant_types:
|
||||||
# - 'authorization_code'
|
- "authorization_code"
|
||||||
|
- "refresh_token"
|
||||||
|
|
||||||
## Response Types configures which responses this client can be sent.
|
## Response Types configures which responses this client can be sent.
|
||||||
## It's not recommended to define this unless you know what you're doing.
|
## It's not recommended to define this unless you know what you're doing.
|
||||||
# response_types:
|
## Задан явно: без этого Authelia ругается на scope 'offline_access'.
|
||||||
# - 'code'
|
response_types:
|
||||||
|
- "code"
|
||||||
|
|
||||||
## Response Modes configures which response modes this client supports.
|
## Response Modes configures which response modes this client supports.
|
||||||
# response_modes:
|
# response_modes:
|
||||||
@@ -1512,14 +1523,16 @@ identity_providers:
|
|||||||
|
|
||||||
## The custom lifespan name to use for this client. This must be configured independent of the client before
|
## The custom lifespan name to use for this client. This must be configured independent of the client before
|
||||||
## utilization. Custom lifespans are reusable similar to authorization policies.
|
## utilization. Custom lifespans are reusable similar to authorization policies.
|
||||||
# lifespan: ''
|
lifespan: "outline"
|
||||||
|
|
||||||
## The consent mode controls how consent is obtained.
|
## The consent mode controls how consent is obtained.
|
||||||
# consent_mode: 'auto'
|
## 'pre-configured' — согласие запоминается на pre_configured_consent_duration, поэтому при
|
||||||
|
## повторном входе экран согласия не показывается и редирект проходит незаметно.
|
||||||
|
consent_mode: "pre-configured"
|
||||||
|
|
||||||
## This value controls the duration a consent on this client remains remembered when the consent mode is
|
## This value controls the duration a consent on this client remains remembered when the consent mode is
|
||||||
## configured as 'auto' or 'pre-configured' in the duration common syntax.
|
## configured as 'auto' or 'pre-configured' in the duration common syntax.
|
||||||
# pre_configured_consent_duration: '1 week'
|
pre_configured_consent_duration: "3 months"
|
||||||
|
|
||||||
## Requires the use of Pushed Authorization Requests for this client when set to true.
|
## Requires the use of Pushed Authorization Requests for this client when set to true.
|
||||||
# require_pushed_authorization_requests: false
|
# require_pushed_authorization_requests: false
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ services:
|
|||||||
OIDC_USERINFO_URI: 'https://auth.vakhrushev.me/api/oidc/userinfo'
|
OIDC_USERINFO_URI: 'https://auth.vakhrushev.me/api/oidc/userinfo'
|
||||||
OIDC_LOGOUT_URI: 'https://auth.vakhrushev.me/logout'
|
OIDC_LOGOUT_URI: 'https://auth.vakhrushev.me/logout'
|
||||||
OIDC_USERNAME_CLAIM: 'email'
|
OIDC_USERNAME_CLAIM: 'email'
|
||||||
OIDC_SCOPES: 'openid profile email'
|
# offline_access — чтобы Authelia выдала refresh token. Без него Outline не может продлить
|
||||||
|
# access token, ValidateSSOAccessTask признаёт вход невалидным и сбрасывает все сессии.
|
||||||
|
OIDC_SCOPES: 'openid profile email offline_access'
|
||||||
OIDC_DISPLAY_NAME: 'Authelia'
|
OIDC_DISPLAY_NAME: 'Authelia'
|
||||||
|
|
||||||
SMTP_HOST: '{{ postbox_host }}'
|
SMTP_HOST: '{{ postbox_host }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user