Hey. I am trying to replace Pomerium with Oathkeep...
# talk-oathkeeper
w
Hey. I am trying to replace Pomerium with Oathkeeper+Kratos+what-have-you to allow different sets of users to different endpoints, kind of like a glorified oauth-proxy. Now, since the kratos users should not all be allowed to the different subdomains, I assume I need a oathkeeper authorizer that looks at the host and the mail, preferably that can be setup programmatically from within Kubernetes. I will post my current manifest with pomerium in a thread
Copy code
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
  name: adguard
  annotations:
    <http://nginx.ingress.kubernetes.io/auth-url|nginx.ingress.kubernetes.io/auth-url>: "<https://fwd.example.com/verify?uri=$scheme://$host$request_uri>"
    <http://nginx.ingress.kubernetes.io/auth-signin|nginx.ingress.kubernetes.io/auth-signin>: "<https://fwd.example.com?uri=$scheme://$host$request_uri>"
    <http://ingress.pomerium.io/policy|ingress.pomerium.io/policy>: |
      - allow:
          or:
            - email:
                is: <mailto:example@gmail.com|example@gmail.com>
spec:
  rules:
    - host: "<http://adguard.example.com|adguard.example.com>"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: adguard-home
                port:
                  number: 80
Am I right in my assumption that this usecase is not possible right now with the ORY stack alone? Proxying different subdomains allowing different sets of users.
Made a discussion for this: https://github.com/ory/oathkeeper/discussions/1075 TL;DR: replacing Pomerium (oauth-proxy) with the ORY stack
l
I’m working on a project which will do something similar. You’ll likely need to use Ory Keto with remote_json authorizer in oathkeeper pointing to Keto. Then Keto will be used to decide if a user can login.
You might also be able to use extra traits in Keto for this if the setup you have is relatively simple.
But to make it all manageable you’ll need to build a custom backend and frontend for the entire stack (which is what I’m working on).
w
I would just like to use kubernetes annotations 😄
l
You’re going to need to build some form of frontend (and likely an accompanying backend) for Kratos anyway to be able to use it for login
w
I am using https://github.com/ory/kratos-selfservice-ui-node. Works well enough…