Skip to content

test(mysql-crud): add secret-bearing /users/{id}/credentials endpoint - #153

Open
KC1706 wants to merge 1 commit into
mainfrom
test/mysql-crud-secret-credentials-endpoint
Open

KC1706 wants to merge 1 commit into
mainfrom
test/mysql-crud-secret-credentials-endpoint

Conversation

@KC1706

@KC1706 KC1706 commented Sep 15, 2026

Copy link
Copy Markdown

What

Adds a GET /users/{id}/credentials endpoint to the mysql-crud sample that returns a fixed, detected secret next to a benign sibling in both:

  • the body — password (secret) / password_hint (benign sibling), and
  • the response headers — Token (secret) / Token-Expiry (benign sibling).

The endpoint stores nothing and touches no table; the values are constants so CI can grep for them.

Why

Used by keploy/enterprise's selfhosted-cloud-replay e2e to exercise test-case response obfuscation (secret.ObfuscateTestCase) end to end. The existing sample endpoints return no secrets, so that obfuscation path was never exercised in a live record→replay. Recording this endpoint with secret protection enabled lets the pipeline assert the secret is redacted (not persisted in plaintext) while the benign sibling survives.

The secret + benign-sibling shape mirrors the exact over-broad-noise bug fixed in keploy/enterprise#2482 (body.password silencing body.password_hint; header Token silencing Token-Expiry).

Notes

  • Additive only — no existing endpoint or behavior changes.
  • The secret value is a generic high-entropy test string (not a real vendor token).

🤖 Generated with Claude Code

Adds a GET /users/{id}/credentials endpoint that returns a fixed, detected
secret next to a benign sibling in both the body (password / password_hint)
and the response headers (Token / Token-Expiry).

Used by keploy/enterprise's selfhosted-cloud-replay e2e to exercise test-case
response obfuscation (secret.ObfuscateTestCase) end to end: recording this
endpoint with secret protection enabled lets the pipeline assert the secret is
redacted (not persisted in plaintext) while the benign sibling survives. The
endpoint stores nothing and touches no table; values are constants so CI can
grep for them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@KC1706
KC1706 force-pushed the test/mysql-crud-secret-credentials-endpoint branch from 0b61eaa to 74c5d4f Compare September 15, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant