Once in a while, the metadata.xml gets truncated and results in saml2 stop working.
Looking closely, it seems the metadata are being regenerated after one week, as soon as they are requested with a GET on /saml2/metadata. This comes with the following error in the logs:
/saml2/metadata
Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/cherrypy/_cprequest.py", line 638, in respond self._do_respond(path_info) File "/usr/lib/python3.11/site-packages/cherrypy/_cprequest.py", line 697, in _do_respond response.body = self.handler() ^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/cherrypy/lib/encoding.py", line 223, in __call__ self.body = self.oldhandler(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__ return self.callable(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/ipsilon/util/page.py", line 85, in __call__ return op(*args, **kwargs).encode('utf-8') ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/ipsilon/providers/common.py", line 105, in root return op(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/ipsilon/providers/saml2idp.py", line 181, in GET body = self._get_metadata() ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/ipsilon/providers/saml2idp.py", line 204, in _get_metadata m.write(body) TypeError: write() argument must be str, not bytes
This could be fixed by either decoding the bytes to str, or just opening the file in binary mode like in saml2metadata.py
The pull request to fix this was merged a few days ago.
Metadata Update from @ngompa: - Custom field component adjusted to None - Custom field type adjusted to None - Custom field version adjusted to None - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)