Skip to content

k8s-client might read an incorrect secret from a different namespace  #861

@wind57

Description

@wind57

This is more of a question, then a bug; but it's a bit of both...

I am looking at this line. Notice the logic here:

  • if there is a namespace defined, use it via listNamespacedSecret.

  • if there is not, read all namespaces via listSecretForAllNamespaces.

This is an interesting choice. We can obviously read the wrong thing easily and expose data from a secret that users never intended for (this is also easily reproducible).

On the other hand, if we take a step back, we only call listSecretForAllNamespaces because we think the namespace might be null. The future of this bug and discussion should really happen after this one.

For the time being, I am leaving it here as a place-holder and will get back to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions