demo: api shield → schema validation
GET /api/shield-schema requires a query parameter
id with OpenAPI format uuid. api shield
enforces this at the edge. valid uuid → 200 with echoed id. missing or
non-uuid → 403 from api shield, function never runs.
click a button…
# from your terminal
# valid → 200
curl -s "https://rhocfsandbox.com/api/shield-schema?id=$(uuidgen)"
# invalid → 403 (from api shield, not the function)
curl -si "https://rhocfsandbox.com/api/shield-schema?id=hello" | head -1
curl -si "https://rhocfsandbox.com/api/shield-schema" | head -1 # the schema
openapi: "3.0.3"
info: { title: "rhocfsandbox demo schema", version: "1.0" }
servers: [{ url: "https://rhocfsandbox.com" }]
paths:
/api/shield-schema:
get:
parameters:
- name: id
in: query
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: OK } | schema name | SITE_api_shield_schema |
| operation | GET rhocfsandbox.com /api/shield-schema |
| mitigation action | block (403 from api shield) |