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

Add Secure logs level support #138

Conversation

imjaroiswebdev
Copy link
Collaborator

Add support for an extra logging level capability for PagerDuty Terraform Provider, allowing to log http request/response obscuring the API Key from Authorization header only printing last four characters of header's value utilizing the template <OBSCURED>4cha.

New test cases introduced...

$ make test TESTARGS="-v -run SecureLogger"
==> Testing go-pagerduty
=== RUN   TestSecureLoggerHandleHeadersLogsContent
--- PASS: TestSecureLoggerHandleHeadersLogsContent (0.00s)
=== RUN   TestSecureLoggerHandleBodyLogsContent_JSON
--- PASS: TestSecureLoggerHandleBodyLogsContent_JSON (0.00s)
=== RUN   TestSecureLoggerHandleBodyLogsContent_NonJSON
--- PASS: TestSecureLoggerHandleBodyLogsContent_NonJSON (0.00s)
=== RUN   TestSecureLoggerCanLog
--- PASS: TestSecureLoggerCanLog (0.00s)
=== RUN   TestSecureLoggerLogReq
--- PASS: TestSecureLoggerLogReq (0.00s)
=== RUN   TestSecureLoggerLogRes
--- PASS: TestSecureLoggerLogRes (0.00s)
PASS
ok      github.com/heimweh/go-pagerduty/pagerduty       0.527s

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.

1 participant