Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosting mSupply server and mSupply Grafana server on different computer is not compatible. #180

Open
ujwalSussol opened this issue Mar 30, 2021 · 2 comments
Assignees

Comments

@ujwalSussol
Copy link

Hosting mSupply server and mSupply Grafana server on different computer is not compatible.

For testing purpose I thought it would be great to have a Grafana server on on windows PC with our MAC pushing data and serving as User Authenticator as designed.

Now @craigdrown mentioned that mSupply dashboard can be used anywhere away from the mSupply server... Thought it would be great to an independent mSupply dashboard that is always available for developers to test.

But the problem : The integration of mSupply server and mSupply dashboard that is hosted on two different machine is a bit broken. I can't exactly explain the problem. It needs to be tried.

Expected Behavior

Should work when hosted on two different machine.

Current Behavior

Interaction between user authentication and grafana is broken. @raviSussol has found out that the mSupply app directs to the wrong server after login or log out.

We test the two servers without SSL.

Possible Solution

Good to fix it. It is not urgent. One day we may host the two services on different machine.

Steps to Reproduce (bugs only, delete if not applicable)

  1. Install mSupply dashbaord in a machine.
  2. Install mSupply Server in another machine.
  3. edit the config file for Grafana to communicate with the mSupply server un-securely... do not use SSL
  4. Grafana can also server without SSL on port 3000
  5. Error : After login and loging out in Grafana , you are directed to the wrong page as mSupply points to the wrong machine ... it seems.
@ujwalSussol
Copy link
Author

@mark-prins : No hurry on this. So far bot the servers are hosted on the one machine... but who knows sometime we may want the two hosted on different machine.

@craigdrown
Copy link
Collaborator

@ujwalSussol @raviSussol - I think you could look at Oauth on mSupply- it should maybe be passed a redirect URL (maybe the code doesn't include the whole URL, and mSupply prepends it's own domain to what has been passed?
Line 51 of routesApiV4Oauth() looks right to me- maybe Grafana isn't sending the redirect parameter correctly in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants