[
https://issues.apache.org/jira/browse/OAK-9246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235492#comment-17235492
]
Angela Schreiber commented on OAK-9246:
---------------------------------------
initial suggestion on how to address this at
https://github.com/anchela/jackrabbit-oak/tree/OAK-9246 (also attached patch):
- interface {{Monitor}} in _oak-core-spi_
(https://github.com/anchela/jackrabbit-oak/blob/OAK-9246/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/stats/Monitor.java)
- extension of {{SecurityConfiguration}} to initialize and retrieve all
{{Monitor}}s defined by a given security module
(https://github.com/anchela/jackrabbit-oak/blob/OAK-9246/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/SecurityConfiguration.java#L126)
- deprecation of {{LoginModuleStatsCollector}}
(https://github.com/anchela/jackrabbit-oak/blob/OAK-9246/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/LoginModuleStatsCollector.java)
- {{SecurityProviderRegistration}} obtains the monitors from the
{{SecurityConfiguration}}s and registers them with the whiteboard as before
without hardcoding
(https://github.com/anchela/jackrabbit-oak/blob/OAK-9246/oak-core/src/main/java/org/apache/jackrabbit/oak/security/internal/SecurityProviderRegistration.java#L530-L538)
[~mreutegg], do you know how would be the best suited to review the proposed
extension to _oak-core-spi_ (and hopefully also the changes to the security
parts)? the main focus of the new interface was the security area as the set of
security configurations is not limited to the implementations in oak and thus
the list of monitors to be registered cannot be hardcoded like e.g. in
{{DocumentStoreStats}}. but maybe it would be useful beyond the security code
base.
> Avoid hardcoding stats classes in SecurityProviderRegistration
> --------------------------------------------------------------
>
> Key: OAK-9246
> URL: https://issues.apache.org/jira/browse/OAK-9246
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core, security, security-spi
> Reporter: Angela Schreiber
> Assignee: Angela Schreiber
> Priority: Major
>
> OAK-8102 introduce a single {{LoginModuleStats}} to collect unexpected errors
> during the repository login. the corresponding monitor and mbeans are
> registered in the {{SecurityProviderRegistration}} after creating the
> {{SecurityProvider}} instance.
> instead of 'hardcoding' the stats in {{SecurityProviderRegistration}}, i
> would suggest to come up with a mechanism that allows individual security
> modules to register statistics related monitors and mbeans as needed.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)