这是indexloc提供的服务,不要输入任何密码
Skip to content

json array session variables in auth hook give parse error #10107

@mostafashr

Description

@mostafashr

Version Information

Server Version: v2.36.1
CLI Version (for CLI related issue):

Environment

OSS

What is the current behaviour?

in our system we use auth hook to authenticate and authorize users the auth hook give a response like so:

{
"X-Hasura-role":"user",
"X-Hasura-User-Id":"d6630142-d77c-4241-b5c3-ff28374114d0",
"X-Hasura-Allowed-Ids":[
"test1",
"test2"
]
}

which means user has access to test1 and test2 group

What is the expected behaviour?

when i do this hasura give this error
"event":{"detail":"Invalid response from authorization hook: Error in $['X-Hasura-Allowed-Ids']: parsing Text failed, expected String, but encountered Array","type":"conn_err"},"user_vars":null}

if i switch from list to {"test1","test2"} notation it will solve the issue but it is not a supported type in any language. i see a merge request 2475 and 1799 which state it is fixed and merged but it is not working correctly for me. is there any solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions