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

Update logic for fetching CF entities used in proxy headers #146

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

markdboyd
Copy link
Contributor

@markdboyd markdboyd commented Nov 15, 2024

Changes proposed in this pull request:

Related to https://github.com/cloud-gov/private/issues/2032

  • Update logic for fetching CF entities (org, spaces) used as proxy headers to ensure that only unique values are returned. The CF API endpoints may return the same org or space GUID in the results, which is redundant, but also causes the headers using these values to be larger than necessary
  • Add unit tests for updated CF entity fetching logic

Things to check

  • For any logging statements, is there any chance that they could be logging sensitive data?
  • Are log statements using a logging library with a logging level set? Setting a logging level means that log statements "below" that level will not be written to the output. For example, if the logging level is set to INFO and debugging statements are written with log.debug or similar, then they won't be written to the otput, which can prevent unintentional leaks of sensitive data.

Security considerations

Nothing about the mechanics of how the proxy passes information to OpenSearch via headers has changed, we have just fixed a bug that was causing duplicate information to be sent.

@markdboyd markdboyd requested a review from a team as a code owner November 15, 2024 14:53
@markdboyd markdboyd changed the title Update proxy headers Update logic for fetching CF entities used in proxy headers Nov 15, 2024
Copy link
Contributor

@JasonTheMain JasonTheMain left a comment

Choose a reason for hiding this comment

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

Makes sense to convert them to sets

@markdboyd markdboyd merged commit 316eb59 into main Nov 15, 2024
3 checks passed
@markdboyd markdboyd deleted the update-proxy-headers branch November 15, 2024 14:56
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