Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables in headers : Avoid secrets in the payload #79

Closed
baubakg opened this issue Mar 14, 2024 · 0 comments · Fixed by #121
Closed

Variables in headers : Avoid secrets in the payload #79

baubakg opened this issue Mar 14, 2024 · 0 comments · Fixed by #121
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@baubakg
Copy link
Member

baubakg commented Mar 14, 2024

The json payload is quite dangerous regarding secrets. We need to find a way to avoid passing secrets dirctly in the payload.

We can send secrets in the headers. When received they are available to the calls as values.

We also forbid the showing of these variables by chance. I.e. if the result is equal to a header we do not show it.

Rules: Header should have the prefix "IBS-"

Example:

  1. We call http://localhost:8080/call
  2. We pass headers IBS-USERNAME, IBS-password
  3. Payload
{
    "callContent": {
        "LOIGIN": {
            "class": "<package name>.<class Name>",
            "method": "<method name>",
            "args": ["IBS-USERNAME","IBS-password"]
        }
    }
}

In the call above the callContent payload will not have the secrets directly in the payload. When dealig with the payload we directly fetch the secrets from the headers.

If the result contains the secrets, we will either:

  • Throw and exception/forbidden return value
  • Obfuscate the result

Exceptions:
ConfigException if the header variable is also the title of a callContent
ConfigException if the header variable is not present

@baubakg baubakg added the enhancement New feature or request label Mar 14, 2024
@baubakg baubakg added this to the 2.11.15 milestone Mar 14, 2024
@baubakg baubakg self-assigned this Mar 14, 2024
@baubakg baubakg modified the milestones: 2.11.15, 2.11.16 Mar 18, 2024
@baubakg baubakg changed the title Avoid secrets in the payload Variables in headers : Avoid secrets in the payload May 4, 2024
baubakg added a commit that referenced this issue May 4, 2024
baubakg added a commit that referenced this issue May 4, 2024
@baubakg baubakg linked a pull request May 4, 2024 that will close this issue
3 tasks
baubakg added a commit that referenced this issue May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant