Skip to content

Looking for annotation similar to "nginx.ingress.kubernetes.io/auth-url" #5534

Closed Answered by chatgptfighter
chatgptfighter asked this question in Q&A
Discussion options

You must be logged in to vote

Thx all, Below you can find solution that applied in our end and it probably will save someone's time:
for api clients ingress (service requires authorisation):

nginx.org/location-snippets: |
      auth_request "/someauth"
      auth_request_set $authHeader0 $upstream_header;
      proxy_set_header 'x-some-header' $authHeader0;

for api server ingress (config that provide authorisation):

nginx.org/server-snippets: |
      location = /someauth{
        internal;
        proxy_set_header X-Auth-Request-Redirect $request_uri;
        proxy_set_header X-Original-Method $request_method;
        proxy_pass https://someserver.com/authpath;
      }

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pdabelf5
Comment options

@chatgptfighter
Comment options

Answer selected by chatgptfighter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants