All Projects → auth0 → k8s-pixy-auth

auth0 / k8s-pixy-auth

Licence: MIT license
k8s plugin to authenticate against an OIDC compatible issuer using PKCE (pixy) flow

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to k8s-pixy-auth

schematics
Schematics for adding Okta Auth to your projects
Stars: ✭ 60 (+150%)
Mutual labels:  oidc, pkce
oidc
Easy to use OpenID Connect client and server library written for Go and certified by the OpenID Foundation
Stars: ✭ 475 (+1879.17%)
Mutual labels:  oidc, pkce
casdoor-go-sdk
Go client SDK for Casdoor
Stars: ✭ 37 (+54.17%)
Mutual labels:  auth, oidc
spring-cloud
🔥 Develop distributed application services based on SpringCloud architecture model and components
Stars: ✭ 36 (+50%)
Mutual labels:  auth
kubernetes-localdev
Create a local Kubernetes development environment on macOS or Windows and WSL2, including HTTPS/TLS and OAuth2/OIDC authentication.
Stars: ✭ 210 (+775%)
Mutual labels:  oidc
kubectl-whoami
This plugin gets the subject name using the effective kubeconfig
Stars: ✭ 74 (+208.33%)
Mutual labels:  kubectl-plugins
ng-oidc-client
A package for managing OpenID-Connect authentication in Angular apps, wrapping oidc-client-js
Stars: ✭ 48 (+100%)
Mutual labels:  oidc
osprey
Kubernetes OIDC CLI login
Stars: ✭ 49 (+104.17%)
Mutual labels:  oidc
kubectlsafe
Safe operations in kubectl with plugin kubectlsafe
Stars: ✭ 36 (+50%)
Mutual labels:  kubectl-plugins
gotrue
A JWT based API for managing users and issuing JWT tokens
Stars: ✭ 325 (+1254.17%)
Mutual labels:  auth
lua-casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Lua (OpenResty)
Stars: ✭ 43 (+79.17%)
Mutual labels:  auth
easypastes
Use Easy Pastes to create, store, share code snippets by simply pasting them with syntax highlight.
Stars: ✭ 34 (+41.67%)
Mutual labels:  auth
authorize-me
Authorization with social networks
Stars: ✭ 44 (+83.33%)
Mutual labels:  auth
blockstack.js-old
The Blockstack JS library for identity and authentication
Stars: ✭ 20 (-16.67%)
Mutual labels:  auth
hasura-simple-auth
Simple Auth Server For Signup & Login Mutation
Stars: ✭ 32 (+33.33%)
Mutual labels:  auth
angular-auth-oidc-sample-google-openid
Angular oidc client with google Identity OpenID
Stars: ✭ 23 (-4.17%)
Mutual labels:  oidc
authorizer
Your data, your control. Fully open source, authentication and authorization. No lock-ins. Deployment in Railway in 120 seconds || Spin a docker image as a micro-service in your infra. Built in login page and Admin panel out of the box.
Stars: ✭ 770 (+3108.33%)
Mutual labels:  auth
express-mongo-jwt-boilerplate
Express Mongo JsonWebToken boilerplate
Stars: ✭ 100 (+316.67%)
Mutual labels:  auth
sign-in-with-ethereum
Minimal example of sign in with Ethereum. Compatible with web3 browsers.
Stars: ✭ 25 (+4.17%)
Mutual labels:  auth
dart-casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Dart/Flutter
Stars: ✭ 30 (+25%)
Mutual labels:  auth

Build status License Go Report Card Coverage Status

k8s-pixy-auth

A kubectl plugin to authenticate against an OIDC compatible issuer using PKCE (pixy) flow

demo

As of Kubernetes v1.11 there is beta support for a client-go credentials plugin. Using the support it is possible to use an Auth0 application to authenticate users and provide tokens with which a correctly configured Kubernetes cluster can authorize user actions.

Note that while this tool uses PKCE, since it was built the recommendation for CLIs was changed from using PKCE to using Device Authorization Flow. The recommendation change is due to usability as Deivce Authorization Flow allows for CLIs to work where browsers cannot be opened (eg: SSH terminal) and does not require you to open a port on the local machine to handle the callback. At this time there are no plans to support Device Authorization Flow in this tool, however, we welcome PRs.

Installation

At this point in the project installation is manual. In the future this will be automated.

  1. Make sure your Kubernetes api service is configured to use OpenID Connect Tokens.
  2. Download a release binary or pull down this repo with git clone [email protected]:auth0/k8s-pixy-auth.git
  3. If you pulled down the repo, change to the cloned directory and build the binary with go build
  4. Initialize your kube config making sure to use the argument values applicable to your cluster k8s-pixy-auth init --context-name "minikube" --issuer-endpoint "https://joncarl.auth0.com" --audience "minikube" --client-id "QXV0aDAgaXMgaGlyaW5nISBhdXRoMC5jb20vY2FyZWVycyAK" --port 8080. If you are using refresh tokens add --with-refresh-token to the command arguments. If you are using the ID Token instead of the Access Token add --use-id-token to the command arguments.
  5. Run a command against Kubernetes like kubectl get nodes. Since this is the first time k8s-pixy-auth has been invoked for the context it will open a browser to authenticate you.
  6. After authentication is complete, switch back to your terminal and you should see the output of the command. If you don't have permissions it will let you know. Make sure you've correctly set up permissions for your user. After authentication is done k8s-pixy-auth will securely cache your the needed tokens.
  7. Future commands will use the cached information from the first time you invoked k8s-pixy-auth for that context and will thus not require a browser to be opened each time. Because the auth tokens are stored securely the secure backend might ask for your credentials from time to time (the backend depends on OS).

Securing the Credentials

Keyring is used in the background to secure the credentials. This allows cross-platform support to securely store the credentials.

How to Configure Your Cluster

The k8s api service needs to be configured in order to use this tool. Checkout Auth0Setup.md for a basic guide on how to setup Auth0 as the token issuer. Using that guide you should be able to set up other OIDC providers as well.

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].