Skip to content

Commit 37d8903

Browse files
committed
improvements for 664032
1 parent 948940f commit 37d8903

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

base/src/main/java/org/apache/cassandra/auth/LDAPAuthenticator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void setup()
9696
{
9797
try
9898
{
99-
if (!systemAuthRoles.hasAdminRole())
99+
if (!systemAuthRoles.hasAdminRole(adminRole))
100100
{
101101
throw new IllegalStateException("Waiting for " + adminRole + " role!");
102102
}

base/src/main/java/org/apache/cassandra/auth/LDAPCassandraRoleManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void setup()
9797
{
9898
if (dbaRole.equals("cassandra"))
9999
{
100-
throw new IllegalStateException();
100+
throw new IllegalStateException("Role 'cassandra' can not log in");
101101
}
102102
logger.info("Role '" + dbaRole + "' can not log in, prematurely existing setup, not going to create LDAP admin role {}", ldapAdminRole);
103103
return null;
@@ -181,7 +181,7 @@ public boolean canLogin(RoleResource role)
181181
}
182182
catch (RequestExecutionException e)
183183
{
184-
logger.debug("Failed to authorize {} for login permission", role.getRoleName());
184+
logger.debug("Failed to authorize " + role.getRoleName() + " for login permission ", e);
185185
throw new UnauthorizedException("Unable to perform authorization of login permission: " + e.getMessage());
186186
}
187187
}

0 commit comments

Comments
 (0)