CDCgov / prime-central

Apache License 2.0
9 stars 2 forks source link

Add API healthcheck endpoint that can be accessed without auth (and is low impact) #158

Closed pete-gov closed 3 years ago

pete-gov commented 3 years ago

We need an endpoint served on the API service that can be regularly pinged without authorization in order to verify that the API service is up and healthy (including has the ability to read from the DB).

This endpoint will be added to the Application Gateway to allow backend pool health checks and notifications to work, and can also be implemented to add automation health checks for basic integration/CICD/deployment/other tests.

A current example that is gated by auth is /actuator/health

Reason:

We need this to monitor availability of the service.

Acceptance Criteria:

nickrobison-usds commented 3 years ago

@benwarfield-usds Any objections to adding this to the Auth white list in the security config? I can knock that out quickly.

benwarfield-usds commented 3 years ago

There's a weird wrinkle with the actuators that I'm having trouble remembering—I'm going to look it up, then I'll update.

benwarfield-usds commented 3 years ago

OK, here's the scoop:

I'm not 100% sure why I did that, to be quite honest, except in that the "/actuators" path is configurable and it's weird to have your health check move around like that.