Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add auth config snippet with new annotation nginx.ingress.kubernetes.io/auth-snippet #3274

Closed
benjamingorman opened this issue Oct 19, 2018 · 1 comment · Fixed by #3343
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@benjamingorman
Copy link

benjamingorman commented Oct 19, 2018

Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

This is a request to add a new annotation nginx.ingress.kubernetes.io/auth-snippet. The annotation would function in the same way as the existing snippet annotations:

  • nginx.ingress.kubernetes.io/server-snippet and
  • nginx.ingress.kubernetes.io/configuration-snippet.

The auth snippet would be inserted into the auth request block in nginx.conf.

It could be used alongside auth-url for example:

annotations:
  nginx.ingress.kubernetes.io/auth-url: http://my-auth-service:8080
  nginx.ingress.kubernetes.io/auth-snippet: |
     proxy-set-header My-Custom-Header 42;

The reason I think this feature would be useful is because I had a use case where I had to add an extra header to the auth subrequest. It seemed like the only way to do this was using a custom template, and modifying the auth request block in the custom template. This feature would remove the need to do that (although please let me know if it's possible already and I've somehow missed that).

Please let me know if this seems sensible - I'm happy to work on a MR if that helps too.

@aledbf aledbf added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 19, 2018
@abaruni abaruni mentioned this issue Nov 1, 2018
@benjamingorman
Copy link
Author

Thanks for adding this! That's great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants