diff options
Diffstat (limited to 'lib/gitlab/kas.rb')
-rw-r--r-- | lib/gitlab/kas.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/kas.rb b/lib/gitlab/kas.rb index a1e290a54e6..8809795d9a1 100644 --- a/lib/gitlab/kas.rb +++ b/lib/gitlab/kas.rb @@ -5,13 +5,14 @@ module Gitlab INTERNAL_API_REQUEST_HEADER = 'Gitlab-Kas-Api-Request' VERSION_FILE = 'GITLAB_KAS_VERSION' JWT_ISSUER = 'gitlab-kas' + JWT_AUDIENCE = 'gitlab' K8S_PROXY_PATH = 'k8s-proxy' include JwtAuthenticatable class << self def verify_api_request(request_headers) - decode_jwt(request_headers[INTERNAL_API_REQUEST_HEADER], issuer: JWT_ISSUER) + decode_jwt(request_headers[INTERNAL_API_REQUEST_HEADER], issuer: JWT_ISSUER, audience: JWT_AUDIENCE) rescue JWT::DecodeError nil end |