Skip to content

Commit

Permalink
NETOBSERV-972 Make DISABLED auth mode not restricted to admins (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak authored Apr 17, 2023
1 parent 882a2f0 commit d1d36c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/plugin-backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,14 @@ func main() {
var checkType auth.CheckType
if *authCheck == "auto" {
if *lokiForwardUserToken {
// FORWARD lokiAuth mode
checkType = auth.CheckAuthenticated
} else {
} else if *lokiTokenPath != "" {
// HOST lokiAuth mode
checkType = auth.CheckAdmin
} else {
// DISABLED lokiAuth mode
checkType = auth.CheckAuthenticated
}
log.Info(fmt.Sprintf("auth-check 'auto' resolved to '%s'", checkType))
} else {
Expand Down

0 comments on commit d1d36c2

Please sign in to comment.