kyma-project / infrastructure-manager

Apache License 2.0
0 stars 10 forks source link

Handle `shoot-oidc-service` extension when provisioning kyma [KIM/feature] #381

Open kwiatekus opened 7 months ago

kwiatekus commented 7 months ago

Description

Provisioner should always enable shoot-oidc-service feature flag when provisioning kyma runtime When additional OIDC issuer is requested, provisioner should create this OIDC resource in the provisioned shoot cluster https://community.sap.com/t5/additional-blogs-by-sap/using-github-actions-openid-connect-in-kubernetes/ba-p/13542513 and configure cluster admin role binding for the subject of the token issued by the additional issuer.

AC

Reasons

It is required for the https://github.com/kyma-project/kyma/issues/18305

Attachments https://github.com/kyma-project/kyma/issues/18519#issuecomment-1918966750 https://github.com/kyma-project/control-plane/tree/main/components/provisioner

Sample resource:

apiVersion: authentication.gardener.cloud/v1alpha1
kind: OpenIDConnect
metadata:
  name: actions-oidc
spec:
  issuerURL: https://token.actions.githubusercontent.com
  clientID: my-kubernetes-cluster
  usernameClaim: sub
  usernamePrefix: "actions-oidc:"
  requiredClaims:
    repository: myOrg/myRepo
    workflow: deploy-kubernetes
    ref: refs/heads/main
tobiscr commented 7 months ago

PR from @kyma-project/otters for provisioner: https://github.com/kyma-project/control-plane/pull/3358

Docs from Gardener: https://github.com/gardener/gardener-extension-shoot-oidc-service/blob/master/docs/usage/openidconnects.md

tobiscr commented 6 months ago

We have it on our TODO list, but right now - based on the current ranked backlog it will be considered as part of our deliverables in Q2/24.

tobiscr commented 3 months ago

We agreed on following implementation on KIM side:

See also https://github.com/kyma-project/kyma/issues/18305#issuecomment-2128866460

tobiscr commented 2 months ago

First implementation is ready for OIDC extender: https://github.com/kyma-project/infrastructure-manager/blob/main/internal/gardener/shoot/extender/oidc.go

tobiscr commented 1 week ago

To unblock customers who are waiting for the enablement of the OIDC extension in GArdener, we updated the Provisioner last week to activate this extension per default for all new created clusters. So, any new created SKR cluster will have the OIDC extension now enabled and customers can configure their own OIDC provider by creating the corresponding CR in their SKR clusters.

It is planned to start the replacement of the Provisioner with KIM (Kyma Infrasturcture Manager) by end of this month. KIM will also per default enable the OIDC extension for all managed clusters.

Disper commented 3 days ago

Technical workplan