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

Remote schema, forward headers issue #6847

Open
sdahlbac opened this issue Apr 29, 2021 · 5 comments
Open

Remote schema, forward headers issue #6847

sdahlbac opened this issue Apr 29, 2021 · 5 comments
Labels
c/remote-schemas Issues related to Remote Schemas k/bug Something isn't working support/needs-triage Needs to be triaged so that we have enough information to add this to our backlog

Comments

@sdahlbac
Copy link

Hasura 2.0.0-alpha.9

If I select Forward all headers from client when setting up remote schema

then if I try to run any query in the console the end result is

{
  "errors": [
    {
      "extensions": {
        "path": "$",
        "code": "remote-schema-error"
      },
      "message": "Failed reading: not a valid json value"
    }
  ]
}

and no requests goes through to the remote.

@sdahlbac sdahlbac changed the title Remote schema Remote schema, forward headers issue Apr 29, 2021
@makarovivan
Copy link

I have similar issue:

{
  "errors": [
    {
      "extensions": {
        "path": "$",
        "code": "remote-schema-error"
      },
      "message": "not enough input"
    }
  ]
}

It also connected to Forward all headers form client flag

It worked as designed before, but now I get this exception.. reinit of remote schema does not help.

2.0.0-alpha.9
2.0.0-alpha.10

@martin-hasura
Copy link
Contributor

Would you be able to construct a small repro of the issue so we can take a look at debugging what the cause of your problem is?

@sdahlbac
Copy link
Author

sdahlbac commented May 4, 2021

@martin-hasura How would I go about doing that? (Basically, I don't know what to do/where to start)

@makarovivan
Copy link

makarovivan commented May 4, 2021

In my case I figured out

  1. I have Hasura behind Kong API GW.
  2. I added 3 remote schemas
  3. I have Keycloak for OpenID / OAuth

It occurs when I add Auth plugin in Kong to secure Hasura.
So there seems 2 different JWT Tokens in headers, and it leads to such exception.

When I disabled security to Hasura it worked.

But anyway - error message is not helpful. And debug level logs are also empty

@martin-hasura can you advise best practice in my case, if I want to secure Hasura?

@martin-hasura martin-hasura added support/needs-triage Needs to be triaged so that we have enough information to add this to our backlog and removed s/has-breaking-changes labels May 4, 2021
@coco98 coco98 added k/bug Something isn't working and removed a/data/remote-schemas labels Oct 7, 2021
@coco98
Copy link
Contributor

coco98 commented Oct 7, 2021

Labeling this as a bug so that we can improve logging to capture these scenarios better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/remote-schemas Issues related to Remote Schemas k/bug Something isn't working support/needs-triage Needs to be triaged so that we have enough information to add this to our backlog
Projects
None yet
Development

No branches or pull requests

4 participants