Skip to content

[v11] refactor app access middleware#19668

Merged
GavinFrazar merged 2 commits intobranch/v11from
gavinfrazar/v11-refactor-app-access-middleware
Dec 29, 2022
Merged

[v11] refactor app access middleware#19668
GavinFrazar merged 2 commits intobranch/v11from
gavinfrazar/v11-refactor-app-access-middleware

Conversation

@GavinFrazar
Copy link
Copy Markdown
Contributor

@GavinFrazar GavinFrazar commented Dec 24, 2022

Backports #19387

This will make backporting future changes in this area of the code easier, since the refactor changed things a lot.

@github-actions github-actions Bot removed request for Tener and jakule December 28, 2022 17:00
@GavinFrazar GavinFrazar enabled auto-merge (squash) December 28, 2022 17:37
@GavinFrazar GavinFrazar changed the base branch from branch/v11 to gavinfrazar/v11-add-app-access-dynamodb-event December 28, 2022 17:41
Base automatically changed from gavinfrazar/v11-add-app-access-dynamodb-event to branch/v11 December 29, 2022 18:22
* Move logic out of RoundTrip and into ServeHTTP as a middleware before handing off to oxy forwarder
* Move AWS signing service code into lib/utils/aws/signing.go
* use app server close context for audit event emitting
* add go doc comments.
* refactor request rewriting to make the copy in a more robust way.
* pass status code as uint32 rather than casting in audit emitter
* clone request instead of making a new request, and rewrite url to force https
* update header handling
* Set oxy forwarder to PassHostHeader=false to ensure the host header is
  the URL being sought.
* Remove code that deleted forwarding headers previously, we should keep
  those (X-Forwarded-*).
* Audit log the AWS Host sought rather than the incoming request Host
  header (prior behavior maintained, we just rewrite the request
  differently using Clone).
* Remove obsolete header copying helper func
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/v11-refactor-app-access-middleware branch from 75e0957 to 576988a Compare December 29, 2022 19:09
@GavinFrazar GavinFrazar merged commit 824b780 into branch/v11 Dec 29, 2022
@GavinFrazar GavinFrazar deleted the gavinfrazar/v11-refactor-app-access-middleware branch December 30, 2022 06:23
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.

3 participants