Skip to main content

Tenancy: realm and billing account

Vluna uses two distinct scopes. Do not mix them up.

Concepts

ConceptIdentifierMeaning
Realmrealm_idProject boundary. All data is isolated by realm.
Billing accountbilling_account_idAccount boundary for billing data and enforcement decisions.

Request scoping (HTTP)

Every request must include:

  • X-Realm-Id: <realm_id>

Account-scoped requests also include account context, typically via:

  • X-Principal-Id: <principal_id> and/or
  • X-Billing-Account-Id: <billing_account_id>

For public /api/v1 endpoints, the bearer token is typically issued for a principal and implicitly scopes the billing account.

What should be constant vs per request

FieldTypical sourceChanges when
realm_idapp configonly when you switch environments (dev, staging, prod)
service keyserver configrotates over time
principal_idyour app request contextchanges per customer
billing_account_idyour mapping tablechanges per customer

Next