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

fix: allow requests to /healthz without authentication #1896

Merged
merged 2 commits into from
Nov 15, 2021

Conversation

wendtek
Copy link
Contributor

@wendtek wendtek commented Nov 12, 2021

Problem

Basic Auth support was added in #1777, however this disabled the ability to use AWS ELB health checks against the /healthz endpoint. This purpose of this change is to allow the /healthz endpoint to work for systems that check automatically and do not support authentication or it is desired to configure without authentication, including AWS ELB health checks and Kubernetes probes.

Solution

This PR changes the behavior of the middleware when it checks if Basic Auth is enabled to allow unauthenticated requests to /healthz in the same way that requests to /events were excepted from the check.

@wendtek
Copy link
Contributor Author

wendtek commented Nov 12, 2021

I also just learned of another undocumented endpoint, /status. Will add that as well

@chenrui333
Copy link
Member

Make sense, thanks @wendtek!

@wendtek
Copy link
Contributor Author

wendtek commented Nov 12, 2021

@chenrui333 do you mind reviewing again? I came across another endpoint I didn't see in documentation that others are using as a health check

@chenrui333 chenrui333 merged commit f5b6ab0 into runatlantis:master Nov 15, 2021
@chenrui333
Copy link
Member

Thanks @wendtek!

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