[metrics] switching SecurityValidator?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[metrics] switching SecurityValidator?

Mark Struberg
hi folks!

Right now the SecurityValidator in metrics cannot be switched easily, right?
Wouldn't it be better to simply inject it? Or at least have a protected method getSecurityValidator() ?

LieGrue,
strub

Reply | Threaded
Open this post in threaded view
|

Re: [metrics] switching SecurityValidator?

Romain Manni-Bucau
Hi Mark,

yes and no:


@ApplicationScoped 
class MyConfig {
  void configureSecu(@Observes @Initialized(ApplicationScoped.class) final Object whatever,
                                  final CdiMetricsEndpoint endpoint) {
      endpoint.setSecurityValidator(....);
  }
}

That said it is more intended to be configured with geronimo.metrics.* config entries.
We can surely add more - default is for prometheus and dev envs IIRC.


Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn | Book


Le mer. 4 sept. 2019 à 15:08, Mark Struberg <[hidden email]> a écrit :
hi folks!

Right now the SecurityValidator in metrics cannot be switched easily, right?
Wouldn't it be better to simply inject it? Or at least have a protected method getSecurityValidator() ?

LieGrue,
strub