[auth-proxy] Rename header.
Bug: b/249507110
Change-Id: I7a1bc02c7716842c3fc1ebc290e1449404404e43
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/586898
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
diff --git a/go/roles/roles.go b/go/roles/roles.go
index 3b45a35..d96fbfa 100644
--- a/go/roles/roles.go
+++ b/go/roles/roles.go
@@ -52,7 +52,7 @@
// Roles is a slice of Role.
type Roles []Role
-// ToHeader converts Roles to a string, formatted for the X-ROLES header.
+// ToHeader converts Roles to a string, formatted for an HTTP header.
func (r Roles) ToHeader() string {
var b strings.Builder
last := len(r) - 1
@@ -65,7 +65,7 @@
return b.String()
}
-// FromHeader parses the X-ROLES header value and returns Roles found.
+// FromHeader parses a Roles header value and returns Roles found.
func FromHeader(s string) Roles {
var ret Roles
for _, part := range strings.Split(s, ",") {
diff --git a/kube/go/authproxy/authproxy.go b/kube/go/authproxy/authproxy.go
index 23472f6..4bb54ce 100644
--- a/kube/go/authproxy/authproxy.go
+++ b/kube/go/authproxy/authproxy.go
@@ -58,7 +58,7 @@
// how Grafana uses this to support almost any authentication handler.
WebAuthHeaderName = "X-WEBAUTH-USER"
- WebAuthRoleHeaderName = "X-ROLES"
+ WebAuthRoleHeaderName = "X-WEBAUTH-ROLES"
)
type proxy struct {