Skip to content

OIDC auth does not handle custom CA certs #360

Closed

Description

@jnummelin

Looking at the Go client implementation, one is able to use trusted IDP certs with idp-certificate-authority or idp-certificate-authority-data attributes. See: https://github.com/kubernetes/kubernetes/blob/a3ccea9d8743f2ff82e41b6c2af6dc2c41dc7b10/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go#L41-L42

Currently the OIDC auth implementation does not handle those attributes at all which means the oidc auth will fail when the idp uses custom CA. (custom == something not bundled in node itself).

For pure node clients one could use NODE_EXTRA_CA_CERTS to point to local CA bundle file with the idp CA in it. For us this does not work as we're building an Electron based app that does no allow one to extend the CA bundles at all. :(

Activity

  1. brendandburns commented on Oct 31, 2019

    @brendandburns
    Contributor

    We'd be happy to take a PR to add this support.

    Thanks!

  2. fejta-bot commented on Jan 30, 2020

    @fejta-bot

    Issues go stale after 90d of inactivity.
    Mark the issue as fresh with /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle stale

  3. added
    lifecycle/stale
    on Jan 30, 2020
  4. brendandburns commented on Feb 1, 2020

    @brendandburns
    Contributor

    /remove-lifecycle-stale

  5. brendandburns commented on Feb 7, 2020

    @brendandburns
    Contributor

    fwiw, I looked into the oidc client library here:

    https://github.com/panva/node-openid-client/blob/2dfa313f24bab351344932b7b1c67c9cab6031f8/lib/helpers/client.js

    And I don't think that the library supports custom Certificate Authorities.

  6. fejta-bot commented on Mar 8, 2020

    @fejta-bot

    Stale issues rot after 30d of inactivity.
    Mark the issue as fresh with /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle rotten

  7. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Mar 8, 2020
  8. brendandburns commented on Mar 8, 2020

    @brendandburns
    Contributor

    /lifecycle frozen

  9. added
    lifecycle/frozen
    and removed
    lifecycle/rotten
    on Mar 8, 2020
  10. panva commented on Mar 26, 2020

    @panva

    fwiw, I looked into the oidc client library here:

    panva/node-openid-client:lib/helpers/client.js@2dfa313

    And I don't think that the library supports custom Certificate Authorities.

    It does. Any valid got or stdlib http option such as ca can be added per request or by default to all requests. The thing is this package requires version 2.5.0 which is by all means and purposes legacy. I'd recommend using ^3.14.1 and in doing so setting this package's engines.node to >= 10.13.0 to be in line with openid-client@3 requirements.

  11. brendandburns commented on Mar 27, 2020

    @brendandburns
    Contributor

    @panva can you give a code sample of how to pass that through? The last time I looked at the code path I didn't see a way to pass that through from the OIDC client interface in the library.

  12. panva commented on Mar 27, 2020

    @panva

    @brendandburns i'm not sure what you're asking. How to pipe those options through kubernetes-client? I have no idea, i just maintain openid-client and noticed kubernetes-client still uses an outdated version. I noticed this issue and your comment about something not being possible on the client's level, that particular customization is 100% possible on the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

lifecycle/frozen

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions