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
|
||||
## 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.
|
||||
# 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
|
||||
## 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
|
||||
## 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.
|
||||
# remember_me: '1 month'
|
||||
remember_me: "3 months"
|
||||
|
||||
## Cookie Session Domain default 'name' value.
|
||||
# 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
|
||||
## syntax the lifespans can be customized per-client.
|
||||
# lifespans:
|
||||
## 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.
|
||||
# access_token: '1 hour'
|
||||
# authorize_code: '1 minute'
|
||||
# id_token: '1 hour'
|
||||
# refresh_token: '90 minutes'
|
||||
## Дефолты: access_token '1 hour', authorize_code '1 minute', id_token '1 hour', refresh_token '90 minutes'.
|
||||
##
|
||||
## Outline раз в час (после каждого auth.info, если lastSignedInAt старше часа) запускает
|
||||
## ValidateSSOAccessTask: обновляет access token по refresh token и дёргает userinfo. Если обновить
|
||||
## не удалось — ротирует jwtSecret пользователя и убивает ВСЕ свои сессии, то есть выкидывает на
|
||||
## повторный вход. С дефолтным refresh token в 90 минут это происходит почти при каждом визите.
|
||||
lifespans:
|
||||
custom:
|
||||
outline:
|
||||
access_token: "1 hour"
|
||||
refresh_token: "3 months"
|
||||
|
||||
## Cross-Origin Resource Sharing (CORS) settings.
|
||||
# cors:
|
||||
@@ -1486,20 +1492,25 @@ identity_providers:
|
||||
# audience: []
|
||||
|
||||
## Scopes this client is allowed to request.
|
||||
## offline_access нужен, чтобы Authelia выдала refresh token: без него Outline не может
|
||||
## продлить access token и убивает свою сессию (см. кастомный lifespan 'outline' выше).
|
||||
scopes:
|
||||
- "openid"
|
||||
- "profile"
|
||||
- "email"
|
||||
- "offline_access"
|
||||
|
||||
## Grant Types configures which grants this client can obtain.
|
||||
## It's not recommended to define this unless you know what you're doing.
|
||||
# grant_types:
|
||||
# - 'authorization_code'
|
||||
grant_types:
|
||||
- "authorization_code"
|
||||
- "refresh_token"
|
||||
|
||||
## Response Types configures which responses this client can be sent.
|
||||
## It's not recommended to define this unless you know what you're doing.
|
||||
# response_types:
|
||||
# - 'code'
|
||||
## Задан явно: без этого Authelia ругается на scope 'offline_access'.
|
||||
response_types:
|
||||
- "code"
|
||||
|
||||
## Response Modes configures which response modes this client supports.
|
||||
# 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
|
||||
## utilization. Custom lifespans are reusable similar to authorization policies.
|
||||
# lifespan: ''
|
||||
lifespan: "outline"
|
||||
|
||||
## 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
|
||||
## 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.
|
||||
# require_pushed_authorization_requests: false
|
||||
|
||||
Reference in New Issue
Block a user