PRODUCT · SCHEMA & SECURITY

Know the contract before you call it.

A route tells you where to send a request. A schema tells you whether the response is correct. Jetic keeps request shapes, response fields, auth schemes, and ownership rules next to the endpoint they describe.

JSON schemasBearer + API keyOwnership checksSecret refs
.jetic/model.json — security
"securitySchemes": {
"bearerAuth": {
"type": "http", "scheme": "bearer",
"obtainedFrom": "POST /api/auth/login"
},
"apiKey": { "type": "apiKey", "in": "header", "name": "x-api-key" }
},
"ownership": { "ownerField": "userId", "mustMatchAuthClaim": "sub" }
Token producers feed protected steps automatically

THE CONTRACT

Schemas that do real work in a run.

Jetic does not treat schemas as documentation. They drive value generation, required-field checks, response validation, and the auth chain between steps.

01Input

Request schemas

Field types, required flags, formats, enums, defaults, and examples.

02Output

Response schemas

Status-specific fields that assertions can validate after a call.

03Rules

Business constraints

Min length, patterns, and conditional rules lifted from handler logic.

04Auth

Security schemes

Bearer, API key, cookie, and OAuth2 definitions with scopes.

05Chain

Token producers

The login endpoint that issues a value later steps consume as a header.

06Authz

Ownership rules

Which resource field must match which auth claim to allow access.

AUTH CHAINS

Capture the token once. Inject it everywhere.

A security scheme can name the endpoint that produces its credential. When a workflow runs that endpoint, Jetic captures the token into memory and later protected steps consume it without extra plumbing.

  • Producer and consumer endpoints stay linked in the model
  • Authorization headers are generated from captured memory
  • API keys and cookie values use the same chain
  • Scopes are validated for OAuth2 requirements
auth-chain
$jetic_validate_workflow
✔ POST /api/auth/login produces accessToken
✔ GET /api/orders consumes bearerAuth
✔ GET /api/users/:id consumes bearerAuth + ownership
! POST /api/admin/refund requires scope admin
inject header:Authorization ← Bearer {{workflow:accessToken}}

SECURITY MODEL

Explicit rules, reviewable in a file.

Security behavior is data in the model and conditions in the workflow, not hidden inside a test script.

Authentication
Declare a scheme per endpoint. The runner adds the required header only when the step consumes a captured or configured value.
Authorization
Ownership rules compare a resource field with an auth claim. A mismatch is a failed check, not a silent pass.
Rate limits
Rate-limit middleware is recorded with its window and max. Negative tests can expect 429 with continueOnStatus.
Secrets
Environment variables and secret references are resolved at run time. Values are never written into run reports.
Validation
Request and response schemas constrain generated values and assert the shape that came back.
Failure modes
401, 403, 404, and 409 are first-class expectations rather than unexpected errors.

Jetic records the security behavior it can verify. It does not claim to be a penetration-testing tool or a replacement for a security review.

SCHEME SUPPORT

Credentials the model understands.

SchemeWhere it goesHow workflows use it
BearerAuthorization headerCapture the token from its producer; inject it on protected steps.
API keyHeader, query, or cookieReference the key in the model; the runner places it in the declared location.
CookieCookie headerCookie session values are supplied as headers or captured from a login step.
OAuth2Authorization header with scopesScopes are declared per endpoint; the producer is recorded for the token exchange.

NEXT

Put the contract to work.

SCHEMA FAQ

Frequently asked questions

Do I have to write schemas for every endpoint?

No. The scanner gets you a working model without them. Screens and constraints improve coverage and make assertions stronger, but they are additive.

Where do secrets live?

Values are supplied through environment variables or secret references. The model stores the reference, not the secret, and reports redact sensitive values.

Can Jetic test unauthorized access?

Yes. Set the expected status to 401 or 403 and use continueOnStatus where a failure is the behavior under test. The trace records what was sent and returned.

What if an endpoint returns multiple shapes?

Model each status code separately under responses. Simulation asserts the expected status and validates against that status's schema.

Contracts first. Confidence after.

Declare the request, the response, and the credential once. Then let every workflow reuse the same rules.

Explore the docs