StrataAPI Manager
A StrataBI Platform Module
Powered by Shaleio
module id strataapi · requires StrataBI
API tokens for StrataBI modules that call other services. A person enters a token once, in StrataAPI Manager's page in StrataBI. It is stored in AWS Secrets Manager in your own AWS account and never shown again. An administrator binds it to the modules that may use it, and each module's own Lambda role reads it when it runs. AWS enforces every binding: a binding is a tag on the secret, and a module's role may read only the secrets tagged for it.
person
│ StrataAPI Manager's page in StrataBI
▼
admin function: stores and tags secrets, cannot read one
│
▼
Secrets Manager (your account): one secret per credential, own KMS key
▲
│ read only while the secret is tagged for that module (IAM)
│
a module's Lambda roleWhat it does
- Credentials stay in your account. Each credential is one secret in your own AWS Secrets Manager, encrypted with StrataAPI Manager's own KMS key. The key can be used only through Secrets Manager, and only for these secrets. The module's registry holds what describes a credential (name, provider, base URL, scheme, owner, dates, last four characters), never its value.
- Write-only after saving. Once a value is saved, nobody is shown it again: the app shows its last four characters, its owner, its expiry and the modules it is bound to. The admin function, which stores and tags secrets, is denied reading them. The function behind the app's pages has no access to Secrets Manager or the key at all. Guildmaster never sees a credential's value.
- A module reads only what is bound to it, enforced by IAM. A module opts in once, in its own OpenTofu, with one reusable policy that names its module id and no credential. Its role may read a secret only while the secret is tagged for that module and active, and only the current version. Unbinding, revoking or an expiry changes the tags, and applies from the module's next read. Nobody edits a policy to hand out a token.
- Every change is audited. The app's Audit tab records every add, rotation, binding, unbinding, revocation, deletion, restore and refusal, and who made it. Secrets Manager logs each read in CloudTrail, naming the role that read it.
- Changes fail closed. A grant is recorded before the tag is added; a removal changes AWS first. An hourly reconcile compares each credential with its secret's tags, and the more restrictive side wins: a binding whose tag has gone missing is marked drifted and is never granted again automatically.
- Revoking stops every use at once and overwrites the value. Deleting has a recovery window (7 to 30 days, 30 by default), during which an administrator can restore the credential, without its bindings.
Personal tokens and service accounts
A credential reads at the provider as one identity, for everyone who sees what a module builds with it. StrataBI's own access rules decide who sees a dashboard; the provider's rules apply only to the identity behind the token. So StrataAPI Manager shows this whenever a personal token is added, replaced or bound:
This is a personal token. Everyone who can see dashboards built on it sees what<who>can see at<provider>, whatever their own access there. Use a service account with only the access these dashboards need.
Adding or binding a personal token needs the person to tick that they understand it. The Add form offers a service account first and recommends it. A service account:
- has exactly the access the dashboards need at the provider, read-only where possible;
- does not leave with a person, change when they change teams, or carry their private data;
- is named in the credential's "Account at the provider", so everyone can see whose access it is.
An administrator can turn personal tokens off in StrataBI's admin console, and the installer can forbid them entirely. Turning them off stops new personal tokens being added, rotated or bound; those already bound keep working until an administrator replaces, unbinds or revokes them, and the app marks each one.
Using it
Apps > StrataAPI Manager:
- Add: provider, name, base URL, scheme (a bearer token or personal access token, an API key in a header, or a username and password), the value, service account or personal, the account at the provider, and an expiry date. Administrators may add; so may everyone else, if an administrator allows it.
- Credentials: search and filter. Each credential shows its details, last four characters, owner, expiry, bindings and history. Administrators bind and unbind it from a list of installed modules. A credential can be rotated (a new value), replaced (a new value, scheme or account) or have its details edited; its owner may rotate and edit it. Administrators revoke, delete and restore.
- Audit: every change and refusal, by month.
StrataBI's module access rules decide who opens StrataAPI Manager at all. Within it, the administrators named at install administer; everyone else may look, and add if allowed. Binding always needs an administrator.
Admin settings
In StrataBI's admin console, Modules tab. The installer can set a ceiling on each.
| Setting | Default |
|---|---|
| Allow personal tokens | On |
| Let module users add credentials | Off |
| Allow credentials without an expiry date | On |
| Longest expiry (days ahead) | 730 |
Install
stratactl install strataapi| Setting | Default | |
|---|---|---|
admin_actors | none | Who administers. With nobody, nothing can be bound. |
recovery_window_days | 30 | 7–30: how long a deleted credential can be restored. |
sweep_schedule | rate(1 hour) | How often the reconcile runs. |
| Setting ceilings | The most each admin setting above may allow. |
It creates a KMS key, the registry table, two functions and their roles, and the hourly schedule. It creates no secret: secrets are made when people add credentials.
Removing the module schedules the key's deletion but does not delete the credentials' secrets. Delete each credential in the app first. Once the key is deleted, nobody can decrypt those secrets.
In a module
A module that needs a credential attaches StrataAPI Manager's credential_access policy to its Lambda role once, in its own OpenTofu, with its module id. It then reads a credential by name when a run needs it, through StrataAPI Manager's client library. A module whose credential is not bound, revoked or expired gets a clear error, not a value.
A module that shows data read with a credential should say on its own pages what a personal token means, as above.
The PostgreSQL Connector can sign in with a StrataAPI Manager credential.
Planned
OAuth2 client credentials are designed, not built. The app lists the scheme as planned and refuses it.
AWS services
AWS Secrets Manager (one secret per credential), AWS KMS (one key), Amazon DynamoDB (the registry), AWS Lambda (two functions), Amazon EventBridge (the hourly reconcile), Amazon S3 (StrataBI's system bucket), and AWS CloudTrail (reads and changes, in your account's trail).
Shaleio