The CloudBees CI MCP Router can authenticate to CloudBees CI with an API token generated from the operations center and encoded for HTTP basic authentication.
|
Authenticating with an API token will be deprecated in the future. For new deployments, CloudBees recommends that you use OAuth, which authenticates each request individually rather than relying on a shared token. |
Prerequisites
Before you begin, ensure that you have installed the CloudBees CI MCP Router and have an account with sufficient permissions to generate an API token in the operations center.
Generate an API token
You must generate an API token from the operations center.
| If you generate an API token from a controller instead of the operations center, the token is not valid for use with the CloudBees CI MCP Router and a connection cannot be established. |
To generate an API token:
-
Sign in to the operations center.
-
Select in the upper-right corner, and then select Security.
-
Select Add new token.
-
Enter a name to distinguish the token, and then select Generate.
-
Copy the token and store it in a secure location for later use.
Once you leave the page, you cannot view or copy the token again. -
Select Done to add the token.
-
Select Save to save your changes.
Encode credentials for HTTP basic authentication
Authenticate with the CloudBees CI MCP Router using HTTP basic authentication by encoding your username and API token together.
To encode credentials on Linux, macOS, or Windows:
Open a terminal and run the following command, replacing <username> and <token> with your actual username and the API token you generated in the operations center:
echo -n "<username>:<token>" | base64
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("<username>:<token>"))
If successful, the Base64-encoded credential is output, similar to the following:
dXNlcm5hbWU6dG9rZW4=
Store the encoded credential in a secure location for later use.
| Base64 encoding is not encryption. Anyone with access to the encoded string can decode it and obtain your credentials. Always protect the encoded credentials as if they are the original username and token. |