wami
Who Am I — multicloud identity, IAM, STS and SSO for Rust.
An AWS-IAM-shaped identity model — users, groups, roles, policies, permission boundaries — that is not tied to AWS. Policy evaluation, temporary credentials, tenant isolation and token issuance are all yours to run, against whatever storage you already have.
wami holds no database and serves no HTTP. It decides, and it signs.
Install
[]
= "0.16"
= { = "1", = ["full"] }
Requires Rust 1.90.
Quick start
use ;
use WamiContext;
use InMemoryWamiStore;
use UserStore;
use build_user;
async
What is in the box
| Identity | users, groups, roles, service-linked roles, instance profiles |
| Policies | managed and inline, permission boundaries, condition keys, and an evaluator that returns why it decided, not just yes or no |
| STS | temporary credentials, role assumption, session tags, federation |
| OAuth 2.0 | client_credentials, introspection (RFC 7662), revocation (RFC 7009) |
| OpenID Connect | authorization code with mandatory PKCE, consent, refresh rotation with leak detection, ID tokens, /userinfo, discovery |
| Multi-tenancy | hierarchical tenants, isolation enforced at the ARN level |
| ARNs | a native scheme, with translation to and from AWS, GCP, Azure and Scaleway |
Authorization does not answer with a bare boolean. It returns a Decision
naming the statements that produced it — which policy, which Sid, which
index — so an audit log can say why a request was refused.
Storage is yours
Everything persistent sits behind a trait. InMemoryWamiStore ships for tests
and examples; a real deployment implements the traits over Postgres, SQLite,
DynamoDB, or whatever it already runs. Nothing in the domain or service layers
knows the difference.
Feature flags
= { = "0.16", = ["aws"] }
| flag | default | what it adds |
|---|---|---|
sts-jwt |
on | Ed25519 signing for STS credentials, OAuth and OIDC tokens |
aws, gcp, azure, scaleway |
off | ARN translation for that provider |
all-providers |
off | all four |
Providers are off by default on purpose: a build that never touches GCP should not carry the code that knows about it.
Documentation
- Getting started
- IAM guide · STS · OAuth & OIDC · Multi-tenant
- Implementing a store
- Architecture
- API reference on docs.rs
Twenty-eight runnable examples, from a five-line hello to a full OIDC sign-in:
Security
Report vulnerabilities per SECURITY.md. Please do not open a public issue for them.
License
MIT. See LICENSE.