Skip to content

Commit cc34e1a

Browse files
author
Carson Anderson
committed
Fix Static labels and document supported backends
1 parent 9e8656c commit cc34e1a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

auth_server/authn/static_auth.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323

2424
type Requirements struct {
2525
Password *PasswordString `yaml:"password,omitempty" json:"password,omitempty"`
26+
Labels Labels `yaml:"labels,omitempty" json:"labels,omitempty"`
2627
}
2728

2829
type staticUsersAuth struct {
@@ -54,7 +55,7 @@ func (sua *staticUsersAuth) Authenticate(user string, password PasswordString) (
5455
return false, nil, nil
5556
}
5657
}
57-
return true, nil, nil
58+
return true, reqs.Labels, nil
5859
}
5960

6061
func (sua *staticUsersAuth) Stop() {

docs/Labels.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Labels can be used to reduce the number ACLS needed in large, complex installations.
44

5+
Labels are only supported for certain auth backends. As of right now labels are only supported when using Static Authentication or Mongo Authentication.
6+
57
## Label Placeholders
68

79
Label placeholders are available for any label that is assigned to a user.

0 commit comments

Comments
 (0)