Home / Keptn v1 Docs / Release 1.y.z / Installation / Authenticate Keptn CLI and Bridge
After you install Keptn, you must authenticate the Keptn CLI and Bridge against the Keptn cluster. To do this, you need to:
keptn auth
, supplying the Keptn endpoint and API tokenThe Keptn endpoint and the API token are created during the Keptn installation.
Do the following from the shell:
Get the Keptn endpoint from the api-gateway-nginx
.
Follow the instructions in Choose access options
to get the Keptn endpoint for the access option you are using
and, optionally, storing that endpoint in an environment variable.
Set the environment variable KEPTN_API_TOKEN
:
KEPTN_API_TOKEN=$(kubectl get secret keptn-api-token -n keptn `
-ojsonpath={.data.keptn-api-token} | base64 --decode)
To authenticate the CLI against the Keptn cluster, use the keptn auth command:
keptn auth --endpoint=$KEPTN_ENDPOINT --api-token=$KEPTN_API_TOKEN
Note: If you receive a warning
Using a file-based storage for the key because the password-store seems to be not set up.
,
it means that no password store could be found in your environment.
In this case, the credentials are stored in ~/.keptn/.password-store
in your home directory.
Do the folllowing in the Windows Command Line:
Set the environment variable KEPTN_ENDPOINT
:
set KEPTN_ENDPOINT=http://<ENDPOINT_OF_API_GATEWAY>/api
Get the Keptn API Token encoded in base64:
kubectl get secret keptn-api-token -n keptn -ojsonpath={.data.keptn-api-token}
Save the encoded API token in a text file such as keptn-api-token-base64.txt
.
Decode the file:
certutil -decode keptn-api-token-base64.txt keptn-api-token.txt
Open the newly created file keptn-api-token.txt
,
copy the value, and paste it into the next command:
set KEPTN_API_TOKEN=<your-token>
To authenticate the CLI against the Keptn cluster, use the keptn auth command:
keptn.exe auth --endpoint=$Env:KEPTN_ENDPOINT --api-token=$Env:KEPTN_API_TOKEN
After installing and exposing Keptn, you can access the Keptn Bridge by using a browser and navigating to the Keptn endpoint without the api
path at the end of the URL.
You can also use the Keptn CLI to retrieve the Bridge URL using:
keptn status
The Keptn Bridge has basic authentication
enabled by default and the default user is keptn
with an automatically generated password.
kubectl get secret -n keptn bridge-credentials -o jsonpath="{.data.BASIC_AUTH_USERNAME}" | base64 --decode
kubectl get secret -n keptn bridge-credentials -o jsonpath="{.data.BASIC_AUTH_PASSWORD}" | base64 --decode
See OpenID Authorization for information about using OAUTH authorization for the Keptn Bridge.