paralus / dashboard

Dashboard used with Paralus zero-trust solution to manage importing clusters, users, groups, roles and role association to multiple kubernetes clusters.
https://www.paralus.io/
Apache License 2.0
14 stars 13 forks source link

ForceReset Password Fail due to malformed URL #293

Open mricartx opened 2 months ago

mricartx commented 2 months ago

Expected vs actual behavior

After first installation , you should reset your administrator password , but it fails because of a malformed URL requesting config.js. Also the browser detect some errors in config.js. Finally password change could not be performed , due to a timeout.

Steps to reproduce the bug

  1. Run a clean install using Helm Chart
  2. Once you recovered Admin credentials, access to console URL and login .
  3. You will be prompted to change your admin password but when you press "Set password" button Nothing happens .

Are you using the latest version of the project?

Using Helm ztka-0.2.9 chart version v0.2.8 with Dashboard image v0.2.3 .

You can check your version by running helm ls|grep '^<deployment-name>' or using pctl, pctl version, and provide the output. In the browser we can check that the UI is trying to get this URL that doesn't exist : https://console.your.domain.com/%PUBLIC_URL%/config.js

-

What is your environment setup? Please tell us your cloud provider, operating system, and include the output of kubectl version --output=yaml and helm version. Any other information that you have, eg. logs and custom values, is highly appreciated!

K8S 1.25.8

(optional) If you have ideas on why the bug happens or how it can be solved, please provide it here

In the browser we can check that the UI is trying to get this URL that doesn't exist : https://console.your.domain.com/%PUBLIC_URL%/config.js Check public\index.template file line 41 . Browser also complains about config.js syntax.

Guberlo commented 2 weeks ago

I've just tried to deploy Paralus using the helm chart and occurred to the same problem as you.

Any updates on that?

mricartx commented 2 weeks ago

Hi @Guberlo , I've downloaded the Helmlcharts file locally and then I've modified the dashboard deployment template. https://github.com/paralus/helm-charts/tree/main/charts/ztka/templates/deployment-dashboard.yaml Added this before line 40 (ports): command: ['sh', '-c', 'sed -i "s/%PUBLIC_URL%//g" ./usr/share/nginx/html/index.html ; nginx -g "daemon off;" ']

Also you can make Postgres database reachable outside K8S creating a NodePort Service . With your prefered database viewer , you can modify public.identities table and edit Admin user by changing metadata_public JSON value with "ForceReset": false. Once saved , you won't be prompted to reset Admin password at next login .