how can i link keto and kratos ? I want to assign ...
# talk-keto
j
how can i link keto and kratos ? I want to assign roles to the users registered through kratos so that i can get it's ID and i can assign roles
a
You can do that with Oathkeeper Here's a sample oathkeeper rule that: 1. authenticates with kratos 2. authorizes with keto
Copy code
authenticators:
  - handler: cookie_session
    config:
      check_session_url: <http://kratos-public.admin/sessions/whoami>
authorizer:
  config:
    remote: <http://keto-read.admin/relation-tuples/check>
    payload: |
      {
        "namespace": "jaeger",
        "object": "myorg",
        "relation": "admin",
        "subject_id": "{{ print .Subject }}"
      }
  handler: remote_json
errors:
  - handler: redirect
match:
  methods:
    - GET
    - POST
    - PUT
    - DELETE
    - PATCH
  url: <https://example.com><.*>
mutators:
  - handler: noop
upstream:
  preserveHost: true
  url: <http://jaeger-query.jaeger>