Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-872 Uber jira for HMS HA + Sentry HA redesign
  3. SENTRY-1766

Generic model clients using kerberos can no longer connect to Sentry server

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Blocker
    • Resolution: Duplicate
    • 2.0.0
    • 2.0.0
    • Sentry
    • None

    Description

      We noticed that Solr can no longer connect to Sentry when Kerberos is in the picture and we get GSSException: No valid credentials provided.

      The old code used to do:

      kerberos = ServerConfig.SECURITY_MODE_KERBEROS.equalsIgnoreCase(
              conf.get(ServerConfig.SECURITY_MODE, ServerConfig.SECURITY_MODE_KERBEROS).trim());
          transport = new TSocket(serverAddress.getHostName(),
              serverAddress.getPort(), connectionTimeout);
          if (kerberos) {
            String serverPrincipal = Preconditions.checkNotNull(conf.get(ServerConfig.PRINCIPAL), ServerConfig.PRINCIPAL + " is required");
            // since the client uses hadoop-auth, we need to set kerberos in
            // hadoop-auth if we plan to use kerberos
            conf.set(HADOOP_SECURITY_AUTHENTICATION, ServerConfig.SECURITY_MODE_KERBEROS);
      

      But SENTRY-1593 changed it to

      //TODO(kalyan) need to find appropriate place to add it
          // if (kerberos) {
          //  // since the client uses hadoop-auth, we need to set kerberos in
          //  // hadoop-auth if we plan to use kerberos
          //  conf.set(HADOOP_SECURITY_AUTHENTICATION, SentryConstants.KERBEROS_MoODE);
          // }
      

      So the relevant part of the code is commented out.

      Attachments

        Issue Links

          Activity

            People

              kkalyan Krishna Kalyan
              akolb Alex Kolbasov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: