- 
                Notifications
    
You must be signed in to change notification settings  - Fork 559
 
Add support for exec based auth. #158
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
Conversation
| 
           [APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns The full list of commands accepted by this bot can be found here. The pull request process is described here 
Needs approval from an approver in each of these files:
 
      
 Approvers can indicate their approval by writing   | 
    
| import { Authenticator } from './auth'; | ||
| import { Cluster, Context, newClusters, newContexts, newUsers, User } from './config_types'; | ||
| import { CloudAuth } from './cloud_auth'; | ||
| import { ExecAuth } from './exec_auth'; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brendanburns Where do these files come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're right there on my ....
checks notes
... my local file system.
sigh
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! and thanks again for adding this @brendanburns
| 
           Fixed lint errors....  | 
    
| 
           /lgtm  | 
    
| 
           I am using aws-iam-authenticator and the response body has the shape { 
  "kind": "ExecCredential",
  "apiVersion": "client.authentication.k8s.io/v1alpha1",
  "spec": {},
  "status": { 
    "expirationTimestamp": "2018-12-21T23:29:01Z",
    "token": "<REDACTED>"
  }
}Which appears correct according to https://kubernetes.io/docs/reference/access-authn-authz/authentication/ This however causes this line to return an undefined value for the bearer token. https://github.com/kubernetes-client/javascript/pull/158/files#diff-d03480d634d6f56466d9e8bf3e1b00d0R32 I have a locally linked build which returns  Is this an issue with  users:
  - name: <REDACTED>
    user:
      auth-provider:
        name: exec
        config:
          exec:
            apiVersion: client.authentication.k8s.io/v1alpha1
            command: aws-iam-authenticator
            args:
              - token
              - -i
              - <REDACTED>
      exec:
        apiVersion: client.authentication.k8s.io/v1alpha1
        command: aws-iam-authenticator
        args:
          - token
          - -i
          - <REDACTED> | 
    
| 
           @SawyerHopkins I think this is just a straight-up bug, I didn't have a working kubeconfig to test against and I messed up.... I'll send a fix asap.  | 
    
| 
           afaict this change broke the fix introduced by #132 to support electron.  | 
    
Closes #34