<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HUE fails with saml in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82661#M85028</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11235"&gt;@Tomas79&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that; I started writing a response and got pulled away so I didn't see that you had already moved on!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great job as now we are at a point where Hue can parse the response and is happy with it.&amp;nbsp; The problem is now that it cannot map a user from the response data to a Hue user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We see:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] response ERROR Missing Attribute Statement&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] response DEBUG --- AVA: {}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] client_base INFO --- ADDED person info ----&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] backends ERROR The attributes dictionary is empty&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] backends ERROR Could not find saml_user value&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] views WARNING Could not authenticate user received in SAML Assertion. Session info: {'authn_info': [('urn:oasis:names:tc:SAML:2.0:ac:classes:Password', [], '2018-11-07T07:43:32.657Z')], 'name_id': &amp;lt;saml2.saml.NameID object at 0x7f6f1a93c690&amp;gt;, 'not_on_or_after': 1542737974, 'session_index': '_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4', 'came_from': None, 'ava': {}, 'issuer': '&lt;A href="https://sts.windows.net/f0ba4e-redacted-client-id-4kha/" target="_blank"&gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&lt;/A&gt;'}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By default, Hue will use the following configuration for [libsaml]:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;username_source=attributes&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;user_attribute_mapping={'uid': ('username', )}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that you do not have any SAML attribute "&lt;STRONG&gt;uid&lt;/STRONG&gt;" in your SAML response so nothing is found to map to the Hue "username".&lt;/P&gt;&lt;P&gt;Another problem is that if you were trying to use attributes (not SAML response&amp;nbsp;&lt;STRONG&gt;nameid&lt;/STRONG&gt;) for the Hue username, then the&amp;nbsp;&lt;STRONG&gt;user_attribute_mapping&lt;/STRONG&gt; is not correct by default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following is the format I use with success:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;user_attribute_mapping='{"uid":"username"}'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you do not use "uid" in your response, what attribute do you want to use or do you want to use nameId?&amp;nbsp; If you use NameId, that will map to an email address format in Hue which may not be compatible with other hadoop configuration.&amp;nbsp; The best thing to do is decide what attribute will have a "logon" user name in Azure SSO and make sure that is included in the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for testing, though, you can just test to see if this works with NameId by adding this to your [libsaml] section in your Hue safety valve:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;username_source=nameid&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Restart Hue after that.&amp;nbsp; I am going based on this in your response xml:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:NameID&amp;gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Nov 2018 18:31:19 GMT</pubDate>
    <dc:creator>bgooley</dc:creator>
    <dc:date>2018-11-20T18:31:19Z</dc:date>
    <item>
      <title>HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82559#M85019</link>
      <description>&lt;P&gt;Hi, does anybody have a similar experience with python errors when using HUE with SAML?&lt;/P&gt;&lt;P&gt;My error after switching to saml authentication is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@ip-10-85-150-28 env]# pwd
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env
./bin/pip list
pysaml2 (4.4.0)
&lt;BR /&gt;-&amp;gt; HUE ERROR log:
[07/Nov/2018 00:19:47 -0800] access       INFO     10.85.239.102 -anon- - "POST / HTTP/1.1" -- login redirection
[07/Nov/2018 00:19:47 -0800] access       INFO     10.85.239.102 -anon- - "POST / HTTP/1.1" returned in 0ms
[07/Nov/2018 00:19:47 -0800] client       INFO     destination to provider: https://10.85.150.28:8888
[07/Nov/2018 00:19:47 -0800] entity       INFO     REQUEST: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;samlp:AuthnRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="https://10.85.150.28:8888/saml2/acs/" Destination="https://10.85.150.28:8888" ID="id-nLFNl6R57kIYXjA0m" IssueInstant="2018-11-07T08:19:47Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"&amp;gt;&amp;lt;saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity"&amp;gt;https://10.85.150.28:8888/saml2/metadata/&amp;lt;/saml:Issuer&amp;gt;&amp;lt;samlp:NameIDPolicy AllowCreate="false" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" /&amp;gt;&amp;lt;/samlp:AuthnRequest&amp;gt;
[07/Nov/2018 00:19:47 -0800] client       INFO     AuthNReq: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;samlp:AuthnRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="https://10.85.150.28:8888/saml2/acs/" Destination="https://10.85.150.28:8888" ID="id-nLFNl6R57kIYXjA0m" IssueInstant="2018-11-07T08:19:47Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"&amp;gt;&amp;lt;saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity"&amp;gt;https://10.85.150.28:8888/saml2/metadata/&amp;lt;/saml:Issuer&amp;gt;&amp;lt;samlp:NameIDPolicy AllowCreate="false" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" /&amp;gt;&amp;lt;/samlp:AuthnRequest&amp;gt;
[07/Nov/2018 00:19:47 -0800] entity       INFO     HTTP REDIRECT
[07/Nov/2018 00:19:47 -0800] middleware   INFO     Processing exception: 'NoneType' object has no attribute 'get_signer': Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
    return func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 175, in login
    binding=binding, sign=False, sigalg=sigalg)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/client.py", line 76, in prepare_for_authenticate
    **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/client.py", line 129, in prepare_for_negotiated_authenticate
    relay_state, **args)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/entity.py", line 231, in apply_binding
    signer = self.sec.sec_backend.get_signer(kwargs['sigalg'])
AttributeError: 'NoneType' object has no attribute 'get_signer'&lt;/PRE&gt;&lt;P&gt;I tried to upgrade pysaml but it broked the whole setup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Followed the recommendation from the docs and installed additional packages (running on Centos 7.5)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;install git gcc python-devel swig openssl

sudo vi /usr/java/jdk1.8.0_191-amd64/jre/lib/security/java.security

/jdk.certpath.disabledAlgorithms=MD2, MD5, RC4, DH, SHA1 jdkCA &amp;amp; usage TLSServer,..../

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm

rpm -ivh epel-release-7-6.noarch.rpm

yum install xmlsec1 xmlsec1-openssl&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 13:43:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82559#M85019</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2026-04-21T13:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82578#M85020</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11235"&gt;@Tomas79&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you clarify what steps you took&amp;nbsp;and&amp;nbsp;what your hue configuration looks like when you receive the exception.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What documentation steps did you follow that mentioned you should upgrade your pysaml2 package?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What brand of IDP are you using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At quick glance, it appears that your SAML response is using HTTP_REDIRECT binding and there is some problem parsing it perhaps.&amp;nbsp; We see the request uses HTTP_POST for&amp;nbsp;ProtocolBinding.&amp;nbsp; Let's see if we can view the SAML response in the Hue log by enabling DEBUG.&amp;nbsp; This may give us some clues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 17:32:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82578#M85020</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-19T17:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82617#M85021</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have installed the HUE service via CM, then in advance I prepared the following:&lt;/P&gt;&lt;P&gt;- installed xmlsec1 and xmlsec1-openssl packages on Centos 7.5&lt;/P&gt;&lt;P&gt;- exported the certificate for SAML signing (Azure AD SSO) in base64 format&lt;/P&gt;&lt;P&gt;- created the idp.xml file&amp;nbsp; - /tmp/idp.xml&lt;/P&gt;&lt;P&gt;- stored the cerrtificate in base64 format as pem file /tmp/idp.pem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set on the IDP the URL for login (https://&amp;lt;hue-fqdn&amp;gt;:8888)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set on advanced properties the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[[auth]]&lt;BR /&gt;backend=libsaml.backend.SAML2Backend&lt;BR /&gt;[libsaml]&lt;BR /&gt;xmlsec_binary=/usr/bin/xmlsec1&lt;BR /&gt;metadata_file=/tmp/idp.xml&lt;BR /&gt;cert_file=/tmp/idp.pem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Restarted the HUE service.&lt;/P&gt;&lt;P&gt;Then I try to initiate the login process and get this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[20/Nov/2018 02:36:31 -0800] middleware   INFO     Redirecting to login page: /
[20/Nov/2018 02:36:31 -0800] access       INFO     10.85.239.134 -anon- - "POST / HTTP/1.1" -- login redirection
[20/Nov/2018 02:36:31 -0800] access       INFO     10.85.239.134 -anon- - "POST / HTTP/1.1" returned in 0ms
[20/Nov/2018 02:36:32 -0800] client       INFO     destination to provider: https://login.microsoftonline.com/&amp;lt;AZURE_CLIENT_ID&amp;gt;/saml2
[20/Nov/2018 02:36:32 -0800] entity       INFO     REQUEST: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;samlp:AuthnRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="https://&amp;lt;HUE_HOST&amp;gt;:8888/saml2/acs/" Destination="https://login.microsoftonline.com/&amp;lt;AZURE_CLIENT_ID&amp;gt;/saml2" ID="xxxxxxxxxxxxxxxx" IssueInstant="2018-11-20T10:36:32Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"&amp;gt;&amp;lt;saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity"&amp;gt;https://&amp;lt;HUE_HOST&amp;gt;:8888/saml2/metadata/&amp;lt;/saml:Issuer&amp;gt;&amp;lt;samlp:NameIDPolicy AllowCreate="false" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" /&amp;gt;&amp;lt;/samlp:AuthnRequest&amp;gt;
[20/Nov/2018 02:36:32 -0800] client       INFO     AuthNReq: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;samlp:AuthnRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="https://&amp;lt;HUE_HOST&amp;gt;:8888/saml2/acs/" Destination="https://login.microsoftonline.com/&amp;lt;AZURE_CLIENT_ID&amp;gt;/saml2" ID="xxxxxxxxxxxxxxxx" IssueInstant="2018-11-20T10:36:32Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"&amp;gt;&amp;lt;saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity"&amp;gt;https://&amp;lt;HUE_HOST&amp;gt;:8888/saml2/metadata/&amp;lt;/saml:Issuer&amp;gt;&amp;lt;samlp:NameIDPolicy AllowCreate="false" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" /&amp;gt;&amp;lt;/samlp:AuthnRequest&amp;gt;
[20/Nov/2018 02:36:32 -0800] entity       INFO     HTTP REDIRECT
[20/Nov/2018 02:36:32 -0800] middleware   INFO     Processing exception: 'NoneType' object has no attribute 'get_signer': Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
    return func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 175, in login
    binding=binding, sign=False, sigalg=sigalg)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/client.py", line 76, in prepare_for_authenticate
    **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/client.py", line 129, in prepare_for_negotiated_authenticate
    relay_state, **args)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/entity.py", line 231, in apply_binding
    signer = self.sec.sec_backend.get_signer(kwargs['sigalg'])
AttributeError: 'NoneType' object has no attribute 'get_signer'&lt;/PRE&gt;&lt;P&gt;Let me please now how to set HUE logs into DEBUG level, I have not found any settings in CM for this, nor any advanced snippet.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 10:48:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82617#M85021</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2018-11-20T10:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82619#M85022</link>
      <description>&lt;P&gt;I have set to a debug level, but no more information was in the log.&lt;/P&gt;&lt;P&gt;But then I changed the Reply URL (Assertion Consumer Service URL) to&amp;nbsp;&lt;/P&gt;&lt;P&gt;https://&amp;lt;HUE_HOST&amp;gt;:8888/saml2/acs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the log indicates a missing key&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[20/Nov/2018 03:38:14 -0800] response     DEBUG    response: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;samlp:Response xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Destination="&amp;lt;HUE_HOST&amp;gt;:8888/saml2/acs/" .....
[20/Nov/2018 03:38:14 -0800] entity       DEBUG    XMLSTR: &amp;lt;samlp:Response ID="_826d97f2-9226-4d27-b550-f4e53829ac75" Version="2.0" IssueInstant="2018-11-20T11:38:13.783Z" Destination="&amp;lt;HUE_HOST&amp;gt;:8888/saml2/acs/" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"&amp;gt;....
[20/Nov/2018 03:38:14 -0800] response     INFO     status: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;samlp:Status xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"&amp;gt;&amp;lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" /&amp;gt;&amp;lt;/samlp:Status&amp;gt;
[20/Nov/2018 03:38:14 -0800] response     DEBUG    ***Unencrypted assertion***
[20/Nov/2018 03:38:14 -0800] response     DEBUG    signed
[20/Nov/2018 03:38:14 -0800] sigver       DEBUG    ==== Certs from metadata ==== None: [] ====
[20/Nov/2018 03:38:14 -0800] response     ERROR    correctly_signed_response: None
[20/Nov/2018 03:38:14 -0800] client_base  ERROR    XML parse error: None
[20/Nov/2018 03:38:14 -0800] views        ERROR    SAML Identity Provider is not configured correctly: certificate key is missing!
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 254, in assertion_consumer_service
    response = client.parse_authn_request_response(xmlstr, BINDING_HTTP_POST, outstanding_queries)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/client_base.py", line 597, in parse_authn_request_response
    binding, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/entity.py", line 1172, in _parse_response
    response = response.verify(keys)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/response.py", line 1017, in verify
    if self.parse_assertion(keys):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/response.py", line 929, in parse_assertion
    if not self._assertion(assertion, False):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/response.py", line 787, in _assertion
    self.xmlstr)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/sigver.py", line 1674, in check_signature
    id_attr=id_attr, must=must, issuer=issuer)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/sigver.py", line 1614, in _check_signature
    raise MissingKey("%s" % issuer)
MissingKey: None
[20/Nov/2018 03:38:14 -0800] middleware   INFO     Processing exception: : Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
    return func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/http.py", line 41, in inner
    return func(request, *args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 272, in assertion_consumer_service
    return fail_acs_response(request)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/utils.py", line 85, in fail_acs_response
    return failure_function(request, *args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/acs_failures.py", line 22, in exception_failure
    raise exc_class
PermissionDenied&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But for Azure AD there is no option to download a key.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 11:47:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82619#M85022</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2018-11-20T11:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82637#M85023</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11235"&gt;@Tomas79&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears that you manually truncated the XML response so we cannot see the key information that helps us understand why the failures is occurring.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the code path, the SAML response is returned and there is an attempt to parse it so that the response can be validated and the needed information extracted.&lt;/P&gt;&lt;P&gt;Along those steps, there is a check to see if the assertion is signed. If it is signed (which Azure SSO should be based on the documentation) then a check is done to verify the signature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is failing as it appears either your IDP metadata or the response does not include a valid signature.&amp;nbsp; I suggest looking at the IDP metadata and the response assertion to help understand what might be causing the problem&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 16:51:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82637#M85023</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-20T16:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82638#M85024</link>
      <description>Hi, thanks for the detailed explanation.&lt;BR /&gt;I truncated it intentionally to avoid some senstivie data exposure.&lt;BR /&gt;&lt;BR /&gt;The idp xml file was built using an online tool, I just put there the&lt;BR /&gt;entity id, url and IDP certificate. But I did not enter any key, as Azure&lt;BR /&gt;AD does not provide (at least) on the GUI any option to download a key.&lt;BR /&gt;&lt;BR /&gt;What I can try is to take the whole Federation xml file and put it into the&lt;BR /&gt;HUE server /tmp/idp.xml&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Nov 2018 16:58:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82638#M85024</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2018-11-20T16:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82643#M85025</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&amp;nbsp;I think using the IDP metadata file from AAD helped a bit, it still fails, but I see there more information about the sign in person - I just redacted the keys, certificates, name of the user, AD login name, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[20/Nov/2018 09:24:35 -0800] response     DEBUG    response: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;samlp:Response xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Destination="https://hue.redacted.fqd:8888/saml2/acs/" ID="_578d4cb5-1494-4087-9835-3755369d1c7d" IssueInstant="2018-11-20T17:24:34.576Z" Version="2.0"&amp;gt;&amp;lt;saml:Issuer&amp;gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&amp;lt;/saml:Issuer&amp;gt;&amp;lt;samlp:Status&amp;gt;&amp;lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" /&amp;gt;&amp;lt;/samlp:Status&amp;gt;&amp;lt;saml:Assertion ID="_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4" IssueInstant="2018-11-20T17:24:34.576Z" Version="2.0"&amp;gt;&amp;lt;saml:Issuer&amp;gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&amp;lt;/saml:Issuer&amp;gt;&amp;lt;ds:Signature&amp;gt;&amp;lt;ds:SignedInfo&amp;gt;&amp;lt;ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&amp;gt;&amp;lt;ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" /&amp;gt;&amp;lt;ds:Reference URI="#_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4"&amp;gt;&amp;lt;ds:Transforms&amp;gt;&amp;lt;ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /&amp;gt;&amp;lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&amp;gt;&amp;lt;/ds:Transforms&amp;gt;&amp;lt;ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /&amp;gt;&amp;lt;ds:DigestValue&amp;gt;sWH/9QDUVYTke2KTf8jB9xPYy+z9vGkUf1kpq2NUxik=&amp;lt;/ds:DigestValue&amp;gt;&amp;lt;/ds:Reference&amp;gt;&amp;lt;/ds:SignedInfo&amp;gt;&amp;lt;ds:SignatureValue&amp;gt;XXXXXRDInP1nr78HQlVbgemS5sZrebvd7BH/ERb1aFhIV1Z9ZucIUjf1evoQY9LNM/V8UBzKc7lp748TGSuAZlGwlAbrvfwUDYHONUbZ3h2j3DVMb2LBjeDTyo3e8qU/4rtyvv3QapChKuECTyizF6OHJClgYKrCyzOkPb9jHsGDFNHnQ==&amp;lt;/ds:SignatureValue&amp;gt;&amp;lt;ds:KeyInfo&amp;gt;&amp;lt;ds:X509Data&amp;gt;&amp;lt;ds:X509Certificate&amp;gt;&amp;lt;REDACTED&amp;gt;wMc7dfqQmlUnRbxRmBiPmyXJD6BAGphj9R/LdWC3OsNfehDnpPSsJ8+jHO3MeSMR2qTkBpeFp4naYv2lLfRgUV/0Tt4ncVPyCwTf6yoTmAHsbvzDf2jSFr6YtsnVU4VY1RswIvt9jUXjd4wcOyK/Mjs8Lfcub1oWL8jeujuSq0DJPxJiCWGWs4HSPtAoKIYnPTg9ysYHyWu/91DCTP7cnfQw37Lu+7X7nm6XO1xWmpSVhGqc2tT8PL&amp;lt;/ds:X509Certificate&amp;gt;&amp;lt;/ds:X509Data&amp;gt;&amp;lt;/ds:KeyInfo&amp;gt;&amp;lt;/ds:Signature&amp;gt;&amp;lt;saml:Subject&amp;gt;&amp;lt;saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:NameID&amp;gt;&amp;lt;saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"&amp;gt;&amp;lt;saml:SubjectConfirmationData NotOnOrAfter="2018-11-20T17:29:34.576Z" Recipient="https://hue.redacted.fqd:8888/saml2/acs/" /&amp;gt;&amp;lt;/saml:SubjectConfirmation&amp;gt;&amp;lt;/saml:Subject&amp;gt;&amp;lt;saml:Conditions NotBefore="2018-11-20T17:19:34.576Z" NotOnOrAfter="2018-11-20T18:19:34.576Z"&amp;gt;&amp;lt;saml:AudienceRestriction&amp;gt;&amp;lt;saml:Audience&amp;gt;hue-dev&amp;lt;/saml:Audience&amp;gt;&amp;lt;/saml:AudienceRestriction&amp;gt;&amp;lt;/saml:Conditions&amp;gt;&amp;lt;saml:AuthnStatement AuthnInstant="2018-11-07T07:43:32.657Z" SessionIndex="_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4"&amp;gt;&amp;lt;saml:AuthnContext&amp;gt;&amp;lt;saml:AuthnContextClassRef&amp;gt;urn:oasis:names:tc:SAML:2.0:ac:classes:Password&amp;lt;/saml:AuthnContextClassRef&amp;gt;&amp;lt;/saml:AuthnContext&amp;gt;&amp;lt;/saml:AuthnStatement&amp;gt;&amp;lt;saml:AttributeStatement&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/tenantid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;f0ba4e-redacted-client-id-4kha&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/objectidentifier" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;abd66e79-6e17-43fc-9a51-9eed558cd902&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/displayname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedFirstName RedactedLastName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/identityprovider" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/claims/authnmethodsreferences" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedFirstName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedLastName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;/saml:AttributeStatement&amp;gt;&amp;lt;/saml:Assertion&amp;gt;&amp;lt;/samlp:Response&amp;gt;
[20/Nov/2018 09:24:35 -0800] entity       DEBUG    XMLSTR: &amp;lt;samlp:Response ID="_578d4cb5-1494-4087-9835-3755369d1c7d" Version="2.0" IssueInstant="2018-11-20T17:24:34.576Z" Destination="https://hue.redacted.fqd:8888/saml2/acs/" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"&amp;gt;&amp;lt;Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&amp;lt;/Issuer&amp;gt;&amp;lt;samlp:Status&amp;gt;&amp;lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/&amp;gt;&amp;lt;/samlp:Status&amp;gt;&amp;lt;Assertion ID="_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4" IssueInstant="2018-11-20T17:24:34.576Z" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;Issuer&amp;gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&amp;lt;/Issuer&amp;gt;&amp;lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;SignedInfo&amp;gt;&amp;lt;CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/&amp;gt;&amp;lt;SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/&amp;gt;&amp;lt;Reference URI="#_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4"&amp;gt;&amp;lt;Transforms&amp;gt;&amp;lt;Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/&amp;gt;&amp;lt;Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/&amp;gt;&amp;lt;/Transforms&amp;gt;&amp;lt;DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/&amp;gt;&amp;lt;DigestValue&amp;gt;sWH/9QDUVYTke2KTf8jB9xPYy+z9vGkUf1kpq2NUxik=&amp;lt;/DigestValue&amp;gt;&amp;lt;/Reference&amp;gt;&amp;lt;/SignedInfo&amp;gt;&amp;lt;SignatureValue&amp;gt;XXXXXRDInP1nr78HQlVbgemS5sZrebvd7BH/ERb1aFhIV1Z9ZucIUjf1evoQY9LNM/V8UBzKc7lp748TGSuAZlGwlAbrvfwUDYHONUbZ3h2j3DVMb2LBjeDTyo3e8qU/4rtyvv3QapChKuECTyizF6OHJClgYKrCyzOkPb9jHsGDFNHnQ==&amp;lt;/SignatureValue&amp;gt;&amp;lt;KeyInfo&amp;gt;&amp;lt;X509Data&amp;gt;&amp;lt;X509Certificate&amp;gt;&amp;lt;REDACTED&amp;gt;wMc7dfqQmlUnRbxRmBiPmyXJD6BAGphj9R/LdWC3OsNfehDnpPSsJ8+jHO3MeSMR2qTkBpeFp4naYv2lLfRgUV/0Tt4ncVPyCwTf6yoTmAHsbvzDf2jSFr6YtsnVU4VY1RswIvt9jUXjd4wcOyK/Mjs8Lfcub1oWL8jeujuSq0DJPxJiCWGWs4HSPtAoKIYnPTg9ysYHyWu/91DCTP7cnfQw37Lu+7X7nm6XO1xWmpSVhGqc2tT8PL&amp;lt;/X509Certificate&amp;gt;&amp;lt;/X509Data&amp;gt;&amp;lt;/KeyInfo&amp;gt;&amp;lt;/Signature&amp;gt;&amp;lt;Subject&amp;gt;&amp;lt;NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/NameID&amp;gt;&amp;lt;SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"&amp;gt;&amp;lt;SubjectConfirmationData NotOnOrAfter="2018-11-20T17:29:34.576Z" Recipient="https://hue.redacted.fqd:8888/saml2/acs/"/&amp;gt;&amp;lt;/SubjectConfirmation&amp;gt;&amp;lt;/Subject&amp;gt;&amp;lt;Conditions NotBefore="2018-11-20T17:19:34.576Z" NotOnOrAfter="2018-11-20T18:19:34.576Z"&amp;gt;&amp;lt;AudienceRestriction&amp;gt;&amp;lt;Audience&amp;gt;hue-dev&amp;lt;/Audience&amp;gt;&amp;lt;/AudienceRestriction&amp;gt;&amp;lt;/Conditions&amp;gt;&amp;lt;AttributeStatement&amp;gt;&amp;lt;Attribute Name="http://schemas.microsoft.com/identity/claims/tenantid"&amp;gt;&amp;lt;AttributeValue&amp;gt;f0ba4e-redacted-client-id-4kha&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;Attribute Name="http://schemas.microsoft.com/identity/claims/objectidentifier"&amp;gt;&amp;lt;AttributeValue&amp;gt;abd66e79-6e17-43fc-9a51-9eed558cd902&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;Attribute Name="http://schemas.microsoft.com/identity/claims/displayname"&amp;gt;&amp;lt;AttributeValue&amp;gt;RedactedFirstName RedactedLastName&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;Attribute Name="http://schemas.microsoft.com/identity/claims/identityprovider"&amp;gt;&amp;lt;AttributeValue&amp;gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;Attribute Name="http://schemas.microsoft.com/claims/authnmethodsreferences"&amp;gt;&amp;lt;AttributeValue&amp;gt;http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"&amp;gt;&amp;lt;AttributeValue&amp;gt;RedactedFirstName&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"&amp;gt;&amp;lt;AttributeValue&amp;gt;RedactedLastName&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"&amp;gt;&amp;lt;AttributeValue&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"&amp;gt;&amp;lt;AttributeValue&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/AttributeValue&amp;gt;&amp;lt;/Attribute&amp;gt;&amp;lt;/AttributeStatement&amp;gt;&amp;lt;AuthnStatement AuthnInstant="2018-11-07T07:43:32.657Z" SessionIndex="_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4"&amp;gt;&amp;lt;AuthnContext&amp;gt;&amp;lt;AuthnContextClassRef&amp;gt;urn:oasis:names:tc:SAML:2.0:ac:classes:Password&amp;lt;/AuthnContextClassRef&amp;gt;&amp;lt;/AuthnContext&amp;gt;&amp;lt;/AuthnStatement&amp;gt;&amp;lt;/Assertion&amp;gt;&amp;lt;/samlp:Response&amp;gt;
[20/Nov/2018 09:24:35 -0800] response     INFO     status: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;samlp:Status xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"&amp;gt;&amp;lt;samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" /&amp;gt;&amp;lt;/samlp:Status&amp;gt;
[20/Nov/2018 09:24:35 -0800] response     DEBUG    ***Unencrypted assertion***
[20/Nov/2018 09:24:35 -0800] response     DEBUG    signed
[20/Nov/2018 09:24:35 -0800] sigver       DEBUG    ==== Certs from metadata ==== None: [(&amp;lt;open file '&amp;lt;fdopen&amp;gt;', mode 'w+b' at 0x7f6f5805a0c0&amp;gt;, '/tmp/tmpJ4XqjT.pem')] ====
[20/Nov/2018 09:24:35 -0800] sigver       DEBUG    xmlsec command: /usr/bin/xmlsec1 --verify --pubkey-cert-pem /tmp/tmpJ4XqjT.pem --id-attr:ID urn:oasis:names:tc:SAML:2.0:assertion:Assertion --store-signatures --node-id _c1e08c03-ccf6-4f32-9a96-5e00cc4233e4 --output /tmp/tmpdOFzb_.xml /tmp/tmprHzcov.xml
[20/Nov/2018 09:24:35 -0800] response     DEBUG    assertion context: AuthnReq
[20/Nov/2018 09:24:35 -0800] response     DEBUG    assertion keys: ['authn_statement', 'attribute_statement', 'subject', 'issue_instant', 'version', 'signature', 'conditions', 'id', 'issuer']
[20/Nov/2018 09:24:35 -0800] response     DEBUG    outstanding_queries: {}
[20/Nov/2018 09:24:35 -0800] response     DEBUG    conditions: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Conditions xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" NotBefore="2018-11-20T17:19:34.576Z" NotOnOrAfter="2018-11-20T18:19:34.576Z"&amp;gt;&amp;lt;saml:AudienceRestriction&amp;gt;&amp;lt;saml:Audience&amp;gt;hue-dev&amp;lt;/saml:Audience&amp;gt;&amp;lt;/saml:AudienceRestriction&amp;gt;&amp;lt;/saml:Conditions&amp;gt;
[20/Nov/2018 09:24:35 -0800] response     DEBUG    --- Getting Identity ---
[20/Nov/2018 09:24:35 -0800] response     INFO     Subject NameID: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:NameID&amp;gt;
[20/Nov/2018 09:24:35 -0800] response     DEBUG    Attribute Statement: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:AttributeStatement xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/tenantid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;f0ba4e-redacted-client-id-4kha&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/objectidentifier" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;abd66e79-6e17-43fc-9a51-9eed558cd902&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/displayname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedFirstName RedactedLastName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/identityprovider" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/claims/authnmethodsreferences" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedFirstName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedLastName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;/saml:AttributeStatement&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/identity/claims/tenantid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;f0ba4e-redacted-client-id-4kha&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/identity/claims/objectidentifier" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;abd66e79-6e17-43fc-9a51-9eed558cd902&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/identity/claims/displayname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedFirstName RedactedLastName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/identity/claims/identityprovider" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/claims/authnmethodsreferences" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedFirstName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;RedactedLastName&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 09:24:35 -0800] response     ERROR    Missing Attribute Statement
[20/Nov/2018 09:24:35 -0800] response     DEBUG    --- AVA: {}
[20/Nov/2018 09:24:35 -0800] client_base  INFO     --- ADDED person info ----
[20/Nov/2018 09:24:35 -0800] backends     ERROR    The attributes dictionary is empty
[20/Nov/2018 09:24:35 -0800] backends     ERROR    Could not find saml_user value
[20/Nov/2018 09:24:35 -0800] views        WARNING  Could not authenticate user received in SAML Assertion. Session info: {'authn_info': [('urn:oasis:names:tc:SAML:2.0:ac:classes:Password', [], '2018-11-07T07:43:32.657Z')], 'name_id': &amp;lt;saml2.saml.NameID object at 0x7f6f1a93c690&amp;gt;, 'not_on_or_after': 1542737974, 'session_index': '_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4', 'came_from': None, 'ava': {}, 'issuer': 'https://sts.windows.net/f0ba4e-redacted-client-id-4kha/'}
[20/Nov/2018 09:24:35 -0800] middleware   INFO     Processing exception: : Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
    return func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/http.py", line 41, in inner
    return func(request, *args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 296, in assertion_consumer_service
    raise PermissionDenied
PermissionDenied

[20/Nov/2018 09:24:35 -0800] access       WARNING  10.85.239.134 -anon- - "POST /saml2/acs/ HTTP/1.1" -- 403 access forbidden&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Nov 2018 17:34:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82643#M85025</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2018-11-20T17:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82649#M85026</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11235"&gt;@Tomas79&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That sounds a bit sketchy.&amp;nbsp; IDPs need to provide their metadata in order for the Service Provider to be configured properly.&amp;nbsp; Having to create your own metata is error-prone and too much to ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This page seems to imply that there is a link that you can use to download the metadata for your entity:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.exlibrisgroup.com/blog/SAML-with-Azure" target="_blank"&gt;https://developers.exlibrisgroup.com/blog/SAML-with-Azure&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you should see it in your Azure Portal Single Sign on for your app.&amp;nbsp; I think it might be called&amp;nbsp;&lt;STRONG&gt;SAML XML Metadata&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 18:01:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82649#M85026</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-20T18:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82652#M85027</link>
      <description>This is your reply related to my previous post, because I already did it, downloaded from the portal. As I posted last time " think using the IDP metadata file from AAD helped a bit," - because there are some new error messages.&lt;BR /&gt;And I also posted the full error report, with all elements from the SAML reposnse.&lt;BR /&gt;&lt;BR /&gt;This XML what I used is called Federation metadata in the SSO page of the application.</description>
      <pubDate>Tue, 20 Nov 2018 18:03:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82652#M85027</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2018-11-20T18:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82661#M85028</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11235"&gt;@Tomas79&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that; I started writing a response and got pulled away so I didn't see that you had already moved on!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great job as now we are at a point where Hue can parse the response and is happy with it.&amp;nbsp; The problem is now that it cannot map a user from the response data to a Hue user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We see:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] response ERROR Missing Attribute Statement&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] response DEBUG --- AVA: {}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] client_base INFO --- ADDED person info ----&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] backends ERROR The attributes dictionary is empty&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] backends ERROR Could not find saml_user value&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[20/Nov/2018 09:24:35 -0800] views WARNING Could not authenticate user received in SAML Assertion. Session info: {'authn_info': [('urn:oasis:names:tc:SAML:2.0:ac:classes:Password', [], '2018-11-07T07:43:32.657Z')], 'name_id': &amp;lt;saml2.saml.NameID object at 0x7f6f1a93c690&amp;gt;, 'not_on_or_after': 1542737974, 'session_index': '_c1e08c03-ccf6-4f32-9a96-5e00cc4233e4', 'came_from': None, 'ava': {}, 'issuer': '&lt;A href="https://sts.windows.net/f0ba4e-redacted-client-id-4kha/" target="_blank"&gt;https://sts.windows.net/f0ba4e-redacted-client-id-4kha/&lt;/A&gt;'}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By default, Hue will use the following configuration for [libsaml]:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;username_source=attributes&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;user_attribute_mapping={'uid': ('username', )}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that you do not have any SAML attribute "&lt;STRONG&gt;uid&lt;/STRONG&gt;" in your SAML response so nothing is found to map to the Hue "username".&lt;/P&gt;&lt;P&gt;Another problem is that if you were trying to use attributes (not SAML response&amp;nbsp;&lt;STRONG&gt;nameid&lt;/STRONG&gt;) for the Hue username, then the&amp;nbsp;&lt;STRONG&gt;user_attribute_mapping&lt;/STRONG&gt; is not correct by default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following is the format I use with success:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;user_attribute_mapping='{"uid":"username"}'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you do not use "uid" in your response, what attribute do you want to use or do you want to use nameId?&amp;nbsp; If you use NameId, that will map to an email address format in Hue which may not be compatible with other hadoop configuration.&amp;nbsp; The best thing to do is decide what attribute will have a "logon" user name in Azure SSO and make sure that is included in the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for testing, though, you can just test to see if this works with NameId by adding this to your [libsaml] section in your Hue safety valve:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;username_source=nameid&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Restart Hue after that.&amp;nbsp; I am going based on this in your response xml:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&amp;gt;REDACTED-MY-USER-NAME&amp;lt;/saml:NameID&amp;gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 18:31:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82661#M85028</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-20T18:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82689#M85029</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;, thanks for the helpfull insights, I was able to move forward a little bit. But to keep the chronology of those test attempts clear, I reply first for the first suggestion to change the mapping in HUE and send a response uid. What I did:&lt;/P&gt;&lt;P&gt;In AAD I created in Attributes and Claims a new uid and saml_user attributes and mapped a first name to it (let pretend that this is the user name I want to use).&lt;/P&gt;&lt;PRE&gt;saml_user = user.givenname
uid = user.givenname&lt;/PRE&gt;&lt;P&gt;In HUE I have added this&lt;/P&gt;&lt;PRE&gt;+user_attribute_mapping='{"uid":"username"}'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Now I expected that the hue will find the user name either in uid or in saml_user. But the logs shows the issue is the same:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[20/Nov/2018 23:57:55 -0800] response     INFO     Subject NameID: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&amp;gt;&amp;lt;REDACTED-MY-USER-NAME&amp;gt;&amp;lt;/saml:NameID&amp;gt;
[20/Nov/2018 23:57:55 -0800] response     DEBUG    Attribute Statement: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;saml:AttributeStatement xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;&amp;lt;saml:Attribute Name="http://schemas.microsoft.com/identity/claims/tenantid" NameFormat=".....
[20/Nov/2018 23:57:55 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/identity/claims/tenantid" NameFo...
[20/Nov/2018 23:57:55 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/identity/claims/objectidentifier" NameFo...
[20/Nov/2018 23:57:55 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/identity/claims/identityprovider" NameFo...
[20/Nov/2018 23:57:55 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="http://schemas.microsoft.com/claims/authnmethodsreferences" NameFor...
[20/Nov/2018 23:57:55 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="saml_user" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;Tomas&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 23:57:55 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;Tomas&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[20/Nov/2018 23:57:55 -0800] response     ERROR    Missing Attribute Statement
[20/Nov/2018 23:57:55 -0800] response     DEBUG    --- AVA: {}
[20/Nov/2018 23:57:55 -0800] client_base  INFO     --- ADDED person info ----
[20/Nov/2018 23:57:55 -0800] backends     ERROR    The attributes dictionary is empty
[20/Nov/2018 23:57:55 -0800] backends     ERROR    Could not find saml_user value
[20/Nov/2018 23:57:55 -0800] views        WARNING  Could not authenticate user received in SAML Assertion. Session info: {'authn_info': [('urn:oasis:names:tc:SAML:2.0:ac:classes:Password', [], '2018-11-07T07:43:32.657Z')], 'name_id': &amp;lt;saml2.saml.NameID object at 0x7faf037550d0&amp;gt;, 'not_on_or_after': 1542790374, 'session_index': '_70892f13-d4ad-4fe2-808c-38e9d85a408b', 'came_from': None, 'ava': {}, 'issuer': 'https://sts.windows.net/f0ba4ef9-b8da-..../'}
[20/Nov/2018 23:57:55 -0800] middleware   INFO     Processing exception: : Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
    return func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/http.py", line 41, in inner
    return func(request, *args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 296, in assertion_consumer_service
    raise PermissionDenied
PermissionDenied&lt;/PRE&gt;&lt;P&gt;In the error log above I think the important message is that hue does not see any attribute list at all! And you can see, that the response contain couple of attribute elements and two of them are the uid and saml_user, mapping to "Tomas" as a value.&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;So how to configure saml settings in hue to work with this response structure?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok second part of my answer, your suggestion to map the user_name with a name_id_format. This actually worked nicely, but as you said, and I agree, I dont want to use email address as user name in HUE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So changing the settings in HUE:&lt;/P&gt;&lt;PRE&gt;username_source=nameid
name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"&lt;/PRE&gt;&lt;P&gt;resulted in this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[21/Nov/2018 00:06:57 -0800] attribute_converter INFO     Unknown attribute name: &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&amp;gt;&amp;lt;saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string"&amp;gt;Tomas&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;
[21/Nov/2018 00:06:57 -0800] response     ERROR    Missing Attribute Statement
[21/Nov/2018 00:06:57 -0800] response     DEBUG    --- AVA: {}
[21/Nov/2018 00:06:57 -0800] client_base  INFO     --- ADDED person info ----
[21/Nov/2018 00:06:57 -0800] backends     ERROR    The attributes dictionary is empty
[21/Nov/2018 00:06:57 -0800] cursors      WARNING  /opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/mysql/base.py:124: Warning: Data truncated for column 'username' at row 1
  return self.cursor.execute(query, args)

[21/Nov/2018 00:06:57 -0800] models       WARNING  /opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/backends.py:221: DeprecationWarning: The use of AUTH_PROFILE_MODULE to define user profiles has been deprecated.
  profile = user.get_profile()

[21/Nov/2018 00:06:57 -0800] backend      INFO     Augmenting users with class: &amp;lt;class 'desktop.auth.backend.DefaultUserAugmentor'&amp;gt;
[21/Nov/2018 00:06:57 -0800] access       INFO     10.85.xxx.xxx &amp;lt;REDACTED-MY-USER-NAME&amp;gt; - "POST /saml2/acs/ HTTP/1.1" returned in 113ms
[21/Nov/2018 00:06:59 -0800] access       INFO     10.85.xxx.xxx &amp;lt;REDACTED-MY-USER-NAME_TRUNCATED&amp;gt; - "GET / HTTP/1.1" returned in 926ms
[21/Nov/2018 00:07:00 -0800] connectionpool INFO     Starting new HTTPS connection (1): ip-10-85-yyy-yy.eu-west-1.compute.internal:14000
[21/Nov/2018 00:07:00 -0800] connectionpool DEBUG    "ip-10-85-yyy-yy.eu-west-1.compute.internal:14000 GET /webhdfs/v1/user/&amp;lt;REDACTED-MY-USER-NAME_TRUNCATED&amp;gt;m?op=GETFILESTATUS&amp;amp;user.name=hue&amp;amp;doas=&amp;lt;REDACTED-MY-USER-NAME_TRUNCATED&amp;gt; HTTP/1.1" 401 997
[21/Nov/2018 00:07:00 -0800] kerberos_    DEBUG    handle_401(): Handling: 401
[21/Nov/2018 00:07:00 -0800] kerberos_    DEBUG    generate_request_header(): host_port_thread: ip-10-85-yyy-yy.eu-west-1.compute.internal_14000_140122880198400
[21/Nov/2018 00:07:00 -0800] kerberos_    DEBUG    authenticate_user(): Authorization header: NegotiawnwMi.....
[21/Nov/2018 00:07:01 -0800] connectionpool DEBUG    "ip-10-85-yyy-yy.eu-west-1.compute.internal:14000 GET /webhdfs/v1/user/&amp;lt;REDACTED-MY-USER-NAME_TRUNCATED&amp;gt;m?op=GETFILESTATUS&amp;amp;user.name=hue&amp;amp;doas=&amp;lt;REDACTED-MY-USER-NAME_TRUNCATED&amp;gt; HTTP/1.1" 404 None
[21/Nov/2018 00:07:01 -0800] kerberos_    DEBUG    authenticate_user(): returning &amp;lt;Response [404]&amp;gt;&lt;/PRE&gt;&lt;P&gt;As you can see the application picked correctly the username from nameid, and trucnated it (because it is a long email address). But the error regarding attributes are still there. What I would like to achieve is to map the user name to those "uid" or "saml_user" attributes instead.&lt;/P&gt;&lt;P&gt;(Btw the two last errors I assume are from the NameNode when HUE asks the NN to fetch the user's data from HDFS, but this user apparently does not exists)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And my last question is this is working as an IDP initiated login (when I test it from AAD), or it is working when I have logged in and in another tab I open hue URL. But in different window, opening the HUE does not redirect me to the windows login page. I thought this information&amp;nbsp; - where to redirect - should be in the idp.xml file and the HUE application should redirect the user to the login page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 08:38:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82689#M85029</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2018-11-21T08:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82692#M85030</link>
      <description>&lt;P&gt;One more issue I observed with sign in with email address:&lt;BR /&gt;- I sign in first time, it is ok, Hue creates home directory and user entry&lt;BR /&gt;- I sign out, and then sign in again, and it failes on duplicity:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[21/Nov/2018 01:11:01 -0800] middleware   INFO     Processing exception: (1062, "Duplicate entry '&amp;lt;REDACTED&amp;gt;onmicrosoft.co' for key 'username'"): Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
    return func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/http.py", line 41, in inner
    return func(request, *args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 293, in assertion_consumer_service
    create_unknown_user=create_unknown_user)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/contrib/auth/__init__.py", line 49, in authenticate
    user = backend.authenticate(**credentials)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/desktop/core/src/desktop/lib/metrics/registry.py", line 388, in wrapper
    return fn(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/desktop/libs/libsaml/src/libsaml/backend.py", line 53, in authenticate
    return super(SAML2Backend, self).authenticate(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/backends.py", line 115, in authenticate
    create_unknown_user, main_attribute, attributes, attribute_mapping)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/backends.py", line 152, in get_saml2_user
    return self._get_or_create_saml2_user(main_attribute, attributes, attribute_mapping)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/backends.py", line 167, in _get_or_create_saml2_user
    defaults=user_create_defaults, **user_query_args)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 154, in get_or_create
    return self.get_queryset().get_or_create(**kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 391, in get_or_create
    six.reraise(*exc_info)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 383, in get_or_create
    obj.save(force_insert=True, using=self.db)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/base.py", line 545, in save
    force_update=force_update, update_fields=update_fields)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/base.py", line 573, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/base.py", line 654, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/base.py", line 687, in _do_insert
    using=using, raw=raw)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 232, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 1514, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 903, in execute_sql
    cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/mysql/base.py", line 124, in execute
    return self.cursor.execute(query, args)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate entry '&amp;lt;REDACTED&amp;gt;onmicrosoft.co' for key 'username'")&lt;/PRE&gt;&lt;P&gt;As this error comes from the database, it looks like Hue is looking into a database with a non-truncated username, and then tries to insert the truncated user name.&lt;/P&gt;&lt;P&gt;It looks to me as a bug, but not important, as I want to use other field from the Attribute list.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 09:24:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82692#M85030</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2018-11-21T09:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82742#M85031</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11235"&gt;@Tomas79&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for your "duplicate entry" issue, it makes sense if your email address is longer than the username column width (which is 30 characters, I think).&amp;nbsp; You log in the first and the username obtained from the SAML response nameID is truncated when added to the database.&amp;nbsp; Then, the next time you log in, a search for the full email address is done (and not found due to the username truncation) since no rows are returned, Hue considers this a new user and attempts to add it.&amp;nbsp; This fails since the truncated name already exists.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to get around that problem, I suppose you could expand the "username" column to 40 or 50 characters, but I think you wanted to use attribute-based usernames instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting back to the attributes, I do see you have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This&amp;nbsp;&lt;EM&gt;seems&lt;/EM&gt; good, but there is some back-end computation that results in Hue not being able to see your attribute value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To understand this better, note this flow of mapping to get from the SAML response to a Hue username:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAML response attribute/value ====&amp;gt; pysaml attribute/value&lt;/P&gt;&lt;P&gt;pysaml attribute/value&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;====&amp;gt; djangosaml "username" attribute&lt;/P&gt;&lt;P&gt;djangosaml user&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ====&amp;gt; Hue user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the&amp;nbsp;&lt;STRONG&gt;SAML response to pysaml attribute&lt;/STRONG&gt; mapping, there is a built-in mapping in hue/desktop/libs/libsaml/attribute-maps/SAML2.py for&amp;nbsp;&lt;STRONG&gt;urn:oasis:names:tc:SAML:2.0:attrname-format:uri&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It maps response attributes to pysaml attributes and stores the value in memory.&amp;nbsp; There is no "uid" mapping by default.&amp;nbsp; Rather, the SAML2.py mapping file looks for the OID for "uid" which is &lt;STRONG&gt;urn:oid:0.9.2342.19200300.100.1.1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since&amp;nbsp;urn:oid:0.9.2342.19200300.100.1.1 is not found in the response, your attribute and value is not seen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is a long explanation to come to a couple options you have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Configure your IDP to emit the uid attribute with the format&amp;nbsp;&lt;STRONG&gt;urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified&lt;/STRONG&gt; instead of&amp;nbsp;&lt;STRONG&gt;urn:oasis:names:tc:SAML:2.0:attrname-format:uri&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will tell the client that the attribute does not conform to standard OID formatting so the attribute name should be obtained literally (as is) and the value retrieved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a custom mapping for the "uid" attribute in a mapping attribute for&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;urn:oasis:names:tc:SAML:2.0:attrname-format:uri&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To do so, you can follow these instructions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[A]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create a directory that will house your attribute mapping file&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# mkdir /opt/cloudera/saml/attribute_mapping&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# chown hue:hue&amp;nbsp;&lt;SPAN&gt;/opt/cloudera/saml/attribute_mapping&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[B]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Place the custom attribute mapping file in the directory created in step A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"saml_uri.py" file contents:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;MAP = {
"identifier": "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
"fro": {
  'uid': 'uid',
},
"to": {
  'uid': 'uid',
}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;NOTE:&amp;nbsp;&lt;/STRONG&gt;I believe the above should work as the "fro" section maps assertion attribute name to pysaml name and the "to" section does the reverse.&amp;nbsp; I think it should be OK to have both sides the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE2&lt;/STRONG&gt;: make sure hue can read from the saml_uri.py file.&lt;BR /&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# chown hue:hue saml_uri.py&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There should now be an attribute mapping file named &lt;STRONG&gt;saml_uri.py&lt;/STRONG&gt;&amp;nbsp;with the following location:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;/opt/cloudera/saml/attribute_mapping/saml_uri.py&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[C]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Configure Hue's Service-Wide safety valve with the following addition in the [libsaml] section:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;attribute_map_dir=/opt/cloudera/saml/attribute_mapping&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;user_attribute_mapping='{"uid":"username"}'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure to restart Hue after the change to the safety valve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: the only attribute that Hue really needs or cares about in this case is whatever maps to "username"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 19:56:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82742#M85031</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-21T19:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82768#M85032</link>
      <description>&lt;P&gt;I was not able to set Name format, so opted for the second, and it resolved the issue. Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 08:32:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/82768#M85032</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2018-11-22T08:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/88762#M85033</link>
      <description>&lt;P&gt;we are facing this issue, and trying to see if anybody else saw the same..&amp;nbsp; &amp;nbsp;we have the key in the right locaiton, and we have tried encrypted and un-encrypted version, and still see the same problem.&lt;/P&gt;&lt;P&gt;We have tested DER, des3 version of the key file and no progres..&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do we need stick to a certain format of the key..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[05/Apr/2019 16:37:03 -0400] entity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ERROR&amp;nbsp;&amp;nbsp;&amp;nbsp; Signature Error: None&lt;/P&gt;&lt;P&gt;[05/Apr/2019 16:37:03 -0400] client_base&amp;nbsp; ERROR&amp;nbsp;&amp;nbsp;&amp;nbsp; XML parse error: None&lt;/P&gt;&lt;P&gt;[05/Apr/2019 16:37:03 -0400] views&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ERROR&amp;nbsp;&amp;nbsp;&amp;nbsp; SAML Identity Provider is not configured correctly: certificate key is missing!&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 254, in assertion_consumer_service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = client.parse_authn_request_response(xmlstr, BINDING_HTTP_POST, outstanding_queries)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/client_base.py", line 597, in parse_authn_request_response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; binding, **kwargs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/entity.py", line 1140, in _parse_response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = response.loads(xmlstr, False, origxml=origxml)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/response.py", line 512, in loads&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self._loads(xmldata, decode, origxml)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/response.py", line 337, in _loads&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; **args)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/sigver.py", line 1840, in correctly_signed_response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class_name(response), origdoc)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/pysaml2-4.4.0-py2.7.egg/saml2/sigver.py", line 1614, in _check_signature&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise MissingKey("%s" % issuer)&lt;/P&gt;&lt;P&gt;MissingKey: None&lt;/P&gt;&lt;P&gt;[05/Apr/2019 16:37:03 -0400] middleware&amp;nbsp;&amp;nbsp; INFO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Processing exception: : Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = wrapped_callback(request, *callback_args, **callback_kwargs)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return func(*args, **kwargs)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/http.py", line 41, in inner&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return func(request, *args, **kwargs)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/csrf.py", line 57, in wrapped_view&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return view_func(*args, **kwargs)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/views.py", line 272, in assertion_consumer_service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return fail_acs_response(request)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/utils.py", line 85, in fail_acs_response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return failure_function(request, *args, **kwargs)&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/djangosaml2-0.16.4-py2.7.egg/djangosaml2/acs_failures.py", line 22, in exception_failure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise exc_class&lt;/P&gt;&lt;P&gt;PermissionDenied&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[05/Apr/2019 16:37:03 -0400] access&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WARNING&amp;nbsp; 162.44.245.32 -anon- - "POST /saml2/acs/ HTTP/1.1" -- 403 access forbidden&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 21:07:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/88762#M85033</guid>
      <dc:creator>MahendraDevu</dc:creator>
      <dc:date>2019-04-05T21:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: HUE fails with saml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/330990#M85034</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/22260"&gt;@MahendraDevu&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Did you resolve the error in HUE SAML we are getting this in CDP 7.1.7 after upgrade. SAML was working in CDH5.16 HUE before upgrade:&lt;BR /&gt;[05/Apr/2019 16:37:03 -0400] views ERROR SAML Identity Provider is not configured correctly: certificate key is missing!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UPDATE: Resolved this issue by making the IDP&amp;nbsp;&amp;lt;md:EntityDescriptor entityID same as that on the metadata.xml we specified in HUE Advanced Configuration snippet &lt;SPAN&gt;hue_safety_valve.ini&amp;nbsp;&lt;/SPAN&gt;metadata_file . There was a mismatch between IDP value and what was in the metadata file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 21:00:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HUE-fails-with-saml/m-p/330990#M85034</guid>
      <dc:creator>ebeb</dc:creator>
      <dc:date>2021-11-24T21:00:27Z</dc:date>
    </item>
  </channel>
</rss>

