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

auth-layer-proxy improvements for envoy configuration configurable #47

Merged
merged 6 commits into from
Apr 2, 2024

Conversation

AlfredoG87
Copy link
Contributor

@AlfredoG87 AlfredoG87 commented Mar 30, 2024

Description:
Changed config of envoy to a template, and added a start-envoy.sh script that is run on initialization that creates the actual config file using the template and the env config variables

changes to the auth-layer-proxy to support configuration on deployment, in preparation for the helm charts.

  • moved everything inside the docker image to /etc/envoy/ to keep the standard structure of envoy original image.
  • replaced the custom config for a config-template with placeholders for the values that will be replaced from env config.
  • created a start-envoy.sh script instead of directly starting the envoy with custom config.
  • start-envoy.sh takes the config-template and creates a config by applying the environment configurations
  • did the necessary changes for supporting the template approach to dockerfile
  • did the corresponding changes for the docker-compose.yml when running it locally

Related issue(s):

Fixes #49

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

…ipt that is run on initialization that creates the actual config file using the template and the env config variables

Signed-off-by: Alfredo Gutierrez <[email protected]>
…ipt that is run on initialization that creates the actual config file using the template and the env config variables

Signed-off-by: Alfredo Gutierrez <[email protected]>
@AlfredoG87 AlfredoG87 marked this pull request as draft March 30, 2024 02:38
@wiz-inc-8f76296f7c
Copy link

wiz-inc-8f76296f7c bot commented Mar 30, 2024

Wiz Scan Summary

IaC Misconfigurations 0C 0H 0M 1L 1I
Vulnerabilities 0C 0H 0M 0L 0I
Sensitive Data 0C 0H 0M 0L 0I
Total 0C 0H 0M 1L 1I
Secrets 0🔑

@AlfredoG87 AlfredoG87 changed the title Auth proxy improvements2 auth-layer-proxy improvements for envoy configuration configurable Mar 30, 2024
… Scanner on PR review

Signed-off-by: Alfredo Gutierrez <[email protected]>
…ssed config in a pretty format.

also, fixed the override of the docker-compose.yaml

and improvements to the documentation with the latest changes

Signed-off-by: Alfredo Gutierrez <[email protected]>
@AlfredoG87 AlfredoG87 requested a review from Nana-EC April 1, 2024 22:56
@AlfredoG87 AlfredoG87 self-assigned this Apr 1, 2024
@AlfredoG87 AlfredoG87 added the Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. label Apr 1, 2024
@AlfredoG87 AlfredoG87 added this to the 0.2.0 milestone Apr 1, 2024
@AlfredoG87 AlfredoG87 marked this pull request as ready for review April 1, 2024 22:57
Copy link

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

Some suggestions

auth-layer-proxy/Dockerfile Show resolved Hide resolved
auth-layer-proxy/README.md Outdated Show resolved Hide resolved
auth-layer-proxy/configs/envoy-auth-template.yaml Outdated Show resolved Hide resolved
echo "ENVOY_ADMIN_PORT: $ENVOY_ADMIN_PORT"
echo "PROXY_PORT: $PROXY_PORT"
echo "CLIENT_ID: $CLIENT_ID"
echo "CLIENT_SECRET: $CLIENT_SECRET"
Copy link

Choose a reason for hiding this comment

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

Q: should we be echoing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we should not log the secret, maybe we can obfuscate it and only show the last 4 bytes that could be useful for troubleshooting and make sure that the auth-layer-proxy is using the correct configuration values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

decided to go for the first 4 chars:

it looks something like this:

CLIENT_SECRET: 0cyY******

✅ Done! 👍

- alphabeticall ordered when possible the config template
- wording improments to README.md
- obfuscation of client_secret logs

Signed-off-by: Alfredo Gutierrez <[email protected]>
@AlfredoG87 AlfredoG87 removed this from the 0.2.0 milestone Apr 2, 2024
Copy link

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

LG, 1 clarification

auth-layer-proxy/scripts/start-envoy.sh Show resolved Hide resolved
@AlfredoG87 AlfredoG87 merged commit 9b993ba into main Apr 2, 2024
8 checks passed
@AlfredoG87 AlfredoG87 deleted the auth-proxy-improvements2 branch April 2, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auth-Layer-Proxy: Improvements for configurable parameters for envoy config yaml
2 participants