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

Support reading Headers values from Secrets #3852

Open
ivanfoo opened this issue Sep 14, 2024 · 5 comments
Open

Support reading Headers values from Secrets #3852

ivanfoo opened this issue Sep 14, 2024 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@ivanfoo
Copy link

ivanfoo commented Sep 14, 2024

Is your feature request related to a problem?
We need to configure rule conditions based on specific Header values. However, these values can contain sensitive data so we don't want them to end up visible in plain text in the Ingress annotations. Example:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: any-namespace
  name: any-ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/conditions.sensible-headers: >
      [{"field":"http-header","httpHeaderConfig":{"httpHeaderName": "AnySensibleHeader", "values":["AnySensibleValue"]}}]

Describe the solution you'd like
Add support to reading header values from kubernetes Secrets as it's done to configure the clientID and clientSecret when using OIDC authentication.

alb.ingress.kubernetes.io/conditions.sensible-headers: >
  [{"field":"http-header","httpHeaderConfig":{"httpHeaderName": "AnySensibleHeader", "values":["secret://any-secret/any-key"]}}]

Describe alternatives you've considered
Load Header values from AWS Services like ParameterStore or SecretsManager

@ivanfoo ivanfoo changed the title Support reading headers values from Secrets Support reading Headers values from Secrets Sep 14, 2024
@shraddhabang shraddhabang added kind/feature Categorizes issue or PR as related to a new feature. labels Sep 18, 2024
@shraddhabang
Copy link
Collaborator

@ivanfoo Thank you for raising this. But I have a question about it. even if we implement this, you will still be able to see these header values from console/cli. Also, if you are concerned abut the sensitive data in ingress annotation, you could try restricting the ingress access by defining the RBAC values.

@ivanfoo
Copy link
Author

ivanfoo commented Sep 19, 2024

@shraddhabang you are right about the values being visible when using the console or CLI. However, my concern is more about how exposed these annotations are.

It's way easier to restrict access to ALB details on AWS with IAM than restricting access to Ingresses resources that contain sensitive data as annotations, as there is not a way to deny access to resources by labels or a similar approach.

Also, these annotations could be easily leaked everywhere: ArgoCD dashboard, cluster backups, alert messages, monitoring tooling...

I'm not saying the solution is perfect, but at least it does not increase the exposed surface...

What do you think? Any chance of consuming headers values from secrets? Also, do you know if native support for sensitive Headers is coming anytime on the ALB side?

Thanks!

@ivanfoo
Copy link
Author

ivanfoo commented Nov 5, 2024

Any news regarding this topic?

@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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 as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 3, 2025
@ivanfoo
Copy link
Author

ivanfoo commented Feb 13, 2025

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 13, 2025
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

No branches or pull requests

4 participants