lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (JIRA) <j...@apache.org>
Subject [jira] [Commented] (SOLR-12791) Add Metrics reporting for AuthenticationPlugin
Date Fri, 21 Sep 2018 14:20:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-12791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16623683#comment-16623683
] 

Jan Høydahl commented on SOLR-12791:
------------------------------------

Question about instrumenting the {{HadoopAuthPlugin}} for reporting metrics [~ichattopadhyaya]

Since the plugin delegates to Hadoop's AuthenticationFilter we don't get a fine grained response
to the plugin that we can check for what really happened. I have managed to pull out the response
http code and did this metrics mapping
{code:java}
switch (frsp.getStatus()) {
  case HttpServletResponse.SC_UNAUTHORIZED:
    // TODO: Cannot tell whether the 401 is due to wrong or missing credentials
    numWrongCredentials.inc();
    break;
    
  case HttpServletResponse.SC_FORBIDDEN:
    // TODO: Are there other status codes which should also translate to error?
    numErrors.mark();
    break;

  default:
    if (frsp.getStatus() >= 200 && frsp.getStatus() <= 299) {
      numAuthenticated.inc();
    } else {
      numErrors.mark();
    }
}
{code}
However when testing with {{TestSolrCloudWithHadoopAuthPlugin}} I get e.g. 4 requests to
doAuthenticate, and 2 of these will be status code 200 while the other two are status 401.
I suspect the 401 responses to be some kind of challenge/response that end up in the 200 response,
but I have not been able to decipher the code fully yet. Any suggestions on how to proceed?

> Add Metrics reporting for AuthenticationPlugin
> ----------------------------------------------
>
>                 Key: SOLR-12791
>                 URL: https://issues.apache.org/jira/browse/SOLR-12791
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Authentication, metrics
>            Reporter: Jan Høydahl
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Propose to add Metrics support for all Auth plugins. Will let abstract {{AuthenticationPlugin}} base
class implement {{SolrMetricProducer}} and keep the counters, such as:
>  * requests
>  * req authenticated
>  * req pass-through (no credentials and blockUnknown false)
>  * req with auth failures due to wrong or malformed credentials
>  * req auth failures due to missing credentials
>  * errors
>  * timeouts
>  * timing stats
> Each implementation still needs to increment the counters etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message