Skip to main content

Testkube CLI Authentication

Testkube doesn't provide a separate user/role management system to protect access to its CLI. Users can configure OAuth-based authentication modules using Testkube Helm chart parameters and the CLI config command. Testkube can automatically configure the Kubernetes Nginx Ingress Controller and create required ingresses.

Provide Parameters for API Ingress

Pass values to Testkube Helm chart during installation or upgrade (they are empty by default). Pay attention to the usage of the scheme (http or https) in URIs.

--set testkube-api.cliIngress.enabled=true \
--set testkube-api.cliIngress.oauth.provider="github"
--set testkube-api.cliIngress.oauth.clientID="XXXXXXXXXX" \
--set testkube-api.cliIngress.oauth.clientSecret="XXXXXXXXXX" \
--set testkube-api.cliIngress.oauth.scopes=""

Create Github OAuth Application

Register a new Github OAuth application for your personal or organization account.

Register new App

Pay attention to the usage of the scheme (http or https) in URIs. The homepage URL should be the UI home page

The authorization callback URL should be a prebuilt page at the UI website

View created App

Remember the generated Client ID and Client Secret.

Provide Parameters for CLI

Run the command below to configure oauth parameters (we support github OAuth provider):

kubectl testkube config oauth --client-id XXXXXXXXXX --client-secret XXXXXXXXXX


You will be redirected to your browser for authentication or you can open the url below manually
Authentication will be cancelled in 60 seconds

Authorization for the Github application will be requested and access will need to be confirmed. Confirm App authorization

If authorization is successful, you will see the success page. Success Page


Shutting down server...
Server gracefully stopped 🥇
New api uri set to 🥇
New oauth token gho_XXXXXXXXXX 🥇

Run CLI Commands with OAuth

Now all of your requests with direct client will submit an OAuth token, for example:

kubectl testkube get executors -c direct


  NAME               | URI | LABELS  
artillery-executor | |
curl-executor | |
cypress-executor | |
k6-executor | |
postman-executor | |
soapui-executor | |

Environment Variables

You can use 2 environment variables to override CLI config values:


TESTKUBE_OAUTH_ACCESS_TOKEN - for OAuth access token.