You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2012/05/30 03:49:24 UTC
[jira] [Created] (CASSANDRA-4295) move checkaccess into
statement.prepare
Jonathan Ellis created CASSANDRA-4295:
-----------------------------------------
Summary: move checkaccess into statement.prepare
Key: CASSANDRA-4295
URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
Project: Cassandra
Issue Type: Improvement
Components: API
Affects Versions: 1.1.0
Reporter: Jonathan Ellis
Assignee: Sylvain Lebresne
Priority: Minor
Fix For: 1.1.2
there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-4295:
--------------------------------------
Assignee: Pavel Yaskevich (was: Sylvain Lebresne)
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.1.2
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495090#comment-13495090 ]
Aleksey Yeschenko commented on CASSANDRA-4295:
----------------------------------------------
The patch implements the original suggestion (move checkaccess into statement.prepare) which we decided is not a good idea.
This is why I changed the status to Open on Saturday.
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Fix For: 1.2.0 rc1
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-4295:
--------------------------------------
Assignee: Sylvain Lebresne (was: Pavel Yaskevich)
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.1.2
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13504251#comment-13504251 ]
Aleksey Yeschenko commented on CASSANDRA-4295:
----------------------------------------------
Moving this one to 1.2.1 - it's not as critical now that NativeAuthorizer isn't going to be part of 1.2.0.
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Fix For: 1.2.1
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13285778#comment-13285778 ]
Jonathan Ellis commented on CASSANDRA-4295:
-------------------------------------------
I suppose, but they'd be *relatively* static, so adding a "validated" boolean that we can negate when permissions change should be adequate.
Most (all?) production implementations of the auth API are going to call into a remote service to validate credentials, so that feels like something worth optimizing away if we can.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.1.2
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Yeschenko updated CASSANDRA-4295:
-----------------------------------------
Fix Version/s: (was: 1.2.0 rc1)
1.2.0
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Fix For: 1.2.0
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401510#comment-13401510 ]
Sylvain Lebresne commented on CASSANDRA-4295:
---------------------------------------------
So I will admit I'm a little uncomfortable committing something without having a solution for the case where access right change over time (which the patch don't tackle unless I'm misreading it). Access rights are a security feature, so it feel to me we don't want to start to get too sloppy.
I'm almost inclined to say that the caching of access rights (which is basically what we're talking about) is something the auth API should be in charge of doing (since it can do it better).
Or we make it part of the spec that access for prepared statement are checked during preparation only, which is an option, but that sounds a bit weak to me. At least we shouldn't make that decision lightly.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.1.2
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Yeschenko updated CASSANDRA-4295:
-----------------------------------------
Fix Version/s: (was: 1.2.0)
1.2.1
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Fix For: 1.2.1
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489712#comment-13489712 ]
Aleksey Yeschenko commented on CASSANDRA-4295:
----------------------------------------------
But time-based caching would be helpful, as long as the period is configurable or reasonably low (I'm thinking a couple seconds/tenths of a second maybe).
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.2.0
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Yeschenko reassigned CASSANDRA-4295:
--------------------------------------------
Assignee: Aleksey Yeschenko (was: Pavel Yaskevich)
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Fix For: 1.2.0
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420874#comment-13420874 ]
Jonathan Ellis commented on CASSANDRA-4295:
-------------------------------------------
Not a fan of splitting the API up. Feels like we're shoving implementation up to the client level.
Not a fan of saying "each provider should reimplement caching internally," either, since by doing it once at the server level we can do a better job of QA and DRY.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.2
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489677#comment-13489677 ]
Jonathan Ellis commented on CASSANDRA-4295:
-------------------------------------------
Sounds reasonable.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.2.0
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489629#comment-13489629 ]
Aleksey Yeschenko commented on CASSANDRA-4295:
----------------------------------------------
bq. Could we add an invalidation hook to the API so that when permissions are changed, it can notify us and we can go through the cache and throw out obsolete entries?
What if we enable caching for IAuthority2 only? And then invalidate the cache after calling IAuthority2.grant() and revoke() in GrantStatement/RevokeStatement?
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.2.0
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-4295:
--------------------------------------
Reviewer: slebresne (was: jbellis)
Assignee: Pavel Yaskevich (was: Sylvain Lebresne)
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.1.2
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13285933#comment-13285933 ]
Sylvain Lebresne commented on CASSANDRA-4295:
---------------------------------------------
bq. Most (all?) production implementations of the auth API are going to call into a remote service to validate credentials, so that feels like something worth optimizing away if we can.
Make sense. Though the "validated" business does suppose that we're able to say when permission changes (I'm not sure all "production implementation of the auth API" will provide that). Anyway, I'll give that a shot and we can readapt a bit if that's not good enough for some auth implementation.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.1.2
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413649#comment-13413649 ]
Sylvain Lebresne commented on CASSANDRA-4295:
---------------------------------------------
The current {{IAuthority}} API is:
{noformat}
public EnumSet<Permission> authorize(AuthenticatedUser user, List<Object> resource);
{noformat}
What about changing that to something like:
{noformat}
public interface PermissionToken {}
public Pair<EnumSet<Permission>, PermissionToken> authorize(AuthenticatedUser user, List<Object> resource);
public boolean isStillValid(PermissionToken token);
{noformat}
The semantic being that authorize would give us a token (every implementation could make that be whatever they want) and {{isStillValid}} would validate whether the authorization that returned the token is still valid at the time of the call to {{isStillValid}}.
Implementations that don't want to get fancy could just return null as the token and have {{isStillValid}} return either:
- always true if an authorization is valid indefinitely
- always false to force redoing an authorization every time
And more fancier policy (like authorization is valid for X minutes only, ...) can be easily implemented too.
Then in CQL we would call authorize during preparation and keep the token around, and during execution we would check the validity of the token and redo the authorization only if it's not valid anymore. It does complicate think a bit, but not too much either.
Or we just leave things like they are and consider that caching the result of authorize should be the business of the {{IAuthority}} (I'm personally not against that). But the more I think about it, the more I'm convince that forcing users and their access rights to be immutable is A Bad Idea.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.1.3
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495091#comment-13495091 ]
Aleksey Yeschenko commented on CASSANDRA-4295:
----------------------------------------------
And I want to have it done together with CASSANDRA-4874 and CASSANDRA-4875, while I'm at it and the context is fresh in my head (will be ready in a few days).
Can we set fixver to 1.2.0, please?
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Fix For: 1.2.0 rc1
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489698#comment-13489698 ]
Aleksey Yeschenko commented on CASSANDRA-4295:
----------------------------------------------
Reasonable, but probably not easily implementable, now that I think of it. Will only work for a single-node 'cluster' since GRANT/REVOKE are executed on the coordinator node only. The coordinator will have to somehow signal the event to other nodes and that's gossip abuse.
An invalidation hook won't work for the same reason.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.2.0
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13285700#comment-13285700 ]
Sylvain Lebresne commented on CASSANDRA-4295:
---------------------------------------------
Couldn't we imagine that the access themselves may change? I could imagine wanting to upgrade/downgrade access authorizations over time.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.1.2
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-4295:
--------------------------------------
Priority: Minor (was: Major)
Fix Version/s: (was: 1.2.0)
1.2.1
Bumping to 1.2.1, it's not worth holding the release for.
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Fix For: 1.2.0 rc1
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420911#comment-13420911 ]
Jonathan Ellis commented on CASSANDRA-4295:
-------------------------------------------
That's probably reasonable to start with.
Could we add an invalidation hook to the API so that when permissions are changed, it can notify us and we can go through the cache and throw out obsolete entries?
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.2
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494551#comment-13494551 ]
Aleksey Yeschenko commented on CASSANDRA-4295:
----------------------------------------------
So the proposed solution is to use Guava's CacheBuilder<IResource,Set<Permission>> for a map in ClientState. TTL will be configurable through cassandra.yaml and will be set to 1 second by default.
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Fix For: 1.2.0
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420897#comment-13420897 ]
Sylvain Lebresne commented on CASSANDRA-4295:
---------------------------------------------
Maybe doing the caching on our side with a configurable cache expiration time setting would be good enough.
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.2
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4295) move checkaccess into
statement.prepare
Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Yaskevich updated CASSANDRA-4295:
---------------------------------------
Attachment: CASSANDRA-4295.patch
> move checkaccess into statement.prepare
> ---------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Priority: Minor
> Fix For: 1.1.2
>
> Attachments: CASSANDRA-4295.patch
>
>
> there's no need to redo this every execution since the schema, tables, and users involved should all be immutable
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495093#comment-13495093 ]
Jonathan Ellis commented on CASSANDRA-4295:
-------------------------------------------
Eh, let's leave it alone and we can edit again if we need to. "A few days" will be rc1 still.
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Priority: Minor
> Fix For: 1.2.0 rc1
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4295) Implement caching of
authorization results
Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Yeschenko updated CASSANDRA-4295:
-----------------------------------------
Reviewer: jbellis (was: slebresne)
Description: 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario. (was: there's no need to redo this every execution since the schema, tables, and users involved should all be immutable)
Priority: Major (was: Minor)
Summary: Implement caching of authorization results (was: move checkaccess into statement.prepare)
> Implement caching of authorization results
> ------------------------------------------
>
> Key: CASSANDRA-4295
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4295
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Jonathan Ellis
> Assignee: Aleksey Yeschenko
> Fix For: 1.2.0
>
> Attachments: CASSANDRA-4295.patch
>
>
> 1.2 will come with default IAuthority implementation that stores permissions in Cassandra, and each permission check will involve at least 1 Cassandra read. Some form of authorization result caching is very important for this scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira