diff --git a/command/agent/acl_endpoint.go b/command/agent/acl_endpoint.go index 6c9e94fdb136..6e2248502ff8 100644 --- a/command/agent/acl_endpoint.go +++ b/command/agent/acl_endpoint.go @@ -319,25 +319,3 @@ func (s *HTTPServer) ExchangeOneTimeToken(resp http.ResponseWriter, req *http.Re setIndex(resp, out.Index) return out, nil } - -// parseACLSecrets extracts a map of k/v pairs from the ACL secrets -// header. Silently ignores invalid secrets -func parseACLSecrets(req *http.Request) structs.ACLSecrets { - secretsHeader := req.Header.Get("X-Nomad-Bootstrap-Token") - if secretsHeader == "" { - return nil - } - - secrets := map[string]string{} - secretkvs := strings.Split(secretsHeader, ",") - for _, secretkv := range secretkvs { - kv := strings.Split(secretkv, "=") - if len(kv) == 2 { - secrets[kv[0]] = kv[1] - } - } - if len(secrets) == 0 { - return nil - } - return structs.ACLSecrets(secrets) -} diff --git a/nomad/structs/acl.go b/nomad/structs/acl.go deleted file mode 100644 index 932742d8d0d9..000000000000 --- a/nomad/structs/acl.go +++ /dev/null @@ -1,4 +0,0 @@ -package structs - -// ACLSecrets contain optional additional configuration that can be used. -type ACLSecrets map[string]string