Managed secret providers
DataStax Astra DB
Connect DataStax Astra DB to Alter Vault for secure API access
Overview
Section titled “Overview”Use DataStax Astra DB credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | astra |
| Category | Database |
| Credential Type | Application Token |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”Log in to the Astra Portal
Log in to the Astra Portal.
Generate a token
Open the database’s Overview tab and click Generate Token.
Copy the token
Copy the application token (starts with AstraCS:) — it is only shown once.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”Open the Developer Portal
Go to portal.alterauth.com and navigate to the application.
Add DataStax Astra DB
Go to Managed Secrets > Add Provider > DataStax Astra DB.
Enter credentials
Paste your Application Token into the credential field.
Save
Click Save. You’ll receive a grant_id to use with the SDK.
Using in Code
Section titled “Using in Code”response = await alter_app.request( HttpMethod.POST, "https://YOUR-DB-ID-REGION.apps.astra.datastax.com/api/json/v1/default_keyspace/my_collection", grant_id="YOUR_GRANT_ID", json={"find": {"filter": {}, "options": {"limit": 5}}},)- The token is injected via the
Tokenheader at the database’s Data API endpoint.