From 447e060872b6e5302ffa1babe5cc9ec9e55aaee7 Mon Sep 17 00:00:00 2001 From: Daniel Bravo Date: Wed, 4 May 2022 11:29:25 -0500 Subject: [PATCH] Add changeset and docs for kubernetes oidcTokenProvider feature Signed-off-by: Daniel Bravo --- .changeset/fluffy-sloths-deliver.md | 10 ++++++++ docs/features/kubernetes/configuration.md | 29 +++++++++++++++++++++++ plugins/kubernetes-backend/api-report.md | 1 + plugins/kubernetes-common/api-report.md | 6 ++++- plugins/kubernetes/api-report.md | 9 ++++++- 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .changeset/fluffy-sloths-deliver.md 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,