CB Response: SSO auth fails with coreservices error "TypeError: translate() takes exactly one argument (2 given)"
book
Article ID: 290317
calendar_today
Updated On:
Products
Carbon Black EDR (formerly Cb Response)
Issue/Introduction
- Sign in attempts using SSO return an error in the UI
- /var/log/coreservices/debug.log has an error
<err> cb.flask.blueprints.api_routes_saml - SSO assertion auth failure
Traceback (most recent call last):
File "/usr/share/cb/virtualenv/lib/python2.7/site-packages/cb/flask/blueprints/api_routes_saml.py", line 544, in saml_assertion
File "/usr/share/cb/virtualenv/lib/python2.7/site-packages/cb/flask/blueprints/api_routes_saml.py", line 269, in parse_response
File "/etc/cb/sso/attr_map.py", line 60, in callback
result["username"]=value[0].translate(None, '_')
TypeError: translate() takes exactly one argument (2 given)
Environment
- CB Response Server: 6.2.2 and higher
- Linux: All Supported Versions
Cause
The Python function, translate, no longer supports multiple arguments.
Resolution
- For more reliable results, use the Python replace method instead of translate.
- If a different method is failing, review Python notes for the method in the new version.
Feedback
thumb_up
Yes
thumb_down
No