From cdc9b357e7af76ba37bec83cfb986fc5c32915e8 Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Tue, 7 Aug 2018 10:45:40 -0700 Subject: [PATCH] Update k8s auth (#5059) --- .../hashicorp/vault-plugin-auth-kubernetes/path_login.go | 2 +- .../hashicorp/vault-plugin-auth-kubernetes/token_review.go | 4 ++++ vendor/vendor.json | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/vendor/github.com/hashicorp/vault-plugin-auth-kubernetes/path_login.go b/vendor/github.com/hashicorp/vault-plugin-auth-kubernetes/path_login.go index d28e40dbe2..ac8a82017f 100644 --- a/vendor/github.com/hashicorp/vault-plugin-auth-kubernetes/path_login.go +++ b/vendor/github.com/hashicorp/vault-plugin-auth-kubernetes/path_login.go @@ -121,7 +121,7 @@ func (b *kubeAuthBackend) pathLogin() framework.OperationFunc { "service_account_secret_name": serviceAccount.SecretName, "role": roleName, }, - DisplayName: fmt.Sprintf("%s:%s", serviceAccount.Namespace, serviceAccount.Name), + DisplayName: fmt.Sprintf("%s-%s", serviceAccount.Namespace, serviceAccount.Name), LeaseOptions: logical.LeaseOptions{ Renewable: true, TTL: role.TTL, diff --git a/vendor/github.com/hashicorp/vault-plugin-auth-kubernetes/token_review.go b/vendor/github.com/hashicorp/vault-plugin-auth-kubernetes/token_review.go index 79d291f7ca..bdae3a7b2e 100644 --- a/vendor/github.com/hashicorp/vault-plugin-auth-kubernetes/token_review.go +++ b/vendor/github.com/hashicorp/vault-plugin-auth-kubernetes/token_review.go @@ -90,6 +90,10 @@ func (t *tokenReviewAPI) Review(jwt string) (*tokenReviewResult, error) { // Set the JWT as the Bearer token req.Header.Set("Authorization", bearer) + // Set the MIME type headers + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Accept", "application/json") + resp, err := client.Do(req) if err != nil { return nil, err diff --git a/vendor/vendor.json b/vendor/vendor.json index ac72003827..aced747f35 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1327,10 +1327,10 @@ "revisionTime": "2018-07-10T15:13:41Z" }, { - "checksumSHA1": "GAsPitFJRlzOg7kkQVKWksOY5bM=", + "checksumSHA1": "Bl5W8JoUnhKayJb5TYCzi9P6ZJA=", "path": "github.com/hashicorp/vault-plugin-auth-kubernetes", - "revision": "79458d2576b21c11a9482f0a16074bcb1b657e7f", - "revisionTime": "2018-07-23T17:26:15Z" + "revision": "71e1b5a5d5a7e5e8a9c6a385ca7994baf6e6fc48", + "revisionTime": "2018-08-07T17:39:52Z" }, { "checksumSHA1": "pNERL2s72vwnApekzTLxGsvkyNU=",