SAML Configuration not successful


#1

We were not able to do the SAML Configuration in our environment. We set all variables in the configuration still we are facing the below issue. Please find below issue log from the server.

"
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1639, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File “/opt/redash/redash.1.0.1.b2833/redash/authentication/saml_auth.py”, line 93, in idp_initiated
name = “%s %s” % (authn_response.ava[‘FirstName’][0], authn_response.ava[‘LastName’][0])
KeyError: ‘FirstName’
[2017-05-04 07:10:09,709][PID:11799][INFO][metrics] method=POST path=/saml/callback endpoint=saml_auth.idp_initiated status=500 content_type=? content_length=-1 duration=19.01 query_count=0 query_duration=0.00
[2017-05-04 07:10:38,678][PID:11802][INFO][metrics] method=GET path=/ endpoint=redash.index status=302 content_type=text/html; charset=utf-8 content_length=289 duration=0.59 query_count=0 query_duration=0.00
[2017-05-04 07:10:39,037][PID:11802][INFO][metrics] method=GET path=/login endpoint=redash.login status=200 content_type=text/html; charset=utf-8 content_length=2313 duration=3.27 query_count=1 query_duration=0.76
[2017-05-04 07:10:39,437][PID:11796][INFO][metrics] method=GET path=/styles/superflat_redash.css endpoint=redash.send_static status=200 content_type=text/css; charset=utf-8 content_length=213822 duration=0.70 query_count=0 query_duration=0.00
[2017-05-04 07:10:39,437][PID:11802][INFO][metrics] method=GET path=/styles/redash.css endpoint=redash.send_static status=200 content_type=text/css; charset=utf-8 content_length=10622 duration=0.65 query_count=0 query_duration=0.00
[2017-05-04 07:10:39,784][PID:11793][INFO][metrics] method=GET path=/styles/login.css endpoint=redash.send_static status=200 content_type=text/css; charset=utf-8 content_length=1030 duration=0.43 query_count=0 query_duration=0.00
[2017-05-04 07:10:39,786][PID:11802][INFO][metrics] method=GET path=/js/jquery.min.js endpoint=redash.send_static status=200 content_type=application/javascript content_length=92629 duration=0.43 query_count=0 query_duration=0.00
[2017-05-04 07:10:40,486][PID:11802][INFO][metrics] method=GET path=/images/logo_white.png endpoint=redash.send_static status=200 content_type=image/png content_length=34074 duration=0.47 query_count=0 query_duration=0.00
[2017-05-04 07:10:40,554][PID:11802][INFO][metrics] method=GET path=/fonts/roboto/Roboto-Regular-webfont.woff endpoint=redash.send_static status=404 content_type=text/html content_length=233 duration=0.41 query_count=0 query_duration=0.00
[2017-05-04 07:10:40,556][PID:11802][INFO][metrics] method=GET path=/fonts/roboto/Roboto-Medium-webfont.woff endpoint=redash.send_static status=404 content_type=text/html content_length=233 duration=0.40 query_count=0 query_duration=0.00
[2017-05-04 07:10:40,907][PID:11802][INFO][metrics] method=GET path=/fonts/roboto/Roboto-Regular-webfont.ttf endpoint=redash.send_static status=404 content_type=text/html content_length=233 duration=0.44 query_count=0 query_duration=0.00
[2017-05-04 07:10:40,908][PID:11799][INFO][metrics] method=GET path=/fonts/roboto/Roboto-Medium-webfont.ttf endpoint=redash.send_static status=404 content_type=text/html content_length=233 duration=0.52 query_count=0 query_duration=0.00
[2017-05-04 07:10:41,282][PID:11799][INFO][metrics] method=GET path=/images/favicon-16x16.png endpoint=redash.send_static status=200 content_type=image/png content_length=1364 duration=0.56 query_count=0 query_duration=0.00
[2017-05-04 07:10:42,009][PID:11799][INFO][saml2.entity] REQUEST: <?xml version='1.0' encoding='UTF-8'?>
<ns0:AuthnRequest xmlns:ns0=“urn:oasis:names:tc:SAML:2.0:protocol” xmlns:ns1=“urn:oasis:names:tc:SAML:2.0:assertion” AssertionConsumerServiceURL=“http://10.57.178.120/saml/callback” Destination=“https://10.236.220.174:9443/samlsso” ID=“id-F12Out4mMm1B7JXVn” IssueInstant=“2017-05-04T07:10:42Z” ProtocolBinding=“urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST” Version=“2.0”><ns1:Issuer Format=“urn:oasis:names:tc:SAML:2.0:nameid-format:entity”>174_dev.com</ns1:Issuer><ns0:NameIDPolicy AllowCreate=“false” Format=“urn:oasis:names:tc:SAML:2.0:nameid-format:transient” /></ns0:AuthnRequest>
[2017-05-04 07:10:42,009][PID:11799][INFO][saml2.client] AuthNReq: <?xml version='1.0' encoding='UTF-8'?>
<ns0:AuthnRequest xmlns:ns0=“urn:oasis:names:tc:SAML:2.0:protocol” xmlns:ns1=“urn:oasis:names:tc:SAML:2.0:assertion” AssertionConsumerServiceURL=“http://10.57.178.120/saml/callback” Destination=“https://10.236.220.174:9443/samlsso” ID=“id-F12Out4mMm1B7JXVn” IssueInstant=“2017-05-04T07:10:42Z” ProtocolBinding=“urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST” Version=“2.0”><ns1:Issuer Format=“urn:oasis:names:tc:SAML:2.0:nameid-format:entity”>174_dev.com</ns1:Issuer><ns0:NameIDPolicy AllowCreate=“false” Format=“urn:oasis:names:tc:SAML:2.0:nameid-format:transient” /></ns0:AuthnRequest>
[2017-05-04 07:10:42,009][PID:11799][INFO][saml2.entity] HTTP REDIRECT
[2017-05-04 07:10:42,010][PID:11799][INFO][metrics] method=GET path=/saml/login endpoint=saml_auth.sp_initiated status=302 content_type=text/html; charset=utf-8 content_length=1323 duration=3.02 query_count=0 query_duration=0.00
[2017-05-04 07:10:55,665][PID:11793][INFO][saml2.response] status: <?xml version='1.0' encoding='UTF-8'?>
<ns0:Status xmlns:ns0=“urn:oasis:names:tc:SAML:2.0:protocol”><ns0:StatusCode Value=“urn:oasis:names:tc:SAML:2.0:status:Success” /></ns0:Status>
[2017-05-04 07:10:55,675][PID:11793][INFO][saml2.response] Subject NameID: <?xml version='1.0' encoding='UTF-8'?>
<ns0:NameID xmlns:ns0=“urn:oasis:names:tc:SAML:2.0:assertion” Format=“urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified”>CLOUD360\468003</ns0:NameID>
[2017-05-04 07:10:55,675][PID:11793][INFO][saml2.client_base] — ADDED person info ----
[2017-05-04 07:10:55,676][PID:11793][INFO][saml2.response] Subject NameID: <?xml version='1.0' encoding='UTF-8'?>
<ns0:NameID xmlns:ns0=“urn:oasis:names:tc:SAML:2.0:assertion” Format=“urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified”>CLOUD360\468003</ns0:NameID>
[2017-05-04 07:10:55,676] ERROR in app: Exception on /saml/callback [POST]
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1988, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python2.7/dist-packages/flask_restful/init.py”, line 271, in error_router
return original_handler(e)
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1639, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File “/opt/redash/redash.1.0.1.b2833/redash/authentication/saml_auth.py”, line 93, in idp_initiated
name = “%s %s” % (authn_response.ava[‘FirstName’][0], authn_response.ava[‘LastName’][0])
KeyError: ‘FirstName’
[2017-05-04 07:10:55,676][PID:11793][ERROR][redash] Exception on /saml/callback [POST]
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1988, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python2.7/dist-packages/flask_restful/init.py”, line 271, in error_router
return original_handler(e)
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1639, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File “/opt/redash/redash.1.0.1.b2833/redash/authentication/saml_auth.py”, line 93, in idp_initiated
name = “%s %s” % (authn_response.ava[‘FirstName’][0], authn_response.ava[‘LastName’][0])
KeyError: ‘FirstName’
[2017-05-04 07:10:55,677][PID:11793][INFO][metrics] method=POST path=/saml/callback endpoint=saml_auth.idp_initiated status=500 content_type=? content_length=-1 duration=18.15 query_count=0 query_duration=0.00

"