Hey all,

I am creating a Dropwizard app with the intention of it acting as a 
Gatekeeper for my internal microservices.

I used Smiley's HttpProxy servlet and it was very easy to register with 
Dropwizard, like so:


environment.getApplicationContext()
    .addServlet("org.mitre.dsmiley.httpproxy.URITemplateProxyServlet",
        configuration.getReportProxy().getUri())
    .setInitParameter("targetUri", 
configuration.getReportProxy().getTargetUri());



My question is around Metrics and Authentication.

I have both setup for the resources on the Dropwizard app, is it possible 
to have these interact with this Servlet.

Ideally I want to prevent access to the proxied endpoint, unless the client 
has been authenticated. Same goes for metrics, so I can get a nice overview 
of requests hitting that enpoint.

After googling, I wasn't able to find any examples and I am worried that 
with Dropwizards architecture with Jetty it might be a bit hard.

Looking for advice on a few options:


   1. Create a new resource and delegate all GET/PUT/POST methods to the 
   Servlet
   2. Extend the HttpProxy servlet and inject the Metrics and 
   Authentication into it?

Any help welcomed, thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to