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

GQL queries origin #2934

Open
joshua-seals opened this issue Sep 25, 2024 · 4 comments
Open

GQL queries origin #2934

joshua-seals opened this issue Sep 25, 2024 · 4 comments

Comments

@joshua-seals
Copy link

Hello, first thanks in advance for the help and also really enjoying learning about cloudbeaver. Very excited to replace pgadmin with it!

Are the GQL queries server-side or basically being issued from the browser? My setup is in K8S and ideally gql would always query 0.0.0.0/api/ but it seems to pickup the hostname of the external connection string despite server.serverHost: "0.0.0.0" setting.

@joshua-seals joshua-seals added question Further information is requested wait for review labels Sep 25, 2024
@LonwoLonwo
Copy link
Member

Hello @joshua-seals

Thanks for your interest in CloudBeaver!

Please clarify your question one more time. And add more examples. Or, maybe a video or screens.
Your browser sends GQL queries, and the server works with them.

@joshua-seals
Copy link
Author

Ok that seems to be the answer to my question, from browser to gql endpoint.

I have a reverseProxy setup which uses a /private scheme in resty. So a user would deploy an app (cloudbeaver in this case), then that user and their session gets matched up to the newly provisioned pod/app in k8s and ambassador authorizes the request, sets headers for the service and maps the user to the new deployment.

Basically the gql queries are causing error as they are attempting to hit the endpoint /private/user/rand-string/ endpoint which get's blocked by nginx. I also see all the websocket trafic being blocked so just needed some clarity

@LonwoLonwo
Copy link
Member

Sorry for the late response.

Basically the gql queries are causing error

Could you please provide some steps for reproduction?

I also see all the websocket trafic being blocked so just needed some clarity

How exactly is it blocked?

Also, for now, we think that your Nginx can be configured incorrectly.

@mr-anton-t
Copy link
Member

@joshua-seals, please check your NGINX configuration and check the response code for the next request:

  curl  -i -N -k \
  --http1.1 \
  'https://****server_address***/api/ws' \
  -H 'Upgrade: websocket' \
  -H 'Origin: https://****server_address***' \
  -H 'Cookie: cb-session-id=ehl2n**example**f1rl1bk15' \
  -H 'Connection: close' \
  -H 'Sec-WebSocket-Key: 0VpP**********vb4w==' \
  -H 'Sec-WebSocket-Version: 13' \
  -H 'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits' 

(*) When making a request, please specify the correct Cookie, Sec-WebSocket-Key, and Server address

The following server response code should be returned - 101 Switching Protocols

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

No branches or pull requests

3 participants