You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hello. I tried the latest version of oathkeeper today and our rules stopped working. After some time I found out that rules are mangled during import (credentials_issuer.config becomes base64 encoded and proxy can't decode it back).
Additional context
I believe that the problem happens because in /cmd/rules_import.gomodels.RawMessage is used Because models.RawMessage is basically []uint8 it is converted to base64 when encoded as json as per documentation
Array and slice values encode as JSON arrays, except that []byte encodes as a base64-encoded string, and a nil slice encodes as the null JSON value.
It seems that commit 38c52a3 introduced the problem because it replaced json.RawMessage with models.RawMessage. When I replaced it back the problem was gone.
If needed I can create a pr to fix this.
The text was updated successfully, but these errors were encountered:
Thank you, yeah this is indeed caused by the newly generated SDK. Unfortunately, changing the code there won't work as it will be broken with the next release. There is an issue for this here so maybe adding
// type: string
// format: binary
here and running make sdk can fix that. Would you be open to give that a try?
Describe the bug
Hello. I tried the latest version of oathkeeper today and our rules stopped working. After some time I found out that rules are mangled during import (credentials_issuer.config becomes base64 encoded and proxy can't decode it back).
To Reproduce
rules.json
Oathkeeper api is started with these env vars:
Oathkeeper proxy is started with these env vars:
First I import the rules
oathkeeper rules import --endpoint=http://localhost:4456/ ./rules.json
. But when I list themcurl localhost:4456/rules
I get:When I make a request
curl localhost:3000
an error is returned:Expected behavior
I expect
curl localhost:4456/rules
to returnVersion:
Additional context
I believe that the problem happens because in
/cmd/rules_import.go
models.RawMessage
is used Becausemodels.RawMessage
is basically[]uint8
it is converted to base64 when encoded as json as per documentationIt seems that commit 38c52a3 introduced the problem because it replaced
json.RawMessage
withmodels.RawMessage
. When I replaced it back the problem was gone.If needed I can create a pr to fix this.
The text was updated successfully, but these errors were encountered: