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

Implement user.exec auth support #114

Merged
merged 7 commits into from
May 2, 2019
Merged

Implement user.exec auth support #114

merged 7 commits into from
May 2, 2019

Conversation

jakolehm
Copy link
Contributor

PR implements support for:

users:
- name: my-user
  user:
    exec:
      # Command to execute. Required.
      command: "example-client-go-exec-plugin"

      # API version to use when decoding the ExecCredentials resource. Required.
      #
      # The API version returned by the plugin MUST match the version listed here.
      #
      # To integrate with tools that support multiple versions (such as client.authentication.k8s.io/v1alpha1),
      # set an environment variable or pass an argument to the tool that indicates which version the exec plugin expects.
      apiVersion: "client.authentication.k8s.io/v1beta1"

      # Environment variables to set when executing the plugin. Optional.
      env:
      - name: "FOO"
        value: "bar"

      # Arguments to pass when executing the plugin. Optional.
      args:
      - "arg1"
      - "arg2"

@jakolehm jakolehm added the enhancement New feature or request label Apr 30, 2019
@jakolehm jakolehm requested review from kke and jnummelin April 30, 2019 07:59
@kke
Copy link
Contributor

kke commented Apr 30, 2019

Seems a bit dangerous, maybe there could be an option to enable?

@jakolehm
Copy link
Contributor Author

jakolehm commented Apr 30, 2019

Seems a bit dangerous, maybe there could be an option to enable?

Wanna explain more? 😄 This is part of the kubeconfig spec, nothing we can really do here (other than support it).

@kke
Copy link
Contributor

kke commented Apr 30, 2019

Wanna explain more? 😄 This is part of the kubeconfig spec, nothing we can really do here (other than support it).

If someone uses k8s-client to implement something that takes a config, it may be a surprise that the client executes arbitary commands from that config, maybe not, maybe mention in yardoc/readme.

Copy link
Contributor

@jnummelin jnummelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExecCredential can also provide client certificate auth and expiration timestamp for either token or the client cert. But maybe we can handle those as separate PR when we face such use case.

@jakolehm jakolehm merged commit 14d4999 into master May 2, 2019
@jakolehm jakolehm deleted the fix/config-user-exec branch May 2, 2019 09:24
@jakolehm jakolehm mentioned this pull request May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants