AMBARI-14641 - Alerts appears and disappears on cluster with security (jonathanhurley)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ce40d286 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ce40d286 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ce40d286 Branch: refs/heads/branch-dev-patch-upgrade Commit: ce40d2864ebfadc011f7407c45616c118e0bab37 Parents: 627f5ad Author: Jonathan Hurley <[email protected]> Authored: Tue Jan 12 17:18:29 2016 -0500 Committer: Jonathan Hurley <[email protected]> Committed: Tue Jan 12 23:23:38 2016 -0500 ---------------------------------------------------------------------- .../resource_management/libraries/functions/curl_krb_request.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ce40d286/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py index dc1d88f..b42a8a3 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py @@ -56,9 +56,10 @@ def curl_krb_request(tmp_dir, keytab, principal, url, cache_file_prefix, # Create the kerberos credentials cache (ccache) file and set it in the environment to use # when executing curl. Use the md5 hash of the combination of the principal and keytab file - # to generate a (relatively) unique cache filename so that we can use it as needed. + # to generate a (relatively) unique cache filename so that we can use it as needed. Scope + # this file by user in order to prevent sharing of cache files by multiple users. ccache_file_name = _md5("{0}|{1}".format(principal, keytab)).hexdigest() - ccache_file_path = "{0}{1}{2}_cc_{3}".format(tmp_dir, os.sep, cache_file_prefix, ccache_file_name) + ccache_file_path = "{0}{1}{2}_{3}_cc_{4}".format(tmp_dir, os.sep, cache_file_prefix, user, ccache_file_name) kerberos_env = {'KRB5CCNAME': ccache_file_path} # If there are no tickets in the cache or they are expired, perform a kinit, else use what
