Generating a New Access Key
An access key lets scripts and CI/CD pipelines call the Governor REST API. Send the key in the X-Access-Key header.
A key can do everything the user who generated it can do. Keys can’t be limited to particular workflows or projects. For a pipeline, generate the key as a dedicated user that only has access to what the pipeline needs, for example a user that is a member of the QA project only.
To generate a key, you need the Open the access keys page permission. Among the built-in roles, only Administrator has it, but you can add it to a custom role, such as one for a pipeline user.
Step 1: Open the access keys page
-
In the left-hand menu, under Administration, click Access keys.
-
Click Generate a New Access Key. A dialog opens.
Step 2: Generate the key
-
In Key Expiry, choose how long the key works:
-
1 hour
-
12 hours
-
1 day
-
30 days (the default)
-
90 days
-
180 days
-
1 year
-
-
Click Generate.
A key can’t be revoked yet: there is no button or API for it. Choose the shortest expiry that works for you, because expiry is the only way to limit how long a key can be used.
Step 3: Copy and save the key
The key is shown only once: the platform stores only a hash of it. Copy it from the dialog, or click the copy button, and save it in your secret store before you close the dialog.
An expired or invalid key gets an HTTP 401 response from the API.
Access keys are sensitive credentials. Keep them in a secret store, don’t share them, and replace them before they expire.