This isn't something that's supported out of the box, but you could easily
achieve it in application code. I would argue that in a typical production
service, auth{entication,orization}s occur at a rate that wouldn't be
practical to log. Thus, Dropwizard hasn't offered the ability to do so.You could create decorators for `Authenticator` and `Authorizer` that intercept invocations of `authenticate` and `authorize` in order to log the credentials, principal, and/or role. Does that make sense? On Wed, Mar 1, 2017 at 10:34 PM, <[email protected]> wrote: > I'm using dropwizard 1.0.6 to set up REST endpoints for my service. Some > of these endpoints are protected by Authenticator (LDAP) and Authorizer > (Role based authorizer) using the method described in the docs ( > http://www.dropwizard.io/1.0.6/docs/manual/auth.html). > > What I want to do is I want to issue a log line whenever an authn / authz > event happens. e.g. when authentication succeeded / failed, authorization > succeeded / failed and relevant information like who authenticated, what > was the endpoint, etc. However, I can't find an easy way to do this after > searching through this group and on the internet, anyone have an idea? > Thanks in advance. > > -- > 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. > -- Evan Meagher -- 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.
