ingress-nginx icon indicating copy to clipboard operation
ingress-nginx copied to clipboard

A specific annotation for more_set_input_headers ?

Open antoineozenne opened this issue 4 years ago • 9 comments

According to https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#configuration-snippet, it is dangerous in multi-tenant clusters to use the annotation nginx.ingress.kubernetes.io/configuration-snippet because of https://github.com/kubernetes/ingress-nginx/issues/7837. So, is it possible to have a specific annotation for the directive more_set_input_headers to avoid using a configuration-snippet (maybe something like nginx.ingress.kubernetes.io/more_set_input_headers)? I know it is possible to set this globally in ConfigMap, but I don't want to set these headers to all requests for all services.

For example, the need for us is to set the following headers only for certain services:

more_set_input_headers "X-Frame-Options: SAMEORIGIN";
more_set_input_headers "X-Content-Type-Options: nosniff";
more_set_input_headers "Referrer-Policy: no-referrer";
more_set_input_headers "Permissions-Policy: no-referrer";
more_set_input_headers "X-Xss-Protection: 1; mode=block";
more_set_input_headers "Set-Cookie: $sent_http_set_cookie; HttpOnly; Secure";

antoineozenne avatar Dec 09 '21 14:12 antoineozenne

@antoineozenne: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Dec 09 '21 14:12 k8s-ci-robot

or maybe like i've suggested in https://github.com/kubernetes/ingress-nginx/issues/7811

mblaschke avatar Dec 31 '21 10:12 mblaschke

Not really. You suggested to use annotations to add header to the response (with more_set_headers). My need is to add header to the request (with more_set_input_headers). Other than this, the proposal is similar, yes.

antoineozenne avatar Jan 04 '22 08:01 antoineozenne

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Apr 04 '22 09:04 k8s-triage-robot

/remove-lifecycle stale

antoineozenne avatar Apr 04 '22 13:04 antoineozenne

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jul 03 '22 13:07 k8s-triage-robot

/no-stale

antoineozenne avatar Jul 04 '22 10:07 antoineozenne

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Aug 03 '22 10:08 k8s-triage-robot

/no-stale

antoineozenne avatar Aug 03 '22 12:08 antoineozenne

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Sep 02 '22 13:09 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Sep 02 '22 13:09 k8s-ci-robot

/reopen

mblaschke avatar Sep 04 '22 14:09 mblaschke

@mblaschke: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Sep 04 '22 14:09 k8s-ci-robot