Auth: Add expiry date for service accounts access tokens (#58885)

* Add new configuration option for SA tokens

* Add new expiry date option to frontend components

* Add backend validation


Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
This commit is contained in:
linoman
2022-11-22 10:08:40 +01:00
committed by GitHub
parent c1eabb893f
commit f8f61c1a69
10 changed files with 67 additions and 15 deletions

View File

@ -198,9 +198,10 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
"unifiedAlerting": map[string]interface{}{
"minInterval": hs.Cfg.UnifiedAlerting.MinInterval.String(),
},
"oauth": hs.getEnabledOAuthProviders(),
"samlEnabled": hs.samlEnabled(),
"samlName": hs.samlName(),
"oauth": hs.getEnabledOAuthProviders(),
"samlEnabled": hs.samlEnabled(),
"samlName": hs.samlName(),
"tokenExpirationDayLimit": hs.Cfg.SATokenExpirationDayLimit,
}
if hs.ThumbService != nil {