Auth: Add Sigv4 auth option to datasources (#27552)
* create transport chain * add frontend * remove log * inline field updates * allow ARN, Credentials + Keys auth in frontend * configure credentials * add tests and refactor * update frontend json field names * fix tests * fix comment * add app config flag * refactor tests * add return field for tests * add flag for UI display * update comment * move logic * fix config * pass config through props * update docs * pr feedback and add docs coverage * shorten settings filename * fix imports * revert docs changes * remove log line * wrap up next as round tripper * only propagate required config * remove unused import * remove ARN option and replace with default chain * make ARN role assume as supplemental * update docs * refactor flow * sign body when necessary * remove unnecessary wrapper * remove newline * Apply suggestions from code review * PR fixes Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
co-authored by
Arve Knudsen
parent
ab33e46789
commit
7d63b2c473
@@ -143,6 +143,7 @@ var (
|
||||
AdminPassword string
|
||||
LoginCookieName string
|
||||
LoginMaxLifetime time.Duration
|
||||
SigV4AuthEnabled bool
|
||||
|
||||
AnonymousEnabled bool
|
||||
AnonymousOrgName string
|
||||
@@ -280,6 +281,7 @@ type Cfg struct {
|
||||
LoginMaxInactiveLifetime time.Duration
|
||||
LoginMaxLifetime time.Duration
|
||||
TokenRotationIntervalMinutes int
|
||||
SigV4AuthEnabled bool
|
||||
|
||||
// OAuth
|
||||
OAuthCookieMaxAge int
|
||||
@@ -990,6 +992,10 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
|
||||
cfg.OAuthCookieMaxAge = auth.Key("oauth_state_cookie_max_age").MustInt(600)
|
||||
SignoutRedirectUrl = valueAsString(auth, "signout_redirect_url", "")
|
||||
|
||||
// SigV4
|
||||
SigV4AuthEnabled = auth.Key("sigv4_auth_enabled").MustBool(false)
|
||||
cfg.SigV4AuthEnabled = SigV4AuthEnabled
|
||||
|
||||
// SAML auth
|
||||
cfg.SAMLEnabled = iniFile.Section("auth.saml").Key("enabled").MustBool(false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user