@backstage/plugin-kubernetes-node 0.2.0-next.1 → 0.2.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @backstage/plugin-kubernetes-node
2
2
 
3
+ ## 0.2.0-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-plugin-api@1.0.2-next.2
9
+ - @backstage/catalog-model@1.7.0
10
+ - @backstage/types@1.1.1
11
+ - @backstage/plugin-kubernetes-common@0.9.0-next.0
12
+
3
13
  ## 0.2.0-next.1
4
14
 
5
15
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"PinnipedHelper.cjs.js","sources":["../../src/auth/PinnipedHelper.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ClusterDetails } from '@backstage/plugin-kubernetes-node';\nimport * as https from 'https';\nimport { bufferFromFileOrString } from '@kubernetes/client-node';\nimport fetch, { RequestInit } from 'node-fetch';\nimport { Logger } from 'winston';\n\n/**\n *\n * @public\n */\nexport type PinnipedClientCerts = {\n key: string;\n cert: string;\n expirationTimestamp: string;\n};\n\n/**\n *\n * @public\n */\nexport type PinnipedParameters = {\n clusterScopedIdToken: string;\n authenticator: {\n apiGroup: string;\n kind: string;\n name: string;\n };\n tokenCredentialRequest?: {\n apiGroup?: string;\n };\n};\n\n/**\n *\n * @public\n */\nexport class PinnipedHelper {\n constructor(private readonly logger: Logger) {}\n\n public async tokenCredentialRequest(\n clusterDetails: ClusterDetails,\n pinnipedParams: PinnipedParameters,\n ): Promise<PinnipedClientCerts> {\n this.logger.debug('Pinniped: Requesting client Certs to Concierge');\n return await this.exchangeClusterTokentoClientCerts(\n clusterDetails,\n pinnipedParams,\n );\n }\n\n private async exchangeClusterTokentoClientCerts(\n clusterDetails: ClusterDetails,\n pinnipedParams: PinnipedParameters,\n ): Promise<PinnipedClientCerts> {\n const url: URL = new URL(clusterDetails.url);\n const apiGroup =\n pinnipedParams.tokenCredentialRequest?.apiGroup ??\n 'login.concierge.pinniped.dev/v1alpha1';\n\n url.pathname = `/apis/${apiGroup}/tokencredentialrequests`;\n\n const requestInit: RequestInit = this.buildRequestForPinniped(\n url,\n clusterDetails,\n pinnipedParams,\n );\n\n this.logger.info(\n 'Fetching client certs for mTLS authentication on Pinniped',\n );\n let response;\n try {\n response = await fetch(url, requestInit);\n } catch (error) {\n this.logger.error('Pinniped request error', error);\n throw error;\n }\n\n const data: any = await response.json();\n\n if (data.status.credential) {\n const result = {\n key: data.status.credential.clientKeyData,\n cert: data.status.credential.clientCertificateData,\n expirationTimestamp: data.status.credential.expirationTimestamp,\n };\n return Promise.resolve(result);\n }\n\n this.logger.error('Unable to fetch client certs,', data.status);\n return Promise.reject(data.status.message);\n }\n\n private buildRequestForPinniped(\n url: URL,\n clusterDetails: ClusterDetails,\n pinnipedParams: PinnipedParameters,\n ): RequestInit {\n const body = {\n apiVersion:\n pinnipedParams.tokenCredentialRequest?.apiGroup ??\n 'login.concierge.pinniped.dev/v1alpha1',\n kind: 'TokenCredentialRequest',\n spec: {\n authenticator: pinnipedParams.authenticator,\n token: pinnipedParams.clusterScopedIdToken,\n },\n };\n const requestInit: RequestInit = {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n };\n\n if (url.protocol === 'https:') {\n requestInit.agent = new https.Agent({\n ca:\n bufferFromFileOrString(\n clusterDetails.caFile,\n clusterDetails.caData,\n ) ?? undefined,\n rejectUnauthorized: !clusterDetails.skipTLSVerify,\n });\n }\n\n return requestInit;\n }\n}\n"],"names":["fetch","https","bufferFromFileOrString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDO,MAAM,cAAe,CAAA;AAAA,EAC1B,YAA6B,MAAgB,EAAA;AAAhB,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA,CAAA;AAAA,GAAiB;AAAA,EAE9C,MAAa,sBACX,CAAA,cAAA,EACA,cAC8B,EAAA;AAC9B,IAAK,IAAA,CAAA,MAAA,CAAO,MAAM,gDAAgD,CAAA,CAAA;AAClE,IAAA,OAAO,MAAM,IAAK,CAAA,iCAAA;AAAA,MAChB,cAAA;AAAA,MACA,cAAA;AAAA,KACF,CAAA;AAAA,GACF;AAAA,EAEA,MAAc,iCACZ,CAAA,cAAA,EACA,cAC8B,EAAA;AAC9B,IAAA,MAAM,GAAW,GAAA,IAAI,GAAI,CAAA,cAAA,CAAe,GAAG,CAAA,CAAA;AAC3C,IAAM,MAAA,QAAA,GACJ,cAAe,CAAA,sBAAA,EAAwB,QACvC,IAAA,uCAAA,CAAA;AAEF,IAAI,GAAA,CAAA,QAAA,GAAW,SAAS,QAAQ,CAAA,wBAAA,CAAA,CAAA;AAEhC,IAAA,MAAM,cAA2B,IAAK,CAAA,uBAAA;AAAA,MACpC,GAAA;AAAA,MACA,cAAA;AAAA,MACA,cAAA;AAAA,KACF,CAAA;AAEA,IAAA,IAAA,CAAK,MAAO,CAAA,IAAA;AAAA,MACV,2DAAA;AAAA,KACF,CAAA;AACA,IAAI,IAAA,QAAA,CAAA;AACJ,IAAI,IAAA;AACF,MAAW,QAAA,GAAA,MAAMA,sBAAM,CAAA,GAAA,EAAK,WAAW,CAAA,CAAA;AAAA,aAChC,KAAO,EAAA;AACd,MAAK,IAAA,CAAA,MAAA,CAAO,KAAM,CAAA,wBAAA,EAA0B,KAAK,CAAA,CAAA;AACjD,MAAM,MAAA,KAAA,CAAA;A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EAAA;AAC7B,MAAY,WAAA,CAAA,KAAA,GAAQ,IAAIC,gBAAA,CAAM,KAAM,CAAA;AAAA,QAClC,EACE,EAAAC,iCAAA;AAAA,UACE,cAAe,CAAA,MAAA;AAAA,UACf,cAAe,CAAA,MAAA;AAAA,SACZ,IAAA,KAAA,CAAA;AAAA,QACP,kBAAA,EAAoB,CAAC,cAAe,CAAA,aAAA;AAAA,OACrC,CAAA,CAAA;AAAA,KACH;AAEA,IAAO,OAAA,WAAA,CAAA;AAAA,GACT;AACF;;;;"}
1
+ {"version":3,"file":"PinnipedHelper.cjs.js","sources":["../../src/auth/PinnipedHelper.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ClusterDetails } from '@backstage/plugin-kubernetes-node';\nimport * as https from 'https';\nimport { bufferFromFileOrString } from '@kubernetes/client-node';\nimport fetch, { RequestInit } from 'node-fetch';\nimport { Logger } from 'winston';\n\n/**\n *\n * @public\n */\nexport type PinnipedClientCerts = {\n key: string;\n cert: string;\n expirationTimestamp: string;\n};\n\n/**\n *\n * @public\n */\nexport type PinnipedParameters = {\n clusterScopedIdToken: string;\n authenticator: {\n apiGroup: string;\n kind: string;\n name: string;\n };\n tokenCredentialRequest?: {\n apiGroup?: string;\n };\n};\n\n/**\n *\n * @public\n */\nexport class PinnipedHelper {\n constructor(private readonly logger: Logger) {}\n\n public async tokenCredentialRequest(\n clusterDetails: ClusterDetails,\n pinnipedParams: PinnipedParameters,\n ): Promise<PinnipedClientCerts> {\n this.logger.debug('Pinniped: Requesting client Certs to Concierge');\n return await this.exchangeClusterTokentoClientCerts(\n clusterDetails,\n pinnipedParams,\n );\n }\n\n private async exchangeClusterTokentoClientCerts(\n clusterDetails: ClusterDetails,\n pinnipedParams: PinnipedParameters,\n ): Promise<PinnipedClientCerts> {\n const url: URL = new URL(clusterDetails.url);\n const apiGroup =\n pinnipedParams.tokenCredentialRequest?.apiGroup ??\n 'login.concierge.pinniped.dev/v1alpha1';\n\n url.pathname = `/apis/${apiGroup}/tokencredentialrequests`;\n\n const requestInit: RequestInit = this.buildRequestForPinniped(\n url,\n clusterDetails,\n pinnipedParams,\n );\n\n this.logger.info(\n 'Fetching client certs for mTLS authentication on Pinniped',\n );\n let response;\n try {\n response = await fetch(url, requestInit);\n } catch (error) {\n this.logger.error('Pinniped request error', error);\n throw error;\n }\n\n const data: any = await response.json();\n\n if (data.status.credential) {\n const result = {\n key: data.status.credential.clientKeyData,\n cert: data.status.credential.clientCertificateData,\n expirationTimestamp: data.status.credential.expirationTimestamp,\n };\n return Promise.resolve(result);\n }\n\n this.logger.error('Unable to fetch client certs,', data.status);\n return Promise.reject(data.status.message);\n }\n\n private buildRequestForPinniped(\n url: URL,\n clusterDetails: ClusterDetails,\n pinnipedParams: PinnipedParameters,\n ): RequestInit {\n const body = {\n apiVersion:\n pinnipedParams.tokenCredentialRequest?.apiGroup ??\n 'login.concierge.pinniped.dev/v1alpha1',\n kind: 'TokenCredentialRequest',\n spec: {\n authenticator: pinnipedParams.authenticator,\n token: pinnipedParams.clusterScopedIdToken,\n },\n };\n const requestInit: RequestInit = {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n };\n\n if (url.protocol === 'https:') {\n requestInit.agent = new https.Agent({\n ca:\n bufferFromFileOrString(\n clusterDetails.caFile,\n clusterDetails.caData,\n ) ?? undefined,\n rejectUnauthorized: !clusterDetails.skipTLSVerify,\n });\n }\n\n return requestInit;\n }\n}\n"],"names":["fetch","https","bufferFromFileOrString"],"mappings":";;;;;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
1
- {"version":3,"file":"extensions.cjs.js","sources":["../src/extensions.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createExtensionPoint } from '@backstage/backend-plugin-api';\nimport {\n AuthenticationStrategy,\n KubernetesClustersSupplier,\n KubernetesFetcher,\n KubernetesObjectsProvider,\n KubernetesServiceLocator,\n} from '@backstage/plugin-kubernetes-node';\n\n/**\n * The interface for {@link kubernetesObjectsProviderExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesObjectsProviderExtensionPoint {\n addObjectsProvider(provider: KubernetesObjectsProvider): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a objects provider.\n *\n * @public\n */\nexport const kubernetesObjectsProviderExtensionPoint =\n createExtensionPoint<KubernetesObjectsProviderExtensionPoint>({\n id: 'kubernetes.objects-provider',\n });\n\n/**\n * The interface for {@link kubernetesClusterSupplierExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesClusterSupplierExtensionPoint {\n addClusterSupplier(clusterSupplier: KubernetesClustersSupplier): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a cluster supplier.\n *\n * @public\n */\nexport const kubernetesClusterSupplierExtensionPoint =\n createExtensionPoint<KubernetesClusterSupplierExtensionPoint>({\n id: 'kubernetes.cluster-supplier',\n });\n\n/**\n * The interface for {@link kubernetesAuthStrategyExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesAuthStrategyExtensionPoint {\n addAuthStrategy(key: string, strategy: AuthenticationStrategy): void;\n}\n\n/**\n * An extension point the exposes the ability to add an Auth Strategy.\n *\n * @public\n */\nexport const kubernetesAuthStrategyExtensionPoint =\n createExtensionPoint<KubernetesAuthStrategyExtensionPoint>({\n id: 'kubernetes.auth-strategy',\n });\n\n/**\n * The interface for {@link kubernetesFetcherExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesFetcherExtensionPoint {\n addFetcher(fetcher: KubernetesFetcher): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a kubernetes fetcher.\n *\n * @public\n */\nexport const kubernetesFetcherExtensionPoint =\n createExtensionPoint<KubernetesFetcherExtensionPoint>({\n id: 'kubernetes.fetcher',\n });\n\n/**\n * The interface for {@link kubernetesServiceLocatorExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesServiceLocatorExtensionPoint {\n addServiceLocator(serviceLocator: KubernetesServiceLocator): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a kubernetes service locator.\n *\n * @public\n */\nexport const kubernetesServiceLocatorExtensionPoint =\n createExtensionPoint<KubernetesServiceLocatorExtensionPoint>({\n id: 'kubernetes.service-locator',\n });\n"],"names":["createExtensionPoint"],"mappings":";;;;AAsCO,MAAM,0CACXA,qCAA8D,CAAA;AAAA,EAC5D,EAAI,EAAA,6BAAA;AACN,CAAC,EAAA;AAgBI,MAAM,0CACXA,qCAA8D,CAAA;AAAA,EAC5D,EAAI,EAAA,6BAAA;AACN,CAAC,EAAA;AAgBI,MAAM,uCACXA,qCAA2D,CAAA;AAAA,EACzD,EAAI,EAAA,0BAAA;AACN,CAAC,EAAA;AAgBI,MAAM,kCACXA,qCAAsD,CAAA;AAAA,EACpD,EAAI,EAAA,oBAAA;AACN,CAAC,EAAA;AAgBI,MAAM,yCACXA,qCAA6D,CAAA;AAAA,EAC3D,EAAI,EAAA,4BAAA;AACN,CAAC;;;;;;;;"}
1
+ {"version":3,"file":"extensions.cjs.js","sources":["../src/extensions.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createExtensionPoint } from '@backstage/backend-plugin-api';\nimport {\n AuthenticationStrategy,\n KubernetesClustersSupplier,\n KubernetesFetcher,\n KubernetesObjectsProvider,\n KubernetesServiceLocator,\n} from '@backstage/plugin-kubernetes-node';\n\n/**\n * The interface for {@link kubernetesObjectsProviderExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesObjectsProviderExtensionPoint {\n addObjectsProvider(provider: KubernetesObjectsProvider): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a objects provider.\n *\n * @public\n */\nexport const kubernetesObjectsProviderExtensionPoint =\n createExtensionPoint<KubernetesObjectsProviderExtensionPoint>({\n id: 'kubernetes.objects-provider',\n });\n\n/**\n * The interface for {@link kubernetesClusterSupplierExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesClusterSupplierExtensionPoint {\n addClusterSupplier(clusterSupplier: KubernetesClustersSupplier): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a cluster supplier.\n *\n * @public\n */\nexport const kubernetesClusterSupplierExtensionPoint =\n createExtensionPoint<KubernetesClusterSupplierExtensionPoint>({\n id: 'kubernetes.cluster-supplier',\n });\n\n/**\n * The interface for {@link kubernetesAuthStrategyExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesAuthStrategyExtensionPoint {\n addAuthStrategy(key: string, strategy: AuthenticationStrategy): void;\n}\n\n/**\n * An extension point the exposes the ability to add an Auth Strategy.\n *\n * @public\n */\nexport const kubernetesAuthStrategyExtensionPoint =\n createExtensionPoint<KubernetesAuthStrategyExtensionPoint>({\n id: 'kubernetes.auth-strategy',\n });\n\n/**\n * The interface for {@link kubernetesFetcherExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesFetcherExtensionPoint {\n addFetcher(fetcher: KubernetesFetcher): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a kubernetes fetcher.\n *\n * @public\n */\nexport const kubernetesFetcherExtensionPoint =\n createExtensionPoint<KubernetesFetcherExtensionPoint>({\n id: 'kubernetes.fetcher',\n });\n\n/**\n * The interface for {@link kubernetesServiceLocatorExtensionPoint}.\n *\n * @public\n */\nexport interface KubernetesServiceLocatorExtensionPoint {\n addServiceLocator(serviceLocator: KubernetesServiceLocator): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a kubernetes service locator.\n *\n * @public\n */\nexport const kubernetesServiceLocatorExtensionPoint =\n createExtensionPoint<KubernetesServiceLocatorExtensionPoint>({\n id: 'kubernetes.service-locator',\n });\n"],"names":["createExtensionPoint"],"mappings":";;;;AAsCO,MAAM,0CACXA,qCAA8D,CAAA;AAAA,EAC5D,EAAI,EAAA;AACN,CAAC;AAgBI,MAAM,0CACXA,qCAA8D,CAAA;AAAA,EAC5D,EAAI,EAAA;AACN,CAAC;AAgBI,MAAM,uCACXA,qCAA2D,CAAA;AAAA,EACzD,EAAI,EAAA;AACN,CAAC;AAgBI,MAAM,kCACXA,qCAAsD,CAAA;AAAA,EACpD,EAAI,EAAA;AACN,CAAC;AAgBI,MAAM,yCACXA,qCAA6D,CAAA;AAAA,EAC3D,EAAI,EAAA;AACN,CAAC;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-kubernetes-node",
3
- "version": "0.2.0-next.1",
3
+ "version": "0.2.0-next.2",
4
4
  "description": "Node.js library for the kubernetes plugin",
5
5
  "backstage": {
6
6
  "role": "node-library",
@@ -38,7 +38,7 @@
38
38
  "test": "backstage-cli package test"
39
39
  },
40
40
  "dependencies": {
41
- "@backstage/backend-plugin-api": "1.0.2-next.1",
41
+ "@backstage/backend-plugin-api": "1.0.2-next.2",
42
42
  "@backstage/catalog-model": "1.7.0",
43
43
  "@backstage/plugin-kubernetes-common": "0.9.0-next.0",
44
44
  "@backstage/types": "1.1.1",
@@ -47,12 +47,12 @@
47
47
  "winston": "^3.2.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@backstage/backend-app-api": "1.0.2-next.1",
50
+ "@backstage/backend-app-api": "1.0.2-next.2",
51
51
  "@backstage/backend-common": "^0.25.0",
52
- "@backstage/backend-defaults": "0.5.3-next.1",
53
- "@backstage/backend-test-utils": "1.0.3-next.1",
54
- "@backstage/cli": "0.29.0-next.1",
55
- "@backstage/plugin-kubernetes-backend": "0.19.0-next.1",
52
+ "@backstage/backend-defaults": "0.5.3-next.2",
53
+ "@backstage/backend-test-utils": "1.1.0-next.2",
54
+ "@backstage/cli": "0.29.0-next.2",
55
+ "@backstage/plugin-kubernetes-backend": "0.19.0-next.2",
56
56
  "msw": "^1.3.1",
57
57
  "supertest": "^7.0.0"
58
58
  }