Skip to main content

Azure Cosmos DB Credentials



Revoke the secret

There are two master keys: the primary key and the secondary key. It is possible to rotate one of the key by switching to the other, then regenerating the key to rotate. See Key rotation and regeneration.

Check for suspicious activity

The Azure Cosmos DB portal provides an activity log to monitor database activity.

Details for Azure cosmosdb assignment

  • Family: Database

  • Category: Data storage

  • Company: Microsoft

  • High recall: False

  • Validity check available: True

  • On-premise instances exist: False

  • Only valid secrets raise an alert: False

  • Minimum number of matches: 2

  • Occurrences found for one million commits: 0.02

  • Prefixed: False

  • PreValidators:

- type: ContentWhitelistPreValidator
- documents\.azure\.com


- text: |
settings = {
'host': os.environ.get('ACCOUNT_HOST', ''),
'master_key': os.environ.get('ACCOUNT_KEY', 'H0maE9FWji2oHBsj9tuj5FREJRQGXRTIAJ3fA3CS46IGK3UcjeKy1DCFHNDt4oj4nq4Bh8YYujpuAFDddR5atw=='),
'database_id': os.environ.get('COSMOS_DATABASE', 'ToDoList'),
'container_id': os.environ.get('COSMOS_CONTAINER', 'Items'),
apikey: H0maE9FWji2oHBsj9tuj5FREJRQGXRTIAJ3fA3CS46IGK3UcjeKy1DCFHNDt4oj4nq4Bh8YYujpuAFDddR5atw==

How can I help you ?