Skip to content
SHC Docs

shc connection grant

authorise a connection to mint a capability for a tenant

Grant a connection the right to mint a capability’s scoped sub-credential for another tenant. A connection-backed integration edge (-i s3=@<connection>) is denied unless a matching grant exists for the (connection, capability, grantee) triple.

--boundary attaches an optional permissions-boundary policy (a file path or inline JSON): effective mint permissions = the app’s declared policy ∩ this boundary, enforced by the backend. Re-granting the same triple with a new --boundary re-scopes it.

Held capabilities (s3 on an s3 connection, llm on an llm connection) serve the connection’s own credential unless a scope is minted, so --boundary is required for them and speaks the scope document instead of a backend policy: {“buckets”:[“my-bucket”]} mint a credential restricted to those buckets (supported where the endpoint’s provider can mint one: Exoscale SOS today) {“unscoped”:true} acknowledge that the connection’s own credential is what the grantee receives Granting a held capability with neither is refused (X403922CONUNS).

shc connection grant <connection> [flags]
shc connection grant aws-primary --capability s3-bucket --grantee acme
shc connection grant aws-primary --capability aws-iam --grantee acme --boundary ./boundary.json
shc connection grant exos3 --capability s3 --grantee acme --boundary '{"buckets":["acme-data"]}'
shc connection grant hz-s3 --capability s3 --grantee acme --boundary '{"unscoped":true}'
--boundary string permissions-boundary policy: a JSON file path or inline JSON. Required for held capabilities, where it is the scope document {"buckets":[...]} or {"unscoped":true}
--capability string capability to grant (e.g. s3-bucket)
--grantee string tenant authorised to mint against the connection
-h, --help help for grant
-t, --tenant string owning tenant (defaults to the active tenant)
--config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win
-d, --debug enable debug mode (default: $SHC_DEBUG)
-e, --environment string environment name (default: "prod", or "default" on an estate with no licence and no trial; $SHC_ENVIRONMENT and shc ctx -e override it, and the "master" tenant is always "default")
--exclude string comma-separated dotted paths to drop
--fields string comma-separated columns/keys to show (and their order)
--filter string comma-separated dotted paths to keep (drops everything else)
-o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT)
-s, --stack string stack name (default: $SHC_STACK)
-v, --verbose verbose output (default: $SHC_VERBOSE)