When I navigate to our OnDemand site from a whitelisted IP, I get a 500 error. Maintenance mode is working–when I view the page from a non-whitelisted IP I see the maintenance message.
After changing the ood_portal.yml, I’ve run update_ood_portal, restarted httpd, ondemand-dex, and removed and recreated the maintenance.enable file.
relevant bits of ood_portal.yml (MY_IP_ADDRESS is replaced with my actual IP):
oidc_util_decode_json_object: JSON parsing returned an error: '[' or '{' expected near '<' (<!DOCTYPE html>\n<html lang="en">\n <head>\n <title>Borah OnDemand Maintenance</title>\n </head>\n\n <body>\n <h1>Borah OnDemand is currently offline for maintenance</h1>\n Access will be restored by the end of today (Monday July, 15th)\n </body>\n</html>\n)
oidc_metadata_provider_retrieve: JSON parsing of retrieved Discovery document failed
I’ve also tried changing maintenance.html to remove all non-alphanumeric characters–same issue.
I think as a workaround you can use dex_uri: false in ood_portal.yml. This way we don’t route through apache (which is giving you the issues) for OIDC calls.
We get a new error, which might be due to our firewall: oidc_util_http_call: curl_easy_perform() failed on: https://borah-ondemand.boisestate.edu:5554/.well-known/openid-configuration (Failed to connect to borah-ondemand.boisestate.edu port 5554: Connection refused)
Does port 5554 need to be open to the connecting clients? We’ve added the port in firewalld.
It does. The issue is that either we proxy behind apache (port 443) but there’s currently a bug in that as you’re finding. If we don’t proxy, then we send requests directly to that port 5554.