Authentication
Every data-plane request requires a project API key in the Authorization header:
Authorization: Bearer strent_test_your_opaque_secretcurl https://api.strent.dev/v1/active_items/list \ --request POST \ --header 'Authorization: Bearer strent_test_your_opaque_secret' \ --header 'Content-Type: application/json' \ --data '{"stripe_customer_id":"cus_123"}'Security boundary
Section titled “Security boundary”The key selects and authenticates one Strent project. It does not authenticate your application’s user and does not prove that a user may access a Stripe Customer or application resource.
Keep API calls on your server:
- Authenticate the application user.
- Authorize the user against your own account or resource.
- Resolve the account’s trusted
stripe_customer_id. - Call Strent with the server-held project API key.
- Combine the returned billing fact with your application policy.
Key lifecycle
Section titled “Key lifecycle”- Give each consuming server a recognizable key.
- Store secrets in a managed secret store.
- Create a replacement before revoking an old key.
- Revoke a key immediately when it may have been exposed.
- Never log the full key or include it in client-visible diagnostics.