You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/06/28 20:28:28 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1239: New SecurityModule interfaces. Closes #1221

ctubbsii commented on a change in pull request #1239: New SecurityModule interfaces. Closes #1221
URL: https://github.com/apache/accumulo/pull/1239#discussion_r298731542
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/spi/security/Auth.java
 ##########
 @@ -0,0 +1,74 @@
+package org.apache.accumulo.core.spi.security;
+
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
+import org.apache.accumulo.core.security.Authorizations;
+
+/**
+ * Pluggable authentication and authorization module returned by {@link SecurityModule#auth()}.
+ */
+public interface Auth {
+
+  /**
+   * Verify the userPrincipal and serialized {@link AuthenticationToken} are valid.
+   *
+   * @param userPrincipal
+   *          the user to authenticate
+   * @param token
+   *          the {@link AuthenticationToken}
+   * @return boolean true if successful or false otherwise
+   * @throws AccumuloSecurityException
+   *           if a problem occurred during authentication
+   */
+  boolean authenticate(String userPrincipal, AuthenticationToken token)
 
 Review comment:
   I think it'd be useful to return an AuthenticatedUser object instead of a boolean.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services