Documentation
¶
Overview ¶
Command valiss issues tenant credentials for gRPC and HTTP services using the operator/account/user nkey model (NATS style). It is stateless: key pairs are printed once at generation and never stored; signing seeds are supplied via VALISS_SEED_<PUBKEY> environment variables.
valiss keygen operator # one-time: operator key pair (trust anchor) valiss keygen account # per-tenant key pair valiss keygen user # per-end-user key pair valiss creds ACCOUNT[/USER] # mint credentials for one entity
creds reads a token manifest (valiss.yaml in the working directory, override with -f) declaring the credential tree, resolves every required seed from VALISS_SEED_<PUBKEY> environment variables (failing when one is missing), and writes the credentials to stdout and their metadata -- including the jti the server-side allowlist accepts -- to stderr as YAML. User creds carry only the user token; -bundle additionally embeds a fresh account token for servers that do not resolve account tokens themselves. Manifest entries without a key get a fresh key pair generated per invocation; the seed ships inside the creds and is never stored.
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
grpcauth
command
Example grpcauth shows the full tenant-auth wiring for gRPC: an operator issues a scoped account token, the server installs the auth interceptors, and the client attaches the credential to every call.
|
Example grpcauth shows the full tenant-auth wiring for gRPC: an operator issues a scoped account token, the server installs the auth interceptors, and the client attaches the credential to every call. |
|
httpauth
command
Example httpauth shows the full tenant-auth wiring for net/http: an operator signs a scoped account token, the server wraps its mux with the auth middleware, and the client signs every request via the transport.
|
Example httpauth shows the full tenant-auth wiring for net/http: an operator signs a scoped account token, the server wraps its mux with the auth middleware, and the client signs every request via the transport. |
|
internal
|
|
|
manifest
Package manifest reads the valiss.yaml token manifest: the public, non-secret description of the credential tree (operator public keys, accounts with their public keys and scopes, users under each account).
|
Package manifest reads the valiss.yaml token manifest: the public, non-secret description of the credential tree (operator public keys, accounts with their public keys and scopes, users under each account). |
|
pkg
|
|
|
creds
Package creds implements the client credentials file: the subject's token plus the seed that signs its requests, modeled on the nsc creds format.
|
Package creds implements the client credentials file: the subject's token plus the seed that signs its requests, modeled on the nsc creds format. |
|
grpcauth
Package grpcauth wires the tenant authentication scheme into gRPC: server interceptors that verify the per-request credential and a client per-RPC credential that attaches it.
|
Package grpcauth wires the tenant authentication scheme into gRPC: server interceptors that verify the per-request credential and a client per-RPC credential that attaches it. |
|
httpauth
Package httpauth wires the tenant authentication scheme into net/http: a server middleware that verifies the per-request credential and a client http.RoundTripper that attaches it.
|
Package httpauth wires the tenant authentication scheme into net/http: a server middleware that verifies the per-request credential and a client http.RoundTripper that attaches it. |
|
token
Package token implements the core of the tenant authentication scheme, modeled on NATS operator/account credentials:
|
Package token implements the core of the tenant authentication scheme, modeled on NATS operator/account credentials: |