# Connect to running gooddata-cn-ce container docker exec -it gdcn-ce-container-id bash # Install necessary tools root@gdcn-ce-container-id:/opt# apt-get -y install sqlite3 # Connect to internal Dex database root@gdcn-ce-container-id:/opt# sqlite3 /data/dex.db # Set sql parameter to external hostname sqlite> .parameter set @hostname 'gooddata.example.com' # Show the current value (both hostnames in redirect_uris should match the @hostname parameter) sqlite> SELECT id, redirect_uris from client; c289a52a-aa2c-4cf1-a970-2a4faff518d3|["http://gooddata.example.com/login/oauth2/code/gooddata.example.com"] # Fix the value. The cast(... to blob) is important sqlite> update client set redirect_uris = cast(json_replace(redirect_uris, '$[0]', 'https://'||@hostname||'/login/oauth2/code/'||@hostname) as blob) where json_extract(redirect_uris, '$[0]') == 'http://'||@hostname||'/login/oauth2/code/'||@hostname; # Check the fixed URL schema (https:// instead of http://) sqlite> SELECT id, redirect_uris from client; c289a52a-aa2c-4cf1-a970-2a4faff518d3|["https://gooddata.example.com/login/oauth2/code/gooddata.example.com"] # Leave the DB shell sqlite> .quit # Leave the container root@gdcn-ce-container-id:/opt# exit