mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmauth: allow -auth.config without users
section of unauthorized_user
section is present here
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4083
This commit is contained in:
parent
6aa8029f30
commit
b22bcb6f0a
1 changed files with 2 additions and 2 deletions
|
@ -392,8 +392,8 @@ func parseAuthConfig(data []byte) (*AuthConfig, error) {
|
|||
|
||||
func parseAuthConfigUsers(ac *AuthConfig) (map[string]*UserInfo, error) {
|
||||
uis := ac.Users
|
||||
if len(uis) == 0 {
|
||||
return nil, fmt.Errorf("`users` section cannot be empty in AuthConfig")
|
||||
if len(uis) == 0 && ac.UnauthorizedUser == nil {
|
||||
return nil, fmt.Errorf("Missing `users` or `unauthorized_user` sections")
|
||||
}
|
||||
byAuthToken := make(map[string]*UserInfo, len(uis))
|
||||
for i := range uis {
|
||||
|
|
Loading…
Reference in a new issue