Publish the security contract
orders:write can satisfy the
first entry, while the API key can satisfy the second. Schemes inside one entry compose with
logical AND. This follows OpenAPI’s native OR-of-AND model and avoids a second security language.
An operation-level security: [] makes that operation public even when the document declares
global security.
Declare principal contracts and fixture profiles
Principals explains the caller model and grant ownership in full. The declaration below combines that contract with two concrete fixture profiles.grants describes the
scopes available through that credential. A profile references one principal and fills its
credential slots with synthetic values. The compiler checks that every value fits the scheme:
- API keys, bearer tokens, OAuth 2.0, and OpenID Connect use
value. - HTTP Basic uses
usernameandpassword. - profile
statusacceptsactive,revoked, orexpiredand defaults toactive. - principal credential
grantscontains the scopes profiles of that principal may exercise.
sim_test_*. The compiled artifact contains those fixture
values so the emulator can compare requests. Keep production credentials out of configuration,
artifacts, examples, and source control. simile describe service lists principal contracts and
fixture profiles while withholding credential values.
Send authenticated requests
Provider-authored
protocol_error mappings can replace Simile’s fallback envelopes for
authentication_required and permission_denied.
Authenticate with a setup-created profile
Anissue declaration fills one credential slot from the principal contract:
simile setup, the running service matches that value using the same security rules as a
fixture profile. Multiple active profiles remain valid together. The principal and profile follow the
request into committed effects and deferred webhook delivery so per-application destinations and
signing secrets remain isolated.