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

Anonymous api endpoint for a load balancer healthcheck? #70

Closed
d-averkiev opened this issue Jun 1, 2020 · 3 comments
Closed

Anonymous api endpoint for a load balancer healthcheck? #70

d-averkiev opened this issue Jun 1, 2020 · 3 comments

Comments

@d-averkiev
Copy link

Hello.
I'm currently running goiardi as docker containers in AWS ECS. Btw, it working well as multiple instances behind the balancer (postgres and s3 storage enabled), so it works as a cluster now.
When I'm setting use_auth=true every anonymous http request returns HTTP 401. Which is not good because of AWS load balancer using http requests to evaluate container health.
Do goiardi supports any endpoint which returns HTTP 200 for anonymous requests when authentication is enabled.
Thank you.

@ctdk
Copy link
Owner

ctdk commented Jun 1, 2020

That's wonderful to hear about it working well with multiple instances. Are you using the postgres search as well, or the in-memory one? (If the former, remember about vacuuming periodically.)

There are a few endpoints that don't require authentication, although I see that an actual /alive type endpoint would be valuable for this. For the moment, try /principals/admin (or /principals/<any user or client> - there's a bit of overhead because it requires a lookup of the user, but the others either are POST only or have much more overhead. I'll add an actual basic alive type endpoint, though. Thanks for bringing that to my attention.

@d-averkiev
Copy link
Author

With the /principals/... endpoint load balancer's healthcheck works well. No more "auth errors" in the log. Thank you a lot.

@ctdk
Copy link
Owner

ctdk commented Jun 4, 2020

Wonderful. I'll close this out for now, then, and add a less intensive health check later on. Thanks again.

@ctdk ctdk closed this as completed Jun 4, 2020
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

No branches or pull requests

2 participants