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 custom headers for audit trail #556

Closed
wants to merge 5 commits into from

Conversation

ilya-hontarau
Copy link
Contributor

@ilya-hontarau ilya-hontarau commented May 17, 2024

Description of the change

Description here

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (non-breaking change that adds documentation)

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development
  • Examples for new resources and data sources have been added
  • Default values have been documented in the description (e.g., "Dummy: (Boolean) Blah blah. Defaults to false.)
  • If the action fails that checks the documentation: Run go generate to make sure the docs are up to date

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • Pull Request is no longer marked as "draft"
  • Reviewers have been assigned
  • Changes have been reviewed by at least one other engineer

@ilya-hontarau ilya-hontarau requested a review from peterdeme May 17, 2024 11:56
@ilya-hontarau ilya-hontarau marked this pull request as ready for review May 17, 2024 11:56
@ilya-hontarau ilya-hontarau requested a review from a team May 20, 2024 08:16
Copy link
Contributor

@adamconnelly adamconnelly left a comment

Choose a reason for hiding this comment

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

Looks good. Just to check one other thing - say I want to send something like an API key in a header, can I use the sensitive() function to mark the header value as sensitive, and it'll be correctly masked in the Terraform logs and in our resource changes view?

Probably a stupid question, but figured I'd ask.

"custom_headers": {
Type: schema.TypeMap,
Optional: true,
Description: "`custom_headers` is a Map of key values strings, that will be passed as headers with audit trail call.",
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be "with the audit trail call", or "with audit trail calls"? Maybe we should use the word "request" instead of "call" as well?

@ilya-hontarau
Copy link
Contributor Author

image image

adamconnelly
adamconnelly previously approved these changes May 20, 2024
@ilya-hontarau
Copy link
Contributor Author

ilya-hontarau commented May 21, 2024

I think we are going to change API a bit, so possible this implementation will be changed

@ilya-hontarau ilya-hontarau marked this pull request as draft May 24, 2024 14:34
@ilya-hontarau ilya-hontarau marked this pull request as ready for review June 10, 2024 09:51
@ilya-hontarau ilya-hontarau requested review from adamconnelly and a team June 10, 2024 09:51
eliecharra
eliecharra previously approved these changes Jun 10, 2024
spacelift/internal/structs/audit_trail_webhook.go Outdated Show resolved Hide resolved
Co-authored-by: Elie CHARRA <[email protected]>
Copy link
Contributor

@adamconnelly adamconnelly left a comment

Choose a reason for hiding this comment

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

It looks good - I'd maybe be tempted to hold off merging until the frontend changes are made to support this. Otherwise it could be a little confusing because you'd be able to configure this via TF, but wouldn't be able to see that the headers had been configured anywhere in the UI.

@ilya-hontarau
Copy link
Contributor Author

lets close it for now

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.

3 participants