StrataAPI Manager

A StrataBI Platform Module

Powered by Shaleio

module id strataapi · requires StrataBI

Note
In development, not yet available. This page describes the design: what StrataAPI Manager does as it is being built. It has not run in AWS or been tested against StrataBI yet. See In development for what else we are working on.

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.

text
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 role

What it does

Note
Your account's usual governance still applies: its AWS administrators can read any secret in it, these included, and anyone you allow to tag these secrets can bind them. StrataAPI Manager gives that right only to its own admin function.

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:

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:

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.

SettingDefault
Allow personal tokensOn
Let module users add credentialsOff
Allow credentials without an expiry dateOn
Longest expiry (days ahead)730

Install

powershell
stratactl install strataapi
SettingDefault
admin_actorsnoneWho administers. With nobody, nothing can be bound.
recovery_window_days307–30: how long a deleted credential can be restored.
sweep_schedulerate(1 hour)How often the reconcile runs.
Setting ceilingsThe 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).

Modules · StrataLake · Security