You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by am...@apache.org on 2018/07/31 20:03:13 UTC
[ambari] branch trunk updated: AMBARI-24383. A NPE occurs if a
Kerberos identity descriptor is missing a Keytab specification (amagyar)
(#1929)
This is an automated email from the ASF dual-hosted git repository.
amagyar pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4348275 AMBARI-24383. A NPE occurs if a Kerberos identity descriptor is missing a Keytab specification (amagyar) (#1929)
4348275 is described below
commit 4348275a08d036a9b1cded285b685ae6e4ee7c3c
Author: Attila Magyar <m....@gmail.com>
AuthorDate: Tue Jul 31 22:03:11 2018 +0200
AMBARI-24383. A NPE occurs if a Kerberos identity descriptor is missing a Keytab specification (amagyar) (#1929)
---
.../org/apache/ambari/server/controller/KerberosHelperImpl.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index 0d359de..e835380 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -1597,9 +1597,11 @@ public class KerberosHelperImpl implements KerberosHelper {
keytabFileGroupName = variableReplacementHelper.replaceVariables(keytabDescriptor.getGroupName(), configurations);
keytabFileGroupAccess = variableReplacementHelper.replaceVariables(keytabDescriptor.getGroupAccess(), configurations);
keytabFileConfiguration = variableReplacementHelper.replaceVariables(keytabDescriptor.getConfiguration(), configurations);
- }
- if (keytabFileOwnerName == null || keytabFileGroupName == null) {
- LOG.warn("Missing owner ({}) or group name ({}) of kerberos descriptor {}", keytabFileOwnerName, keytabFileGroupName, keytabDescriptor.getName());
+ if (keytabFileOwnerName == null || keytabFileGroupName == null) {
+ LOG.warn("Missing owner ({}) or group name ({}) of kerberos descriptor {}", keytabFileOwnerName, keytabFileGroupName, keytabDescriptor.getName());
+ }
+ } else {
+ throw new AmbariException("Missing keytab descriptor for " + identity.getName());
}
// Evaluate the principal "pattern" found in the record to generate the "evaluated principal"