hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13907) Fix KerberosUtil#getDefaultRealm() on Windows
Date Tue, 10 Jan 2017 10:47:59 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-13907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15814648#comment-15814648
] 

Steve Loughran commented on HADOOP-13907:
-----------------------------------------

looking at internals. it's coming up if the DNS name isn't know and there isn't some env var
to match
{code}
      String var2 = this.get(new String[]{"libdefaults", "default_realm"});
      if(var2 == null && this.useDNS_Realm()) {
        try {
          var2 = this.getRealmFromDNS();
        } catch (KrbException var4) {
          var1 = var4;
        }
      }

      if(var2 == null) {
        var2 = (String)AccessController.doPrivileged(new PrivilegedAction() {
          public String run() {
            String var1 = System.getProperty("os.name");
            return var1.startsWith("Windows")?System.getenv("USERDNSDOMAIN"):null;
          }
        });
      }

      if(var2 == null) {
        KrbException var3 = new KrbException("Cannot locate default realm");
        if(var1 != null) {
          var3.initCause(var1);
        }
{code}

meaning: it could just be some system setup triggering the problem. As the Hadoop test is
setting up the realm stuff before creating the miniKDC, maybe the test just needs rework so
that the realm is set up from whatever the minkdc has

> Fix KerberosUtil#getDefaultRealm() on Windows
> ---------------------------------------------
>
>                 Key: HADOOP-13907
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13907
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.8.0
>            Reporter: Xiaoyu Yao
>              Labels: kerberos
>
> Running unit test TestWebDelegationToken#testKerberosDelegationTokenAuthenticator on
windows will fail with {{java.lang.IllegalArgumentException: Can't get Kerberos realm}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message