[jira] [Updated] (CASSANDRA-14662) Refactor AuthCache
[ https://issues.apache.org/jira/browse/CASSANDRA-14662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sam Tunnicliffe updated CASSANDRA-14662: Resolution: Fixed Fix Version/s: (was: 4.x) 4.0 Status: Resolved (was: Patch Available) Thanks [~KurtG], committed in {{960174da67eb6008c73340e61700ea34ec550a12}} > Refactor AuthCache > -- > > Key: CASSANDRA-14662 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14662 > Project: Cassandra > Issue Type: Improvement > Components: Auth >Reporter: Kurt Greaves >Assignee: Kurt Greaves >Priority: Major > Labels: security > Fix For: 4.0 > > > When building an LDAP IAuthenticator plugin I ran into a few issues when > trying to reuse the AuthCache similar to how PasswordAuthenticator implements > it. Most of the problems stemmed from the underlying cache being inaccessible > and not being able to override {{initCache}} properly. > Anyway, I've had a stab at refactoring AuthCache with the following > improvements: > # Make it possible to extend and override all necessary methods (initCache, > init, validate) > # Makes it possible to specify a {{CacheLoader}} rather than just a > {{Function}}, allowing you to have a get/load that throws exceptions. > # Use AuthCache on its own rather than extending it for each use case > ({{invalidate(K)}} moved to be part of MBean) > # Provided a builder that uses sane defaults so we don't have unnecessary > repeated code everywhere > The refactor made all the extensions of AuthCache unnecessary, so I've > simplified those cases to use AuthCache and removed any classes extending > AuthCache. I also removed some noop compatibility classes that were marked to > be removed in 4.0. > Also added some tests in AuthCacheTest. > |[trunk|https://github.com/apache/cassandra/compare/trunk...kgreav:authcache]| > |[utests|https://circleci.com/gh/kgreav/cassandra/206]| -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-14662) Refactor AuthCache
[ https://issues.apache.org/jira/browse/CASSANDRA-14662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sam Tunnicliffe updated CASSANDRA-14662: Reviewer: Sam Tunnicliffe I can review this in the next day or two > Refactor AuthCache > -- > > Key: CASSANDRA-14662 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14662 > Project: Cassandra > Issue Type: Improvement > Components: Auth >Reporter: Kurt Greaves >Assignee: Kurt Greaves >Priority: Major > Labels: security > Fix For: 4.x > > > When building an LDAP IAuthenticator plugin I ran into a few issues when > trying to reuse the AuthCache similar to how PasswordAuthenticator implements > it. Most of the problems stemmed from the underlying cache being inaccessible > and not being able to override {{initCache}} properly. > Anyway, I've had a stab at refactoring AuthCache with the following > improvements: > # Make it possible to extend and override all necessary methods (initCache, > init, validate) > # Makes it possible to specify a {{CacheLoader}} rather than just a > {{Function}}, allowing you to have a get/load that throws exceptions. > # Use AuthCache on its own rather than extending it for each use case > ({{invalidate(K)}} moved to be part of MBean) > # Provided a builder that uses sane defaults so we don't have unnecessary > repeated code everywhere > The refactor made all the extensions of AuthCache unnecessary, so I've > simplified those cases to use AuthCache and removed any classes extending > AuthCache. I also removed some noop compatibility classes that were marked to > be removed in 4.0. > Also added some tests in AuthCacheTest. > |[trunk|https://github.com/apache/cassandra/compare/trunk...kgreav:authcache]| > |[utests|https://circleci.com/gh/kgreav/cassandra/206]| -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-14662) Refactor AuthCache
[ https://issues.apache.org/jira/browse/CASSANDRA-14662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremy Hanna updated CASSANDRA-14662: - Labels: security (was: ) > Refactor AuthCache > -- > > Key: CASSANDRA-14662 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14662 > Project: Cassandra > Issue Type: Improvement > Components: Auth >Reporter: Kurt Greaves >Assignee: Kurt Greaves >Priority: Major > Labels: security > Fix For: 4.x > > > When building an LDAP IAuthenticator plugin I ran into a few issues when > trying to reuse the AuthCache similar to how PasswordAuthenticator implements > it. Most of the problems stemmed from the underlying cache being inaccessible > and not being able to override {{initCache}} properly. > Anyway, I've had a stab at refactoring AuthCache with the following > improvements: > # Make it possible to extend and override all necessary methods (initCache, > init, validate) > # Makes it possible to specify a {{CacheLoader}} rather than just a > {{Function}}, allowing you to have a get/load that throws exceptions. > # Use AuthCache on its own rather than extending it for each use case > ({{invalidate(K)}} moved to be part of MBean) > # Provided a builder that uses sane defaults so we don't have unnecessary > repeated code everywhere > The refactor made all the extensions of AuthCache unnecessary, so I've > simplified those cases to use AuthCache and removed any classes extending > AuthCache. I also removed some noop compatibility classes that were marked to > be removed in 4.0. > Also added some tests in AuthCacheTest. > |[trunk|https://github.com/apache/cassandra/compare/trunk...kgreav:authcache]| > |[utests|https://circleci.com/gh/kgreav/cassandra/206]| -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-14662) Refactor AuthCache
[ https://issues.apache.org/jira/browse/CASSANDRA-14662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kurt Greaves updated CASSANDRA-14662: - Status: Patch Available (was: Open) > Refactor AuthCache > -- > > Key: CASSANDRA-14662 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14662 > Project: Cassandra > Issue Type: Improvement > Components: Auth >Reporter: Kurt Greaves >Assignee: Kurt Greaves >Priority: Major > > When building an LDAP IAuthenticator plugin I ran into a few issues when > trying to reuse the AuthCache similar to how PasswordAuthenticator implements > it. Most of the problems stemmed from the underlying cache being inaccessible > and not being able to override {{initCache}} properly. > Anyway, I've had a stab at refactoring AuthCache with the following > improvements: > # Make it possible to extend and override all necessary methods (initCache, > init, validate) > # Makes it possible to specify a {{CacheLoader}} rather than just a > {{Function}}, allowing you to have a get/load that throws exceptions. > # Use AuthCache on its own rather than extending it for each use case > ({{invalidate(K)}} moved to be part of MBean) > # Provided a builder that uses sane defaults so we don't have unnecessary > repeated code everywhere > The refactor made all the extensions of AuthCache unnecessary, so I've > simplified those cases to use AuthCache and removed any classes extending > AuthCache. I also removed some noop compatibility classes that were marked to > be removed in 4.0. > Also added some tests in AuthCacheTest. > |[trunk|https://github.com/apache/cassandra/compare/trunk...kgreav:authcache]| > |[utests|https://circleci.com/gh/kgreav/cassandra/206]| -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-14662) Refactor AuthCache
[ https://issues.apache.org/jira/browse/CASSANDRA-14662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kurt Greaves updated CASSANDRA-14662: - Fix Version/s: 4.x > Refactor AuthCache > -- > > Key: CASSANDRA-14662 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14662 > Project: Cassandra > Issue Type: Improvement > Components: Auth >Reporter: Kurt Greaves >Assignee: Kurt Greaves >Priority: Major > Fix For: 4.x > > > When building an LDAP IAuthenticator plugin I ran into a few issues when > trying to reuse the AuthCache similar to how PasswordAuthenticator implements > it. Most of the problems stemmed from the underlying cache being inaccessible > and not being able to override {{initCache}} properly. > Anyway, I've had a stab at refactoring AuthCache with the following > improvements: > # Make it possible to extend and override all necessary methods (initCache, > init, validate) > # Makes it possible to specify a {{CacheLoader}} rather than just a > {{Function}}, allowing you to have a get/load that throws exceptions. > # Use AuthCache on its own rather than extending it for each use case > ({{invalidate(K)}} moved to be part of MBean) > # Provided a builder that uses sane defaults so we don't have unnecessary > repeated code everywhere > The refactor made all the extensions of AuthCache unnecessary, so I've > simplified those cases to use AuthCache and removed any classes extending > AuthCache. I also removed some noop compatibility classes that were marked to > be removed in 4.0. > Also added some tests in AuthCacheTest. > |[trunk|https://github.com/apache/cassandra/compare/trunk...kgreav:authcache]| > |[utests|https://circleci.com/gh/kgreav/cassandra/206]| -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org