Using rotating API keys for secure data streaming
Scenario
Sarah is an administrator at Apex Global. Her organization has been using static API keys for metric, event, and log ingestion from PATROL Agents. A user unintentionally shares the static API key and the secure data streaming is compromised. To keep their systems secure, they now want to use an API key that rotates after a specific interval so that the metric, event, and log ingestion from PATROL Agents is secure.
To use rotating API keys
Refer to the following table for instructions on using rotating API keys:
To enable the API key rotation
- Log in to BMC Helix Portal and select User Access > Users and keys.
- On the Access keys tab, locate the key with Key type as API and Key name in the tenant_id@timestamp format.
The API key is created when a tenant is onboarded to BMC Helix Portal. You cannot delete the out-of-box API key that is created during the tenant onboarding process. By default the API key rotation value is set to Never rotates. - Select Actions > Key details.
- Click Edit schedule.
- Clear the Disable rotation check box and specify the Rotation interval and the Key grace period.
- Click Confirm.
The feature to use rotated API keys in BMC Helix Operations Management is not enabled and the static API key is used until the rotation period is changed from Never rotates (default value) to a desired key rotation interval in BMC Helix Portal.
To verify the API key rotation
Refer to the following table for instructions on verifying that the key rotation is enabled in BMC Helix Operations Management:
To use the latest API key
After the API key is rotated in BMC Helix Portal, make sure that you use the latest API key when you deploy packages to PATROL Agents.
For more information, see the following topics:
In addition to deploying packages, if you use the API key to authenticate API URLs and deploy the BMC Helix Monitor Agent, make sure that you use the latest API key each time the key rotates.
For more information, see the following topics:
To restart the PATROL Agent
If the PATROL Agent version is earlier than 23.1, restart the PATROL Agents within the grace period to use the rotated API key.
PATROL Agents version 23.1 or later use the rotated API key and don't require a restart.
For information about restarting PATROL Agents, see the following topics:
To view the monitor policy
View the Policy for rotated API key push policy to verify that the policy uses the rotated API key value in BMC Helix Operations Management by performing the following steps:
- Log in to BMC Helix Operations Management.
- Select Configuration > Monitor Policies.
- Verify if the Policy for rotated API key push is listed.
This policy is listed after the API key is enabled by setting a rotation interval (interval changed from Never rotates to desired key rotation interval) in BMC Helix Portal and pushes the rotated API key to all PATROL Agents.
For more information, see Defining-monitor-policies.
To view the event
The information event in BMC Helix Operations Management notifies users about the key rotation, indicates that all PATROL Agents are connected, and the rotated API key can be pushed to PATROL Agents.
- Log in to BMC Helix Operations Management.
- Select Monitoring > Events.
- Verify if an information event is listed.
This event is generated after the API key rotates in BMC Helix Portal.