giantswarm / roadmap

Giant Swarm Product Roadmap
https://github.com/orgs/giantswarm/projects/273
Apache License 2.0
3 stars 0 forks source link

Add support for workload cluster OIDC auth via `kubectl gs` #489

Closed snizhana-dynnyk closed 2 years ago

snizhana-dynnyk commented 3 years ago

Towards Migration to Management API

User stories

Description

The kubectl gs login command already supports OIDC authentication for the Kubernetes API of a management cluster (a.k.a Management API). This story here is about allowing roughly the same for a workload cluster.

Questions


TODO

marians commented 3 years ago

Added some details to the main comment

marians commented 3 years ago

One problem to solve: the client has to trust the workload cluster CA certificate. For the management cluster we have athena delivering the CA certificate, so that it can then be added to the server entry in the kubectl config.

TobiasLierzer commented 2 years ago

I've requested this as a convenience feature for the everyday work. So with regards to the second question, I would not see the requirement to create automation configs / configs for another person through this process.

ghost commented 2 years ago

Assumption:

  1. WC is already prepared and Dex and ingress controller is running

As an Admin with MC access, I want to quickly login to a WC.

  1. That is to make kubectl gs login work with WC with a minimal set of OIDC flags
  2. WC trusts the certificate from the MC (using the fetch client certificate mechanism) - we create secret from the cert-config.

As an Admin, I want to provide access to a WC

  1. The command is handed to a user so as to use the OIDC provider to login into the WC
  2. In here, the dex host (domain name) could be configurable to over-ride the default by using flags

Additional feature Get the command to use, (e.g cli guide) from happa (can be in an access tab or cluster section)

pipo02mix commented 2 years ago

We have another customer in Openstack implementation that wants to use kubectl gs to make easier the access to the cluster

anvddriesch commented 2 years ago

Current state: Install dex-app in WC and use k8s-authenticator which allows OIDC by copying generated commands. Cumbersome.

Goal: Support logging into WC using dex via kubectl-gs login. Support existing flags of kubectl gs login

Non-goals Making dex default on all WCs Creating self contained kubeconfigs to hand out to third parties (SSO should be used for a specific user)

Notes from refinement We have this for MCs, where we run athena which exposes the CA. Where should this come from in the WC?

pipo02mix commented 2 years ago

My 2 cents

Does it make sense to support this for legacy? Either way, focus should be CAPI

I would not invest time in legacy, by now only customer wants it is in CAPI

marians commented 2 years ago

Open questions / tasks from refinement

pipo02mix commented 2 years ago

How does the user installing/configuring the app provide the CA certificate?

In legacy cluster operator set the CA in cluster values configmap, in CAPI cluster apps operator does it.

anvddriesch commented 2 years ago

Created issues from the remaining points but will close this since it's done.