Page Unavailable When Trying to Retrieve SAML Metadata

Good afternoon,

I’m trying to get ADFS SAML authentication working on Seafile Pro. However, after applying the additional lines in the seahub_settings.py file to point it to our ADFS server I cannot visit any of the >seafileURL</saml2 URLs such as >seafileURL</saml2/metadata to retrieve the metadata for our ADFS server.

I’ve had a look in the seahub.log and it comes up with:

2019-07-01 16:12:08,979 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /saml2/metadata/
Traceback (most recent call last):
File “/home/mass/seafile/seafile-pro-server-7.0.3/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/home/mass/seafile/seafile-pro-server-7.0.3/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/home/mass/seafile/seafile-pro-server-7.0.3/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/home/mass/seafile/seafile-pro-server-7.0.3/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/usr/local/lib/python2.7/dist-packages/djangosaml2/views.py”, line 418, in metadata
conf = get_config(config_loader_path, request)
File “/usr/local/lib/python2.7/dist-packages/djangosaml2/conf.py”, line 73, in get_config
return config_loader(request)
File “/usr/local/lib/python2.7/dist-packages/djangosaml2/conf.py”, line 64, in config_settings_loader
conf.load(copy.deepcopy(settings.SAML_CONFIG))
File “/usr/local/lib/python2.7/dist-packages/saml2/config.py”, line 350, in load
self.load_complex(cnf, metadata_construction=metadata_construction)
File “/usr/local/lib/python2.7/dist-packages/saml2/config.py”, line 290, in load_complex
self.load_metadata(cnf[“metadata”]))
File “/usr/local/lib/python2.7/dist-packages/saml2/config.py”, line 392, in load_metadata
disable_ssl_certificate_validation=disable_validation)
File “/usr/local/lib/python2.7/dist-packages/saml2/mdstore.py”, line 817, in init
self.security = security_context(config)
File “/usr/local/lib/python2.7/dist-packages/saml2/sigver.py”, line 1128, in security_context
“xmlsec binary not in ‘%s’ !” % xmlsec_binary)
SigverError: xmlsec binary not in ‘/usr/local/bin/xmlsec1’ !

Could someone point me in the right direction please?

Running Seafile 7.0.3 Pro Server on Ubunutu

Following the instructions from the main Seafile server manual.

I’ve fixed this, was a couple of issues in the end.

  • The seahub_settings.py was pointing to /usr/local/bin/xmlsec1 not simply /usr/bin/xmlsec1 which is where it’s installed by default.

  • The service account that was running the services couldn’t access the private/public keys that were generated for the SP, had to change permissions.

All seems to work now though.