<?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: Error while configuring HUE with SAML in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60546#M68883</link>
    <description>&lt;P&gt;Surprisingly commenting out “user_attribute_mapping={'uid': ('username',)}” in config file (is uses same thing which is default) does the magic. Looks like following code in libsaml/conf.py is creating problem.&lt;/P&gt;&lt;PRE&gt;def dict_list_map(value):
  if isinstance(value, str):
    d = {}
    for k, v in json.loads(value).iteritems():
      d[k] = (v,)
    return d
  elif isinstance(value, dict):
    return value
  return None

USER_ATTRIBUTE_MAPPING = Config(
  key="user_attribute_mapping",
  default={'uid': ('username', )},
  type=dict_list_map,
  help=_t("A mapping from attributes in the response from the IdP to django user attributes."))

&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Oct 2017 21:36:17 GMT</pubDate>
    <dc:creator>sudhakarv</dc:creator>
    <dc:date>2017-10-03T21:36:17Z</dc:date>
    <item>
      <title>Error while configuring HUE with SAML</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60539#M68882</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am trying to configure HUE with SAML Authentication and receiving following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;[03/Oct/2017 11:13:36 +0000] 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="2017-10-03T18:08:35.668Z" NotOnOrAfter="2017-10-03T18:18:35.668Z"&amp;gt;&amp;lt;saml:AudienceRestriction&amp;gt;&amp;lt;saml:Audience&amp;gt;http://xxxxx.us-east-1.elb.amazonaws.com/saml2/metadata/&amp;lt;/saml:Audience&amp;gt;&amp;lt;/saml:AudienceRestriction&amp;gt;&amp;lt;/saml:Conditions&amp;gt;
[03/Oct/2017 11:13:36 +0000] response DEBUG --- Getting Identity ---
[03/Oct/2017 11:13:36 +0000] 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="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"&amp;gt;&amp;lt;saml:AttributeValue xsi:type="xs:string"&amp;gt;svasiraju&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;saml:Attribute Name="email" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"&amp;gt;&amp;lt;saml:AttributeValue xsi:type="xs:string"&amp;gt;abc@yahoo.com&amp;lt;/saml:AttributeValue&amp;gt;&amp;lt;/saml:Attribute&amp;gt;&amp;lt;/saml:AttributeStatement&amp;gt;
[03/Oct/2017 11:13:36 +0000] response DEBUG Converts name format: urn:oasis:names:tc:SAML:2.0:attrname-format:uri
[03/Oct/2017 11:13:36 +0000] response DEBUG --- AVA: {'uid': ['svasiraju'], 'email': ['abc@yahoo.com']}
[03/Oct/2017 11:13:36 +0000] 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:x509SubjectName"&amp;gt;abc@yahoo.com&amp;lt;/saml:NameID&amp;gt;
[03/Oct/2017 11:13:36 +0000] client_base INFO --- ADDED person info ----
[03/Oct/2017 11:13:36 +0000] backends ERROR Session info or attribute mapping are None
[03/Oct/2017 11:13:36 +0000] views ERROR The user is None&lt;/PRE&gt;&lt;P&gt;Here is my configuration in HUE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;# Xmlsec1 binary path. This program should be executable by the user running Hue.
   xmlsec_binary=/usr/bin/xmlsec1
        assertion_consumer_service_uri="http://xxx.us-east-1.elb.amazonaws.com/saml2/acs/"
  
entity_id="http://xxx.us-east-1.elb.amazonaws.com/saml2/metadata/"
   create_users_on_login=true
    required_attributes=uid
  metadata_file=/opt/hue/desktop/conf/metadata2.xml

     key_file=/opt/hue/desktop/conf/mattermost-x509.pem

  cert_file=/opt/hue/desktop/conf/cert2.pem

     user_attribute_mapping={'uid': ('username', ), 'email': ('email', )},
     logout_requests_signed=true
     username_source=attributes&lt;/PRE&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 13:45:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60539#M68882</guid>
      <dc:creator>sudhakarv</dc:creator>
      <dc:date>2026-04-21T13:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error while configuring HUE with SAML</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60546#M68883</link>
      <description>&lt;P&gt;Surprisingly commenting out “user_attribute_mapping={'uid': ('username',)}” in config file (is uses same thing which is default) does the magic. Looks like following code in libsaml/conf.py is creating problem.&lt;/P&gt;&lt;PRE&gt;def dict_list_map(value):
  if isinstance(value, str):
    d = {}
    for k, v in json.loads(value).iteritems():
      d[k] = (v,)
    return d
  elif isinstance(value, dict):
    return value
  return None

USER_ATTRIBUTE_MAPPING = Config(
  key="user_attribute_mapping",
  default={'uid': ('username', )},
  type=dict_list_map,
  help=_t("A mapping from attributes in the response from the IdP to django user attributes."))

&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Oct 2017 21:36:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60546#M68883</guid>
      <dc:creator>sudhakarv</dc:creator>
      <dc:date>2017-10-03T21:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error while configuring HUE with SAML</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60549#M68884</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/24099"&gt;@sudhakarv&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the following with success previously:&lt;BR /&gt;&lt;BR /&gt;user_attribute_mapping='{"uid":"username"}'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does appear that the IDP --&amp;gt; Django mapping is not occurring. &amp;nbsp;Currently we only use map to "username".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 00:14:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60549#M68884</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2017-10-04T00:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error while configuring HUE with SAML</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60593#M68885</link>
      <description>&lt;P&gt;Thank you for your response. It is working with &lt;SPAN&gt;user_attribute_mapping='{"uid":"username"}'. I was following the given example&amp;nbsp;user_attribute_mapping={'uid': ('username', )} which was failing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you once again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 15:22:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/60593#M68885</guid>
      <dc:creator>sudhakarv</dc:creator>
      <dc:date>2017-10-04T15:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error while configuring HUE with SAML</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/87554#M68886</link>
      <description>&lt;P&gt;&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;&lt;P&gt;Can you help me with some example for&amp;nbsp;&lt;SPAN&gt;user_attribute_mapping='{"uid":"username"}'&amp;nbsp; ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My requirement is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Post integrating with SAML when user try to access Hue UI, If IDP returns UID of user post authentication but when user logged in Hue UI shows Username which i want to be displayed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you help me to understand about below property which says&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;user_attribute_mapping&amp;nbsp; - Map user attributed provided by IDP to Hue attributes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is Hue attributes?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Vijay M&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 06:52:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-configuring-HUE-with-SAML/m-p/87554#M68886</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2019-03-11T06:52:36Z</dc:date>
    </item>
  </channel>
</rss>

