Skip to content

Conversation

@Kami
Copy link
Member

@Kami Kami commented Mar 13, 2019

Our logging middleware didn't mask / remove auth token and api key values if those were provided via query parameters and not headers.

This pull request fixes that.

Keep in mind that providing it as header is still preferred, especially when integrating with 3rd party services, because a lot of services log actual full URL with a query string which could mean leaking those values there. I will add a note about that to the docs.

Resolves #4589.

Also, as commented on #4589, I believe that issue actually talks about token being logged in a loadbalancer log or similar because the log line doesn't look anything like st2api log line. In that scenario we can't do anything about that and that's why I mentioned above, using headers is preferred (and I will also document that).

TODO

  • Tests
  • Documentation change

provided using "?st2-api-key" query parameter.
@Kami Kami added the bug label Mar 13, 2019
MASKED_ATTRIBUTES_BLACKLIST constant and log.mask_secrets_blacklist
config option.
@Kami
Copy link
Member Author

Kami commented Mar 13, 2019

I forgot I already added a note about that to the docs in the past so I only made a small formatting change - StackStorm/st2docs#866.

Copy link
Contributor

@bigmstone bigmstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Kami Kami merged commit 89bf032 into master Mar 13, 2019
@Kami Kami deleted the mask_secret_query_param_in_api_logs branch March 13, 2019 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The api key in the st2api log is not obfuscated

3 participants