1.3 KiB
1.3 KiB
Secrets and Redaction
Storage
Secrets are supplied through Docker secrets or read-only files below /run/secrets. Configuration stores only a secret reference.
Example:
credentials:
type: docker_secret
reference: gitea_mcp_read_token
No real secret appears in Git, catalog YAML, .env.example, test fixtures, screenshots, evidence, or generated client configuration.
Redaction stages
- reject secret-shaped input where a field should not accept it;
- omit sensitive headers from logs;
- sanitize target-system output in the connector;
- apply a final result redaction profile;
- sanitize audit arguments and response summaries;
- run automated secret scanning over repository and evidence.
Patterns
At minimum detect:
- bearer/JWT tokens;
- basic auth values;
- private-key blocks;
- common API key formats;
- connection strings with passwords;
- cookies and session IDs;
- Authentik/Gitea tokens;
- environment variable names marked sensitive.
Audit representation
Use a stable argument hash and a small sanitized projection. Never solve auditability by storing the entire raw request.
UI
Secret fields are write-only. The UI shows state such as configured, missing, or last rotated, never the value or a reversible masked form.