ing-bank / scruid

Scala + Druid: Scruid. A library that allows you to compose queries in Scala, and parse the result back into typesafe classes.
Apache License 2.0
115 stars 29 forks source link

Use request interceptor in health checks #93

Closed barend closed 4 years ago

barend commented 4 years ago

Currently, the RequestInterceptor is only applied to regular queries, and is not applied to health checks. This approach is valid if three assumptions hold:

  1. All request-interceptors are authentication providers
  2. The health check endpoint is unauthencticated (true by default)
  3. The default health check route is not changed to an authenticated route

It's a pretty reasonable set of assumptions at first glance, but I think it's too restrictive. For example: people who use a reverse proxy for access control should have the option to just slap access control in front of the entire Broker API, without poking a hole for the /status/health route.