This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Misindention in saml2_config.sp_config section of generated configuration file #7285
Copy link
Copy link
Closed
Description
Description
When one uses the organization
and/or contact_person
options for the SAML service provider, indented as in the generated homeserver.yml
, synapse fails on startup with the following error.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/site-packages/synapse/app/homeserver.py", line 651, in <module>
main()
File "/usr/local/lib/python3.7/site-packages/synapse/app/homeserver.py", line 646, in main
hs = setup(sys.argv[1:])
File "/usr/local/lib/python3.7/site-packages/synapse/app/homeserver.py", line 324, in setup
"Synapse Homeserver", config_options
File "/usr/local/lib/python3.7/site-packages/synapse/config/_base.py", line 629, in load_or_generate_config
config_dict, config_dir_path=config_dir_path, data_dir_path=data_dir_path
File "/usr/local/lib/python3.7/site-packages/synapse/config/_base.py", line 651, in parse_config_dict
data_dir_path=data_dir_path,
File "/usr/local/lib/python3.7/site-packages/synapse/config/_base.py", line 266, in invoke_all
res[name] = getattr(config, func_name)(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/synapse/config/saml2_config.py", line 159, in read_config
self.saml2_sp_config.load(saml2_config_dict)
File "/usr/local/lib/python3.7/site-packages/saml2/config.py", line 382, in load
self.load_complex(cnf, metadata_construction=metadata_construction)
File "/usr/local/lib/python3.7/site-packages/saml2/config.py", line 316, in load_complex
self.load_metadata(cnf["metadata"]))
File "/usr/local/lib/python3.7/site-packages/saml2/config.py", line 425, in load_metadata
mds.imp(metadata_conf)
File "/usr/local/lib/python3.7/site-packages/saml2/mdstore.py", line 1023, in imp
self.load(key, val)
File "/usr/local/lib/python3.7/site-packages/saml2/mdstore.py", line 1008, in load
raise SAMLError("Unknown metadata type '%s'" % typ)
saml2.SAMLError: Unknown metadata type 'organization'
The Problem is fixed by moving everything below the metadata
option down by one indention level.
So this is an issue with the configuration file generating script, not with pysaml2.
Steps to reproduce
- Generate
homeserver.yml
as described in the installation guide - Uncomment in the
saml_config
section undersp_config
themetadata
option and at least one ofdescription
,name
,organization
andcontact_person
- Start synapse
Version information
- Version: Synapse v1.12.3
- Install method: Docker
Metadata
Metadata
Assignees
Labels
No labels