Coder Social home page Coder Social logo

Comments (3)

briankassouf avatar briankassouf commented on August 27, 2024

Hi @falzm,

How did you configure the auth backend? (https://www.vaultproject.io/api/auth/kubernetes/index.html#configure-method)

Did you provide a token_reviewer_jwt?

from vault-plugin-auth-kubernetes.

falzm avatar falzm commented on August 27, 2024

I've configured the auth backend this way:

$ vault write auth/kubernetes/config \
    kubernetes_host=https://x.x.x.x  \
    kubernetes_ca_cert=@k8s_ca.crt \
    token_reviewer_jwt=@vault_sa.token

With the referenced files generated such as:

$ export K8S_VAULT_SA_SECRET=$(kubectl get serviceaccount vault -o json | jq -r .secrets[0].name)

$ kubectl get secret ${K8S_VAULT_SA_SECRET} -o json | jq -r '.data["token"]' | base64 -d ; echo > vault_sa.token

$ kubectl get secret ${K8S_VAULT_SA_SECRET} -o json | jq -r '.data["ca.crt"]' | base64 -d > k8s_ca.crt

from vault-plugin-auth-kubernetes.

falzm avatar falzm commented on August 27, 2024

I've found the problem, it is the same as this one: my file vault_sa.token ends with a trailing newline character (\n) and Vault doesn't trim it out before passing the JWT to the k8s TokenReview API. By removing the trailing character it works as intended.

I'll submit a PR fixing this bug.

from vault-plugin-auth-kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.