Environment
- EDR Server: All Supported Versions
Symptoms
- Error seen in /var/log/cb/coreservices/debug.log:
2021-05-06 17:57:55 [51778] <err> cb.flask.blueprints.api_routes_saml - Failed to load custom SAML attribute map. Reverting to default mapping.
Traceback (most recent call last):
File "/usr/share/cb/virtualenv/lib/python3.8/site-packages/cb/flask/blueprints/api_routes_saml.py", line 378, in get_attr_mapper
File "/usr/lib64/python3.8/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 779, in exec_module
File "<frozen importlib._bootstrap_external>", line 916, in get_code
File "<frozen importlib._bootstrap_external>", line 846, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/etc/cb/sso/attr_map.py", line 61
logger.debug("{} {}".format(str(key), str(value)))
^
TabError: inconsistent use of tabs and spaces in indentation
Cause
- A mixture of tabs and spaces located in the /etc/cb/sso/attr_map.py file
Resolution
- Ensure there's consistency with tabs or spaces in Python files, depending on which is preferred. The default examples of the attr_map.py file use spaces, so we would suggest using spaces when using templates.
- It's possible to choose to view all characters using your favorite text editor.
- As an example here's a snippet of the output from Notepad++. Notice the '.' (spaces) and arrows (tab indentions).