- the API contract defines authentication mechanisms and operation requirements;
- a principal defines a caller kind, its credential slots, and its grants;
- a profile supplies concrete local values for one principal;
principal_setupexplains how Simile provisions profiles of that principal.
Declare a principal
The principal label becomes its service-wide name:application identifies the caller kind. merchantOAuth and secretKey refer to security schemes
published by the selected API contract. Simile verifies those references while compiling the
service.
The declaration contains no secret values. Values arrive through fixture profiles or a
principal_setup workflow.
Credential contracts
Eachcredential block creates one slot on the principal:
Several slots let one principal support several authentication mechanisms. OpenAPI continues to
decide which mechanism or combination an operation accepts.
Grants
grants records the scopes available through one principal credential. Consider an operation with
this OpenAPI requirement:
authentication_required; an active
profile whose principal lacks a required grant produces permission_denied.
Profiles instantiate principals
A profile supplies concrete values for the slots declared by its principal:simile setup live in
the service state database. Both travel through the same authentication and authorization path.
Provision profiles
principal_setup names the principal it provisions:
--principal. Pass --profile separately
when the generated lowercase adjective-(noun|adjective) name should be replaced by a stable name.