[
https://issues.apache.org/jira/browse/CASSANDRA-14497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16599244#comment-16599244
]
Sam Tunnicliffe edited comment on CASSANDRA-14497 at 8/31/18 8:24 PM:
----------------------------------------------------------------------
{quote}{{logical}} role doesn't have password right? Can we use that?
{quote}
I'm not sure I exactly follow. If you mean can we infer {{LOGIN}} from the lack
of a password, then the answer is no because alternative {{IAuthenticator}}
implementations may also not use passwords, but you still want users to be able
to login.
{quote}Then if we disable {{authorizer}}, it should not do the login check
right?
{quote}
No, it still has to do that because it's a required privilege for connecting. I
guess I over-simplified when I said perms are only the concern of the
{{IAuthorizer}}.
{quote}Maybe my questions are beyond the scope of this ticket. If we just want
to add cache with minimized the impact. I think the patch looks good.
{quote}
I think there's definitely plenty of scope to improve the design of the auth
subsystem, so let's open a 4.x JIRA to figure out exactly what we want. I'll
commit this patch in the meantime (after rebasing and CI) to reduce the impact
of high login rates.
Thanks [~jay.zhuang]
was (Author: beobal):
bq. {{logical}} role doesn't have password right? Can we use that?
I'm not sure I exactly follow. If you mean can we infer {{LOGIN}} from the lack
of a password, then the answer is no because alternative {{IAuthenticator}}
implementations may also not use passwords, but you still want users to be able
to login.
bq. Then if we disable {{authorizer}}, it should not do the login check right?
No, it still has to do that because it's a required privilege for connecting. I
guess I over-simplified when I said perms are only the concern of the
{{IAuthorizer}}.
bq. Maybe my questions are beyond the scope of this ticket. If we just want to
add cache with minimized the impact. I think the patch looks good.
I think there's definitely plenty of scope to improve the design of the auth
subsystem, so let's open a 4.x JIRA to figure out exactly what we want. I'll
commit this patch in the meantime to reduce the impact of high login rates.
Thanks [~jay.zhuang]
> Add Role login cache
> --------------------
>
> Key: CASSANDRA-14497
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14497
> Project: Cassandra
> Issue Type: Improvement
> Components: Auth
> Reporter: Jay Zhuang
> Assignee: Sam Tunnicliffe
> Priority: Major
> Labels: security
> Fix For: 4.0
>
>
> The
> [{{ClientState.login()}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/service/ClientState.java#L313]
> function is used for all auth message:
> [{{AuthResponse.java:82}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/transport/messages/AuthResponse.java#L82].
> But the
> [{{role.canLogin}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/auth/CassandraRoleManager.java#L521]
> information is not cached. So it hits the database every time:
> [{{CassandraRoleManager.java:407}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/auth/CassandraRoleManager.java#L407].
> For a cluster with lots of new connections, it's causing performance issue.
> The mitigation for us is to increase the {{system_auth}} replication factor
> to match the number of nodes, so
> [{{local_one}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/auth/CassandraRoleManager.java#L488]
> would be very cheap. The P99 dropped immediately, but I don't think it is
> not a good solution.
> I would purpose to add {{Role.canLogin}} to the RolesCache to improve the
> auth performance.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]