By: Evan Kohout user 27 Oct 2017 at 10:24 p.m. CDT

3 Responses
Evan Kohout gravatar
I am setting up oxd server on a box running nextcloud and using the nextcloud plugin to authenticate users to my gluu server CE as IdP. This is on ubuntu 16.04 on amazon ec2. The install of the package seems to run fine, however, when i go to configure the server with the config file and then start the server, i can't register the nextcloud plugin from the nextcloud interface. It keeps telling me 'Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.' I have checked the file, checked the port, reinstalled the server, started and stopped the server, used the config files from 3.1 and still nothing, same message. I just went through this with wordpress and it seems to have run fine on that box, but my nextcloud install is giving me a much harder time. The 'oxd-server.log' file shows the following output: 2017-10-28 01:39:13,053 DEBUG [org.xdi.oxd.server.service.SocketService] Start new SocketProcessor... 2017-10-28 01:39:13,053 TRACE [org.xdi.oxd.server.SocketProcessor] Socket processor handling... 2017-10-28 01:39:13,053 TRACE [org.xdi.oxd.common.CoreUtils] commandSize: -1, stringStorage: 2017-10-28 01:39:13,053 TRACE [org.xdi.oxd.common.CoreUtils] Parsed sizeString: 0731, commandSize: 731 2017-10-28 01:39:13,054 TRACE [org.xdi.oxd.common.CoreUtils] Read result: ReadResult{m_command='{"command":"register_site","params":{"op_host":"https://auth.bmwpugetsound.com","authorization_redirect_uri":"http://files.bmwpugetsound.com/index.php/apps/gluusso/loginfromopenid","post_logout_redirect_uri":"http://files.bmwpugetsound.com/index.php/apps/gluusso/logoutfromopenid","application_type":"web","acr_values":[],"scope":["address","profile","mobile_phone","phone","permission","clientinfo","email","user_name","openid"],"client_jwks_uri":"","client_token_endpoint_auth_method":"","client_request_uris":null,"contacts":[""],"grant_types":["authorization_code"],"response_types":["code"],"client_logout_uris":["http://files.bmwpugetsound.com/index.php/apps/gluusso/logoutfromopenid"],"client_id":null,"client_secret":null}}', m_leftString=''} 2017-10-28 01:39:13,054 TRACE [org.xdi.oxd.server.Processor] Command: {"command":"register_site","params":{"op_host":"https://auth.bmwpugetsound.com","authorization_redirect_uri":"http://files.bmwpugetsound.com/index.php/apps/gluusso/loginfromopenid","post_logout_redirect_uri":"http://files.bmwpugetsound.com/index.php/apps/gluusso/logoutfromopenid","application_type":"web","acr_values":[],"scope":["address","profile","mobile_phone","phone","permission","clientinfo","email","user_name","openid"],"client_jwks_uri":"","client_token_endpoint_auth_method":"","client_request_uris":null,"contacts":[""],"grant_types":["authorization_code"],"response_types":["code"],"client_logout_uris":["http://files.bmwpugetsound.com/index.php/apps/gluusso/logoutfromopenid"],"client_id":null,"client_secret":null}} 2017-10-28 01:39:13,060 INFO [org.xdi.oxd.server.op.RegisterSiteOperation] Creating site configuration ... 2017-10-28 01:39:13,060 TRACE [org.xdi.oxd.server.service.HttpService] Created TRUST_ALL client. 2017-10-28 01:39:13,098 ERROR [org.xdi.oxd.server.op.RegisterSiteOperation] ClientId: null, clientSecret: null 2017-10-28 01:39:13,098 ERROR [org.xdi.oxd.server.op.RegisterSiteOperation] Value of one or more redirect_uris is invalid. 2017-10-28 01:39:13,099 ERROR [org.xdi.oxd.server.op.RegisterSiteOperation] Failed to register client for site. Details:{"error":"invalid_redirect_uri","error_description":"Value of one or more redirect_uris is invalid."} java.lang.RuntimeException: Failed to register client for site. Details:{"error":"invalid_redirect_uri","error_description":"Value of one or more redirect_uris is invalid."} at org.xdi.oxd.server.op.RegisterSiteOperation.registerClient(RegisterSiteOperation.java:230) at org.xdi.oxd.server.op.RegisterSiteOperation.persistSiteConfiguration(RegisterSiteOperation.java:184) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:60) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:37) at org.xdi.oxd.server.Processor.process(Processor.java:80) at org.xdi.oxd.server.Processor.process(Processor.java:55) at org.xdi.oxd.server.SocketProcessor.run(SocketProcessor.java:60) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2017-10-28 01:39:13,099 TRACE [org.xdi.oxd.server.Processor] Send back response: {"status":"error","data":{"error":"internal_error","error_description":"Unknown internal server error occurs."}} 2017-10-28 01:39:13,102 ERROR [org.xdi.oxd.server.SocketProcessor] Quit. Enable to process command. 2017-10-28 02:37:01,816 TRACE [org.xdi.oxd.server.license.LicenseService] Validating license ... 2017-10-28 02:37:01,817 DEBUG [org.xdi.oxd.server.license.LicenseFile] License file location: /.oxd-license 2017-10-28 02:37:01,817 TRACE [org.xdi.oxd.server.license.LicenseFile] MAC ADDRESS set to : 06-AC-CC-74-DA-14 2017-10-28 02:37:01,818 TRACE [org.xdi.oxd.server.service.HttpService] Created TRUST_ALL client. 2017-10-28 02:37:02,281 TRACE [org.xdi.oxd.server.license.LicenseService] License is validated successfully. 2017-10-28 02:37:02,285 TRACE [org.xdi.oxd.server.license.LicenseService] License data: LicenseMetadata{creationDate=Sun Oct 22 06:04:34 UTC 2017, licenseId=null, autoupdate=true, active=true, product=oxd, licenseName='BMW CCA Puget Sound Region', expirationDate=Mon Oct 22 06:04:34 UTC 2018, licenseCountLimit=9999, customerName=BMW CCA Puget Sound Region, emails=[]}

By Mohib Zico Account Admin 28 Oct 2017 at 2:29 a.m. CDT

Mohib Zico gravatar
Hi Evan, I'll check NextCloud oxD locally and get back to you with result.

By Jajati Badu Account Admin 30 Oct 2017 at 11:49 a.m. CDT

Jajati Badu gravatar
Hi Evan, The log saying invalid_redirect_ur . Your client application url has to be https . Like https://files.bmwpugetsound.com/ Thanks, Jajati

By Evan Kohout user 30 Oct 2017 at 1:09 p.m. CDT

Evan Kohout gravatar
Yep that was it. I just installed a fresh cert from certbot and restarted apache and gluu-oxd-server services and then attempted to register the client again and it registered just fine. Oh and btw, this plugin works with Nextcloud 12 too, you just have to tweak some of the files. Thanks again!