SSO/SAML nextcloud errors

saml
nextcloud
sso

#1

Hi, I’m tryng to configure saml+nextcloud. I’ ve followed https://www.univention.com/blog-en/2019/02/how-to-single-sign-on-for-nextcloud/

My config si:
ucs-sso.domain.loc MASTER
ucs-775.domain.loc Slave with Nextcloud

Errors:
https://ucs-sso.domain.loc/univention/saml/

Internal server error.
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1184, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1195, in attribute_consuming_service
    saml = SAMLUser(response, message)
  File "/usr/sbin/univention-management-console-web-server", line 421, in __init__
    self.username = ''.join(self.data['uid'])
KeyError: 'uid'

Nextcloud login:
SimpleSAML_Error_MetadataNotFound: METADATANOTFOUND(’%ENTITYID%’ => ‘‘https://ucs-7758.domain.loc/nextcloud/apps/user_saml/saml/metadata’’)

Backtrace:
3 /usr/share/simplesamlphp/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php:305 (SimpleSAML_Metadata_MetaDataStorageHandler::getMetaData)
2 /usr/share/simplesamlphp/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php:325 (SimpleSAML_Metadata_MetaDataStorageHandler::getMetaDataConfig)
1 /usr/share/simplesamlphp/modules/saml/lib/IdP/SAML2.php:303 (sspmod_saml_IdP_SAML2::receiveAuthnRequest)
0 /usr/share/simplesamlphp/www/saml2/idp/SSOService.php:19 (N/A)

How can i fix?
Regards


#2

I’ve upgrade to 4.4, now only white screen.
No error messages

Where can I se saml log?


#3

Hi @andreaussi,
saml logfile should be at /var/log/simplesamlphp.
BR,
Jörn


#4

Hi @jolentes , my /var/log/simplesamlphp is empty


#5

Check what the logging.handler is in /etc/simplesamlphp/config.php.
If it is syslog you find the log messages in /var/log/syslog and /var/log/debug.
You can change the log level also in the config.


#6

@jolentes
/etc/simplesamlphp/config.php

    'debug'         => true,
    'logging.level'         => SimpleSAML_Logger::DEBUG,
    'loggingdir'            => '/var/log/simplesamlphp/',
    'logging.handler'       => '/var/log/simplesamlphp/simplesamlphp.log',
    'logging.logfile'               => 'simplesamlphp.log',

but /var/log/simplesamlphp empty

find / -name simplesamlphp.log —> o records


#7

That does not seam to be right. Check the simplesamlphp documentation for the correct values, but it should be something like ‘syslog’ or ‘file’.

BR,
Jörn