canonical / bundle-kubeflow

Charmed Kubeflow
Apache License 2.0
97 stars 48 forks source link

Replace Dex with Canonical Identity Platform #798

Open ca-scribner opened 5 months ago

ca-scribner commented 5 months ago

Context

This is a tracking issue for replacing Dex in the Charmed Kubeflow bundle with the Canonical Identity Platform. The goal of this effort is to no longer provide an authentication integration solution in Charmed Kubeflow itself, but instead to rely on a general solution provided by the Canonical Identity team.

What needs to get done

  1. spec our current authentication flow, so we have a source of truth internally and a document to speak around when talking with the identity team
  2. deploy the identity bundle to gain experience with it
  3. do an MVP implementation to identify any challenges (general consensus is that a solution is feasible, but nobody has a complete understanding so we need to actually try to implement something)
  4. design how the Kubeflow and Identity ingresses should be laid out (ex: should Kubeflow ingress provide a route to Identity? Should Identity have its own ingress?).
  5. confirm that any existing customer solutions will be supportable with the Canonical Identity Platform (eg: does the Identity Platform support the external identity provider they use, and is there a viable migration path for upgrade)
  6. spec the user experience for both enterprise deployments (deployments for multiple users, served on a company DNS, etc) and single-user deployments (deployed on a laptop, no public certs, etc)
  7. design the migration path for existing single and enterprise users
  8. design how Charmed Kubeflow integration tests should look if we use the Identity Platform solution

Definition of Done

  1. Charmed Kubeflow uses the Canonical Identity Platform for integrating with authentication providers
syncronize-issues-to-jira[bot] commented 5 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5228.

This message was autogenerated

ca-scribner commented 5 months ago

Notes from an initial meeting between Kubeflow and Identity teams:

Details of replacing Dex with Identity Platform

Integration Testing

Migration/Upgrade

Replacing oidc-authservice with something from Identity team

Logistics/Planning

Actions

kimwnasptd commented 5 months ago

Thanks for the summary!

IMO the main pain point we have right now is that the AuthService is unmaintained. So unless we would have a solution that would replace AuthService as well, I don't see much value in just replacing Dex. There's not burning need or issues with Dex right now from our side.

Then some concerns I had from the above:

  1. https from browser: This will create a very bad UX for users that just spin out KF to play around locally
  2. in-cluster tls: This cycle we are going full on with more Istio support, which also includes mTLS between the pods in the Istio mesh. Then there's going to be the mesh team that will also take a stab at the mTLS problem. I feel it's too soon to commit, since the moving pieces we need (Istio down the road from another team) might clash with decisions currently in the Identity Charms
  3. Ingress story: Another pain point, as we'd either
    1. have to put work on Istio IngressGateway charm to be closer to what the rest ingress charms are doing, so that we can switch Traefik with it
    2. Put Traefik in front, and remove authservice/dex, and all authnz logic is plugged in Traefik. Which then redirects the logged in traffic to Istio IngressGateway

So from our side, in my mind, the requirements to integrate with Identity team's charms are:

  1. Have the option to have http to the Traefik Ingress, when used with Identity team's charms
    • And be able to have static users
  2. Fully replace our current Istio->AuthService/Dex flow Traefik and Identity team's charms
  3. Expose Traefik in-front of Istio IngressGateway, and be able to send all traffic to Istio (IMO it's not worth it for us to invest on changing the Istio IngressGateway charm)

cc @ca-scribner @DnPlas @shipperizer

shipperizer commented 5 months ago

@kimwnasptd

  1. I think we can kinda fix that by either having a good local ACME setup for certificates or we could add some machinery to accept self signed certificates and create a local DNS record in the /etc/hosts file other solution would be to have it all in dev mode, IDP included (as pointed out by @nsklikas and Massi) but this makes me wonder if that is the use case we want to cater for I do think that for some stuff our solution is overkill (local development) but for other it should be the go-to one (production)

  2. Using a publicly trusted certificate provider would bypass the problem but as said, this is true in production deployments I guess, locally it won't unless someone is happy to depart with 10$ a year minimum for their own domain

  3. Networking wise, I don't see a major problem in getting it working as long as the requirements we have for istio deployment (ability to spin up a load balancer, DNS management and domain ownership) can be extended to traefik

anyway, happy to have another chat if needed