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

[kratos-keto-oathkeeper-k8s] test-oauthkeeper can not start #64

Open
4 of 6 tasks
boskiv opened this issue Jan 9, 2023 · 1 comment
Open
4 of 6 tasks

[kratos-keto-oathkeeper-k8s] test-oauthkeeper can not start #64

boskiv opened this issue Jan 9, 2023 · 1 comment
Labels
bug Something is not working.

Comments

@boskiv
Copy link

boskiv commented Jan 9, 2023

Preflight checklist

Describe the bug

test-oauthkeeper does not start in examples/kratos-keto-oathkeeper-k8s

Just the following README.md with no extra change.

Reproducing the bug

Follow README.md with minikube

Relevant log output

{"audience":"application","level":"fatal","msg":"The services failed to start because the configuration is invalid. Check the output above for more details.","service_name":"oathkeeper","service_version":"","time":"2023-01-09T09:36:10Z"}
{"audience":"application","level":"info","msg":"Config file loaded successfully.","path":"/etc/config/config.yaml","service_name":"oathkeeper","service_version":"","time":"2023-01-09T09:38:51Z"}
{"audience":"application","config_file":"/etc/config/config.yaml","level":"error","msg":"The provided configuration is invalid and could not be loaded. Check the output below to understand why.","service_name":"oathkeeper","service_version":"","time":"2023-01-09T09:38:51Z"}

authorizers.remote_json: map[config:map[forward_response_headers_to_upstream:<nil> payload:{
  "subject": "{{ print .Subject }}",
  "resource": "{{ printIndex .MatchContext.RegexpCaptureGroups 0 }}"
}
 remote:http://keto-api:4456/check retry:map[give_up_after:1s max_delay:100ms]] enabled:true]
                         ^-- oneOf failed

authorizers.remote_json.config: map[forward_response_headers_to_upstream:<nil> payload:{
  "subject": "{{ print .Subject }}",
  "resource": "{{ printIndex .MatchContext.RegexpCaptureGroups 0 }}"
}
 remote:http://keto-api:4456/check retry:map[give_up_after:1s max_delay:100ms]]
                                ^-- doesn't validate with "#/definitions/configAuthorizersRemoteJSON"

authorizers.remote_json.config.forward_response_headers_to_upstream: <nil>
                                                                     ^-- expected array, but got null

authorizers.remote_json.enabled: true
                                 ^-- value must be false

{"audience":"application","level":"fatal","msg":"The services failed to start because the configuration is invalid. Check the output above for more details.","service_name":"oathkeeper","service_version":"","time":"2023-01-09T09:38:51Z"}

Relevant configuration

No response

Version

master

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Kubernetes

Additional Context

No response

@boskiv boskiv added the bug Something is not working. label Jan 9, 2023
@bartekus
Copy link

bartekus commented Sep 7, 2023

Please ensure that your oath keeper/config/config.yaml looks like this:

authorizers:
  allow:
    enabled: true
  remote_json:
    enabled: true
    config:
      remote: http://keto-api:4456/check
      forward_response_headers_to_upstream: []
      payload: |
        {
          "subject": "{{ print .Subject }}",
          "resource": "{{ printIndex .MatchContext.RegexpCaptureGroups 0 }}"
        }

Notice forward_response_headers_to_upstream: [] which you are missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

2 participants