accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshelser <>
Subject [GitHub] accumulo pull request #273: ACCUMULO-4665 Use UGI with real Kerberos credent...
Date Mon, 26 Jun 2017 23:27:44 GMT
Github user joshelser commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/security/tokens/
    @@ -51,11 +52,11 @@
        *          The user that is logged in
       public KerberosToken(String principal) throws IOException {
    -    requireNonNull(principal);
    +    this.principal = requireNonNull(principal);
         final UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    -    checkArgument(ugi.hasKerberosCredentials(), "Subject is not logged in via Kerberos");
    -    checkArgument(principal.equals(ugi.getUserName()), "Provided principal does not match
currently logged-in user");
    -    this.principal = ugi.getUserName();
    +    if (AuthenticationMethod.KERBEROS == ugi.getAuthenticationMethod()) {
    +      checkArgument(ugi.hasKerberosCredentials(), "Subject is not logged in via Kerberos");
    +    }
    --- End diff --
    Drat, I pushed without re-checking my email.
    I mulled around whether or not we should even have this check (I haven't traced the hadoop
code to understand whether or not this is even possible as-written). I probably would have
just suggested to remove it entirely.
    Having it check for PROXY or KERBEROS might be a good middle-ground (failing on SIMPLE,
TOKEN, etc). I can spin out a follow-on issue since I already pushed this and it was only
tweaking the original, already sub-par logic as you said.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message