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

How to integrate the panel with remote server? #100

Open
rezadehganpour opened this issue Jan 1, 2016 · 10 comments
Open

How to integrate the panel with remote server? #100

rezadehganpour opened this issue Jan 1, 2016 · 10 comments

Comments

@rezadehganpour
Copy link

Is there a way that i can integrate panel with my server that is running on an ec2 server (RHEL)

@dgobaud
Copy link

dgobaud commented May 12, 2016

Yes would like to know this also! How does it work/will it work on a remote server?

@modosc
Copy link
Collaborator

modosc commented May 16, 2016

to the best of my knowledge it should work fine - what issues are you running into?

@dgobaud
Copy link

dgobaud commented May 16, 2016

Just don't see any data which makes sense. How is data sent to the rails panel?

@modosc
Copy link
Collaborator

modosc commented May 16, 2016

the meta_request gem stores traces locally keyed off of the request-id (see here).

when the rails_panel chrome extension sees a x-meta-request-version header in a response it constructs a request to the server to fetch the generated instrumentation (see here) and then renders it.

i don't see any reason this wouldn't work remotely unless your rails setup is behind some sort of complicated proxy/cache setup.

@dgobaud
Copy link

dgobaud commented May 16, 2016

I see - so I'm thinking two issues with this:

  1. No security - how to prevent third-parties from getting this data?
  2. What about multiple servers behind a load balancer?

@modosc
Copy link
Collaborator

modosc commented May 16, 2016

  1. You are correct, by default there's no access-control at all. an attacker would have to guess a uuid to find a valid trace so at least there's some security by obscurity. we should probably be more explicit about this (and the performance cost which is more of an issue imho) in the docs. at the very least we could print out warnings in the console when not in :development. rack-mini-profiler does a reasonable job of providing docs and api for these issues.
  2. Multiple servers won't really work correctly unless you either have some sort of connection pinning / sticky session configured or change the backend to write to a shared location (for reference, rack-mini-profiler supports redis and memcache which would solve this problem).

@dgobaud
Copy link

dgobaud commented May 16, 2016

  1. But the attacker can see the UUID on any request they make right? And then get info for that request?
  2. got it

@dgobaud
Copy link

dgobaud commented May 16, 2016

it would be great to be able to add ?rails-panel=PASSWORD param to any request and if it matches then it is turned on and you can get the data

@modosc
Copy link
Collaborator

modosc commented May 16, 2016

i see, an attacker could set that. i think the solution there is to support something like rack-mini-profiler's Rack::MiniProfiler.authorize_request

i'm going to update the docs and add a warning in the console as a first step.

@Nowaker
Copy link

Nowaker commented Nov 13, 2021

@modosc @dejan Any instructions on how to make it secure? Or ideally, a config option for password/token that the Chrome extension is required to pass to obtain the data?

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

4 participants