diff --git a/.changeset/fluffy-sloths-deliver.md b/.changeset/fluffy-sloths-deliver.md new file mode 100644 index 0000000000..ba4e6e4fe5 --- /dev/null +++ b/.changeset/fluffy-sloths-deliver.md @@ -0,0 +1,10 @@ +--- +'@backstage/plugin-kubernetes': patch +'@backstage/plugin-kubernetes-backend': patch +'@backstage/plugin-kubernetes-common': patch +--- + +Add support for 'oidc' as authProvider for kubernetes authentication +and adds optional 'oidcTokenProvider' config value. This will allow +users to authenticate to kubernetes cluster using id tokens obtained +from the configured auth provider in their backstage instance. diff --git a/docs/features/kubernetes/configuration.md b/docs/features/kubernetes/configuration.md index 5b60316fd0..3b8fef453a 100644 --- a/docs/features/kubernetes/configuration.md +++ b/docs/features/kubernetes/configuration.md @@ -92,6 +92,8 @@ cluster. Valid values are: | `aws` | This will use AWS credentials to access resources in EKS clusters | | `googleServiceAccount` | This will use the Google Cloud service account credentials to access resources in clusters | | `azure` | This will use [Azure Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) to access resources in clusters | +| `oidc` | This will use [Oidc Tokens](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) to authenticate to the Kubernetes API. When this is used the `oidcTokenProvider` | +| field should also be set. | ##### `clusters.\*.skipTLSVerify` @@ -115,6 +117,33 @@ kubectl -n get secret $(kubectl -n get sa ; // (undocumented) @@ -242,7 +244,12 @@ export const kubernetesApiRef: ApiRef; // // @public (undocumented) export class KubernetesAuthProviders implements KubernetesAuthProvidersApi { - constructor(options: { googleAuthApi: OAuthApi }); + constructor(options: { + googleAuthApi: OAuthApi; + oidcProviders?: { + [key: string]: OpenIdConnectApi; + }; + }); // (undocumented) decorateRequestBodyForAuth( authProvider: string,