Claus Ibsen created CAMEL-27722:
-----------------------------------
Summary: camel-rest-postman - the served collection keeps
credentials in headers, variables and URLs
Key: CAMEL-27722
URL: https://issues.apache.org/jira/browse/CAMEL-27722
Project: Camel
Issue Type: Bug
Components: camel-rest-openapi
Reporter: Claus Ibsen
Fix For: 4.24.0
When {{apiContextPath}} is set, camel-rest-postman serves the collection
document on that path. {{PostmanRedactor.redact()}} removes every {{auth}}
block and replaces the value of variables of type {{secret}}, but the rest of
the document is served as it was loaded, so these values are not masked:
* literal header values of credential headers in requests and saved example
responses, such as {{Authorization}}, {{Proxy-Authorization}}, {{x-api-key}},
{{api-key}}, {{Cookie}}, {{Set-Cookie}} and any header whose name contains
{{token}}
* collection variables of the default type whose name marks a credential, such
as {{apiKey}}, {{password}} or {{accessToken}}
* credentials in request URLs: the password in the userinfo
({{https://user:password@host}}) of the raw URL, and query parameters such as
{{api_key}}, {{apikey}}, {{token}}, {{access_token}}, {{password}} or
{{secret}}, both in the raw URL and in the structured {{query}} array
Proposed change: {{PostmanRedactor}} masks these values too, with the same
{{***}} mask, using {{SensitiveUtils.isSensitiveHeader}} for the names and
{{SensitiveUtils.maskUserInfoCredentials}} for the userinfo. A value that is
only a Postman variable reference ({{{{apiKey}}}}) is a placeholder and is left
as it is. Document what the served collection masks.
_Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)