Coder Social home page Coder Social logo

Comments (9)

jefferai avatar jefferai commented on August 27, 2024

That doesn't seem like a CA error, it seems like an input error. Can you verify that the parameters you're passing in are what you expect?

from vault-plugin-auth-kubernetes.

mvisonneau avatar mvisonneau commented on August 27, 2024

MY_ROLE is a role that is configured on the cluster and MY_JWT_TOKEN is in the correct format. I have the same result when not interpolating and directly passing the content of the values.

from vault-plugin-auth-kubernetes.

jefferai avatar jefferai commented on August 27, 2024

@briankassouf any idea offhand?

from vault-plugin-auth-kubernetes.

briankassouf avatar briankassouf commented on August 27, 2024

Hi @mvisonneau

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

from vault-plugin-auth-kubernetes.

mvisonneau avatar mvisonneau commented on August 27, 2024

So this is what I ended up doing in terms of config :

  • kubernernetes_host: https://rancher.rocks/r/projects/1a1337/kubernetes:6443
    The Kubernetes endpoint that I get from Rancher

  • kubernetes_ca_cert: -----BEGIN CERTIFICATE-----[..]
    The CA chain that I fetched from AWS

  • token_reviewer_jwt: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ[..]
    Base64 decoded token of the SA I created for Vault.

  • I left pem_keys empty

I also tried once to add the ca.crt of kubernetes, used for tokens signatures in both kubernetes_ca_cert and pem_keys without success.

from vault-plugin-auth-kubernetes.

mvisonneau avatar mvisonneau commented on August 27, 2024

I just retried using a LetsEncrypt certificate, still the same issue :( continuing to investigate..!

from vault-plugin-auth-kubernetes.

mvisonneau avatar mvisonneau commented on August 27, 2024

Ok, I seem to have found the issue. Rancher does not authorise external access on the Kubernetes cluster API with a service account token. It has to be through their own auth mechanism, unfortunately this is not a JWT.

When trying to authenticate using the one generated, the API returns a 302, hence the parsing error I guess.

from vault-plugin-auth-kubernetes.

jefferai avatar jefferai commented on August 27, 2024

That's a shame. Open a request with Rancher I guess?

from vault-plugin-auth-kubernetes.

mvisonneau avatar mvisonneau commented on August 27, 2024

Yes, I'll give it a second try by removing the jws parsing on the token_reviewer_jwt I believe it should be enough even though it's definitely not a valid solution. I'm also working on the AWS EKS preview and it only supports IAM based authentication against the K8S API which implies the same difficulties. I'm wondering what would be the best approach. :/

Closing it for now. Thanks for your help 🙏!

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.