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

Mask writekey when printing events #103

Merged
merged 1 commit into from
Nov 6, 2020
Merged

Conversation

MikeGoldsmith
Copy link
Contributor

Occasionally an event may be printed in a debug message. However, an event contains the writekey which is sensitive and shouldn't be shared.

This change masks the apikey so only he last four characters are visible, with the remainder is masked with X.

@MikeGoldsmith MikeGoldsmith requested a review from a team November 5, 2020 14:51
Copy link
Member

@martin308 martin308 left a comment

Choose a reason for hiding this comment

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

The code makes sense to me. I'm guessing we should be making tickets to port this feature to all of the other libhoneys as well to maintain feature parity?

@MikeGoldsmith
Copy link
Contributor Author

I've created tickets to verify behaviour in other SDKs.

@MikeGoldsmith MikeGoldsmith merged commit a32a20f into main Nov 6, 2020
@MikeGoldsmith MikeGoldsmith deleted the mike/mask-event-writekey branch November 6, 2020 12:48
MikeGoldsmith added a commit that referenced this pull request Jun 21, 2021
….response_test

* 'main' of github.com:honeycombio/libhoney-go: (42 commits)
  prepare v1.15.3 release (#126)
  Bump github.com/klauspost/compress from 1.11.13 to 1.12.2 (#122)
  Bump github.com/klauspost/compress from 1.11.8 to 1.11.13 (#120)
  Add go 1.16 to the testing matrix (#119)
  Bump github.com/klauspost/compress from 1.11.7 to 1.11.8 (#118)
  Bump github.com/DataDog/zstd from 1.4.5 to 1.4.8 (#117)
  Add more context to batch response parsing error (#116)
  Add go 1.15 to the testing matrix (#114)
  Bump github.com/klauspost/compress from 1.11.4 to 1.11.7 (#112)
  Prepare v1.15.2 release (#113)
  add our custom action to manage project labels (#110)
  automate the creation of draft releases when project is tagged with a version number (#109)
  Prepare for v1.15.1 (#108)
  Fix data race on dynFields length in Builder.Clone (#72)
  Bump github.com/klauspost/compress from 1.11.3 to 1.11.4 (#106)
  Bump github.com/klauspost/compress from 1.11.2 to 1.11.3 (#105)
  prepare 1.15.0 release (#104)
  Bump github.com/klauspost/compress from 1.11.0 to 1.11.2 (#102)
  mask writekey when printing events (#103)
  Bump github.com/klauspost/compress from 1.10.11 to 1.11.0 (#101)
  ...
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.

2 participants