Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.04 KB

File metadata and controls

46 lines (34 loc) · 1.04 KB

Scripts — curl examples & E2E

Start the API (from repo root):

./scripts/start-server.sh

Or manually: sbt protectionApi/run

Individual examples

Script Description
health.sh GET /v1/health
ready.sh GET /v1/ready
protect-plain-text.sh Mask email + phone in plain text
protect-json-chatbot.sh Mask credit card in chatbot JSON
protect-batch.sh Batch protect two payloads
put-policy-strict.sh Upload block-on-SSN policy
protect-block-ssn.sh Trigger blocked response (422)
get-policy.sh [tenant] Fetch tenant policy

Full end-to-end

./scripts/run-e2e.sh

Starts the server if needed, runs all checks, then stops a server it started.

Auth (optional)

export DPS_AUTH_TOKENS=secret-token   # on server
export DPS_AUTH_TOKEN=secret-token    # for curl scripts
./scripts/protect-plain-text.sh

Custom base URL / port

export DPS_PORT=9090
export DPS_BASE_URL=http://localhost:9090
./scripts/run-e2e.sh