Is there any way to control access to keto itself ...
# talk-keto
c
Is there any way to control access to keto itself -- we're looking to implement the RBAC model and use Oathkeeper to secure the write API with a small app to allow permissions to be managed. We want to allow certain users to update relation tuples only for certain objects. Am I correct that we'll need to write some sort of shim application to do this?
The initial plan was to have a pure frontend client/js app to manage the permissions that would call the Keto write API directly and Oathkeeper sitting between would control access but I don't think we can do this?
s
You could probably check that using Keto itself, although you would have to ensure only certain things can be updated... an error could quickly lead to privilege escalation not sure if you can configure oathkeeper to do all of that
maybe something along the lines of
Copy code
authorizer: {
        handler: 'remote_json',
        config: {
          remote: '<https://keto.local/relation-tuples/check>',
          payload: |||
            {
              "subject_id": "{{ print .Subject }}",
              "relation": "{{ print .Header.Relation }}",
              "namespace": "whatever-constant",
              "object": "{{ printIndex .MatchContext.RegexpCaptureGroups 2 }}"
            }
          |||,
        },
      },
might work, but depends on your use-case you would have to have all parameters in the header or path
c
Ooh that's neat, I hadn't thought about piping the result of a keto check back into Oathkeeper