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

client: set fiat auth user for delete pipelines request #91

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [4.1.4]
### Fixed
- In Delete stale pipelines getting 403 access denied due to no fiat user header set

## [4.1.3]

Expand Down
4 changes: 4 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ func (c *Client) Delete(url, traceparent string) error {
if err != nil {
return err
}
if c.FiatUser != "" {
request.Header.Set(SpinFiatUserHeader, c.FiatUser)
request.Header.Set(SpinFiatAccountHeader, c.FiatUser)
Copy link
Contributor

Choose a reason for hiding this comment

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

I've temporarily approved but TECHNICALLY account header isn't the right spot for the fiat user. SHouldn't set that JUST the user header.

Copy link
Contributor

Choose a reason for hiding this comment

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

ALSO be kinda nice if a test on this...

Copy link
Author

Choose a reason for hiding this comment

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

tested in private environment and it's working fine

}
if traceparent != "" {
request.Header.Set("traceparent", traceparent)
}
Expand Down
Loading