Core concepts
The ideas behind Rivergate: who owns what, how access is decided, and how secrets are stored and changed over time.
The resource hierarchy
A single Rivergate deployment hosts any number of independent companies or teams. Everything is organized in one tree, and every request is scoped to a position in it.
Deployment
└── Organization tenant boundary: members, policies, audit, keys
└── Project an application or product
└── Environment development, staging, production…
└── Secret
└── Secret version immutable, encrypted
| Resource | What it represents | Owns |
|---|---|---|
| Organization | The tenant boundary — a company, business unit or independently administered customer. | Members, policies, projects, audit scope and its own cryptographic boundary. |
| Project | An application, service or product inside one organization. | Environments and a project encryption key. |
| Environment | A deployment context such as staging or production. | Secrets. |
| Secret | A named value with a type, tags, description and optional expiry. | Immutable versions. |
| Secret version | One historical value, encrypted with its own data key. | Ciphertext and wrapped key material. |
Tenant isolation
- A person can belong to several organizations with a different role in each. Access to one never grants access to another.
- Every protected operation checks the caller's identity, the organization in the path, and the exact project, environment or secret.
- Lookups are tenant-scoped in SQL and enforced with composite foreign keys, so a guessed or substituted identifier from another tenant fails.
- Each organization has its own key-encryption key, and ciphertext is bound to its organization, project, environment, secret and version through authenticated data.
- Cross-tenant requests return non-enumerating errors: a resource you cannot see looks the same as one that does not exist.
Identity is separate from authorization
These two questions are answered by different systems.
| Question | Answered by |
|---|---|
| Who is this person? | Your OIDC provider (Keycloak recommended). Rivergate keys each identity on the exact (issuer, subject) pair. |
| What may they do here? | Rivergate: its own memberships, roles and scoped policies, evaluated on the backend for every request. |
OIDC groups, email addresses and frontend claims never grant access. A newly authenticated, unmapped identity has no permissions until an administrator grants some. One Keycloak realm can serve many Rivergate organizations; the organization, not the realm, is the tenant boundary.
Read more in Authentication and Secrets and access.
Secrets and versions
- Metadata and values are separate. Listing secrets or history returns metadata only. A value is returned only by an explicit read that is authorized and audited first.
- Every update creates a new version. Versions are immutable, so history is never overwritten.
- Rollback adds a version. It re-encrypts a chosen historical value as the new current version; nothing is rewound.
- Deletion is soft. Deleted resources become unavailable through the API while encrypted versions are retained.
Two capabilities, one platform
Tenant-scoped storage, encrypted versions, policy checks, key hierarchy and rotation, leased credentials, and the audit log.
Metrics, traces, logs and health for Rivergate itself, kept separate from the security audit log.
They are two parts of one product and one dashboard, not separate services.
What lives where
| Store | Contains | Never contains |
|---|---|---|
| PostgreSQL | Tenants, encrypted secret versions, wrapped keys, policies, identities, session and token verifiers, audit records. | Plaintext secrets or root key material. |
| Redis | Short-lived, single-use, encrypted OIDC sign-in state. | Secrets, keys, tokens or audit records. |
| Key directory | Versioned root-key files, outside the database. | — |
| Worker key file | The audit checkpoint signing key. | — |