Creating Access Keys
The Access Key is a token that you must configure on Sysdig agents to successfully forward data from your environment to the Sysdig backend. If the access key is compromised or you have the policy to renew it, you can generate a new access key and disable the old one. This topic helps you to do so.
Creating an Access Key
To create an access key:
Retrieve the Sysdig API token from the Sysdig UI.
For more information, see Retrieve the Sysdig API Token.
Issue a request against the Sysdig endpoint to generate a new access key:
$ curl -XPOST -H 'Authorization: Bearer API_TOKEN' https://<your_endpoint>/api/customer/accessKeys
Replace the following:
API_TOKEN with the token you retrieved in step 1.
<your_endpoint> with your Sysdig endpoint associated with your region.
The output will provide the newly generated access key in the response.
{ "customerAccessKey": { "enabled": true, "accessKey": "87654321-1234-1234-1234-123456789012", "dateCreated": 2263852422114, "dateDisabled": null } }
The access key can now be used in the Sysdig agent configuration files.
Viewing the Available Access Keys
To view all of the access keys for your Sysdig instance, do the following:
Retrieve the API token from the Sysdig UI.
For more information, see Retrieve the Sysdig API Token.
Issue a curl GET request against the Sysdig Monitor endpoint to enable the given access key:
$ curl -XGET -H 'Authorization: Bearer API_TOKEN' https://<your_endpoint>/api/customer/accessKeys
Replace the following:
API_TOKEN with the token you retrieved in step 1.
<your_endpoint> with your Sysdig endpoint associated with your region.
The output will provide a list of the access keys in the response and indicates whether they are enabled.
{ "customerAccessKeys": [ { "enabled": true, "accessKey": "12345678-1234-4321-1234-123456789000", "dateCreated": 5242096409000, "dateDisabled": null }, { "enabled": false, "accessKey": "87654321-1234-1234-1234-123456789012", "dateCreated": 2553849361000, "dateDisabled": 2553849367000 } ] }
Disabling an Access Key
To disable an existing access key:
Retrieve the API token from the Sysdig UI.
For more information, see Retrieve the Sysdig API Token.
Issue a curl POST request against the Sysdig Monitor or Secure endpoint to disable the given access key.
$ curl -XPOST -H 'Authorization: Bearer API_TOKEN' https://<your_endpoint>/api/customer/accessKeys/ACCESS_KEY/disable
Replace the following:
API_TOKEN with the token you retrieved in step 1.
<your_endpoint > with your Sysdig endpoint associated with your region.
ACCESS_KEY with the access key that you wish to disable.
Once you disable the Sysdig access key, the agents connected with the access key will be immediately blocked from sending data to the Sysdig backend.
Deleting access keys is not supported at this time.
Enabling an Access Key
To enable an existing access key:
Retrieve the API token from the Sysdig UI.
For more information, see Retrieve the Sysdig API Token.
Issue a curl POST request against the Sysdig Monitor endpoint to enable the given access key.
$ curl -XPOST -H 'Authorization: Bearer API_TOKEN' https://<your_endpoint>/api/customer/accessKeys/ACCESS_KEY/enable
Replace the following:
API_TOKEN with the token you retrieved in step 1.
<your_endpoint > with your Sysdig endpoint associated with your region.
ACCESS_KEY with the access key that you wish to disable.
Restart the agents for the new connection to work as expected.
The agent that connects with a disabled access key will be terminated.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.