You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "John Sanda (JIRA)" <ji...@apache.org> on 2012/09/11 21:40:07 UTC

[jira] [Created] (CASSANDRA-4648) Unable to start Cassandra with simple authentication enabled

John Sanda created CASSANDRA-4648:
-------------------------------------

             Summary: Unable to start Cassandra with simple authentication enabled
                 Key: CASSANDRA-4648
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2.0
         Environment: Mac OS X
            Reporter: John Sanda


I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, 

cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties

Start up failed with this exception in my log:

ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup
java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
        at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
        at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
        at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
        at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
        at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
        at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
        at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
        ... 4 more

--
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-4648) Unable to start Cassandra with simple authentication enabled

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-4648:
--------------------------------------

    Affects Version/s:     (was: 1.2.0)
                       1.2.0 beta 1
        Fix Version/s: 1.2.0
             Assignee: Sylvain Lebresne

Related: CASSANDRA-4617

I think we need to either not use QP internally, or add a compile-and-local-query only mode that skips StorageProxy and auth.
                
> Unable to start Cassandra with simple authentication enabled
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4648
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 1
>         Environment: Mac OS X
>            Reporter: John Sanda
>            Assignee: Sylvain Lebresne
>              Labels: security
>             Fix For: 1.2.0
>
>
> I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, 
> cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties
> Start up failed with this exception in my log:
> ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup
> java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
>         at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
>         at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
>         at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
>         ... 4 more

--
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-4648) Unable to start Cassandra with simple authentication enabled

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464525#comment-13464525 ] 

Sylvain Lebresne commented on CASSANDRA-4648:
---------------------------------------------

bq. Is permissionalteringstatement related or just a refactor that happened to be included in this patch?

It was meant to make it easier to add executeInternal, i.e. adding it to PermissionAlteringStatement only instead of all its subclasses. And since it factor a few other methods too ...
                
> Unable to start Cassandra with simple authentication enabled
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4648
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 1
>         Environment: Mac OS X
>            Reporter: John Sanda
>            Assignee: Sylvain Lebresne
>              Labels: security
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 4648.txt
>
>
> I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, 
> cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties
> Start up failed with this exception in my log:
> ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup
> java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
>         at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
>         at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
>         at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
>         ... 4 more

--
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-4648) Unable to start Cassandra with simple authentication enabled

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463994#comment-13463994 ] 

Jonathan Ellis commented on CASSANDRA-4648:
-------------------------------------------

Is permissionalteringstatement related or just a refactor that happened to be included in this patch?

Rest LGTM.

NB I removed IOException from IM.apply in b781ee7d52c9f30136ae2ce851c4af6def8df38e so you can drop that catch block.
                
> Unable to start Cassandra with simple authentication enabled
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4648
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 1
>         Environment: Mac OS X
>            Reporter: John Sanda
>            Assignee: Sylvain Lebresne
>              Labels: security
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 4648.txt
>
>
> I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, 
> cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties
> Start up failed with this exception in my log:
> ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup
> java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
>         at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
>         at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
>         at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
>         ... 4 more

--
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-4648) Unable to start Cassandra with simple authentication enabled

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499786#comment-13499786 ] 

Sylvain Lebresne commented on CASSANDRA-4648:
---------------------------------------------

Yes, authentication was only one small problem, the big one this ticket solvers is that it's not a good idea to use the normal path (basically everythign related to replication) to write to the System tables (that are not replicated anyway).

If there is a need to do normal queries but without authentication checks, I would look into subclassing ClientState with no-op authentication methods.
                
> Unable to start Cassandra with simple authentication enabled
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4648
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 1
>         Environment: Mac OS X
>            Reporter: John Sanda
>            Assignee: Sylvain Lebresne
>              Labels: security
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 4648.txt
>
>
> I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, 
> cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties
> Start up failed with this exception in my log:
> ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup
> java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
>         at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
>         at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
>         at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
>         ... 4 more

--
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-4648) Unable to start Cassandra with simple authentication enabled

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499526#comment-13499526 ] 

Aleksey Yeschenko commented on CASSANDRA-4648:
----------------------------------------------

We still need something like old processInternal (not restricting queries to the local node). Had to reimplement pre-change processInternal in NativeAuthority (#4874), will have to do the same in NativeAuthenticator unless processInternal gets changed (or another method like it is added).

It is my understanding that this patch does more than just skipping authorization (which is achieved easier by simply moving isInternall check in has*Access higher, before validateLogin happens).
                
> Unable to start Cassandra with simple authentication enabled
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4648
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 1
>         Environment: Mac OS X
>            Reporter: John Sanda
>            Assignee: Sylvain Lebresne
>              Labels: security
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 4648.txt
>
>
> I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, 
> cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties
> Start up failed with this exception in my log:
> ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup
> java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
>         at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
>         at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
>         at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
>         ... 4 more

--
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-4648) Unable to start Cassandra with simple authentication enabled

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-4648:
----------------------------------------

    Attachment: 4648.txt

Attaching patch that is so that processInternal skips StorageProxy and authorization (so it also solve CASSANDRA-4617 in particular).

I'm keen on keeping QP here because we use a mix of cf with and without compact storage internally, and not using QP would get annoying and error prone, while QP already deal with that. Also, collections are another thing that might be painful without QP (I don't think we have any in the system tables yet but I'm betting we'll have some soon enough). 
                
> Unable to start Cassandra with simple authentication enabled
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4648
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 1
>         Environment: Mac OS X
>            Reporter: John Sanda
>            Assignee: Sylvain Lebresne
>              Labels: security
>             Fix For: 1.2.0
>
>         Attachments: 4648.txt
>
>
> I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, 
> cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties
> Start up failed with this exception in my log:
> ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup
> java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
>         at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
>         at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
>         at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
>         ... 4 more

--
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-4648) Unable to start Cassandra with simple authentication enabled

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-4648:
----------------------------------------

    Fix Version/s:     (was: 1.2.0)
                   1.2.0 beta 2
    
> Unable to start Cassandra with simple authentication enabled
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4648
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 1
>         Environment: Mac OS X
>            Reporter: John Sanda
>            Assignee: Sylvain Lebresne
>              Labels: security
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 4648.txt
>
>
> I followed the steps for enabling simple authentication as described here, http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting Cassandra with, 
> cassandra -f -Dpasswd.properties=conf/passwd.properties -Daccess.properties=conf/access.properties
> Start up failed with this exception in my log:
> ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception encountered during startup
> java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
>         at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
>         at org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
>         at org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
>         at org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
>         at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
>         ... 4 more

--
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