@camunda/ccma-saas-frontend 0.0.35 → 0.0.37
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/lib/esm/assetUrls.d.ts +19 -0
- package/lib/esm/assetUrls.js +41 -0
- package/lib/esm/assets/ai.svg +14 -0
- package/lib/esm/assets/alerts.svg +5 -0
- package/lib/esm/assets/auditlogs.svg +9 -0
- package/lib/esm/assets/backup.svg +3 -0
- package/lib/esm/assets/clientApi.svg +10 -0
- package/lib/esm/assets/cluster.svg +4 -0
- package/lib/esm/assets/connectorSecret.svg +3 -0
- package/lib/esm/assets/consoleAPI.svg +3 -0
- package/lib/esm/assets/error.svg +11 -0
- package/lib/esm/assets/fatalError.svg +5 -0
- package/lib/esm/assets/ipwhitelist.svg +3 -0
- package/lib/esm/assets/monitoring.svg +6 -0
- package/lib/esm/assets/operatePreview.jpg +0 -0
- package/lib/esm/assets/optimizePreview.jpg +0 -0
- package/lib/esm/assets/secureConnectivity.svg +11 -0
- package/lib/esm/assets/tasklistPreview.jpg +0 -0
- package/lib/esm/assets/upgrade.svg +4 -0
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -1
- package/lib/esm/components/c4-audit-log/c4-audit-log.js +2 -1
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +3 -2
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +3 -2
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +3 -2
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +3 -2
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +5 -4
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +2 -1
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +10 -2
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +39 -28
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +2 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.js +87 -0
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +5 -1
- package/lib/esm/components/c4-cluster-overview/applications.js +52 -3
- package/lib/esm/components/c4-cluster-overview/applications.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-overview/applications.spec.js +26 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +8 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +26 -7
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +4 -3
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +21 -7
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +116 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -1
- package/lib/esm/components/c4-management-api/c4-management-api.js +2 -1
- package/lib/esm/components/c4-management-settings/c4-management-settings.js +2 -1
- package/lib/esm/externalUrls.const.d.ts +2 -1
- package/lib/esm/externalUrls.const.js +2 -1
- package/lib/esm/i18n/c4-console-i18n.js +0 -5
- package/lib/esm/i18n/en/modals/clusterclients.json +3 -0
- package/lib/esm/i18n/en/pages/clusterdetails.json +17 -1
- package/lib/esm/i18n/en/pages/createcluster.json +3 -2
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/runtime/build-cluster-swagger-url.d.ts +17 -0
- package/lib/esm/runtime/build-cluster-swagger-url.js +44 -0
- package/lib/esm/runtime/c4-console-authz.d.ts +1 -0
- package/lib/esm/runtime/c4-console-authz.js +4 -3
- package/lib/esm/runtime/c4-console-authz.spec.js +6 -2
- package/lib/esm/runtime/to-api-domain.d.ts +25 -0
- package/lib/esm/runtime/to-api-domain.js +46 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +10 -11
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +0 -11
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +21 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +19 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +50 -20
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +142 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +33 -41
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.js +64 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +34 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +74 -1
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +4 -2
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +1 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +7 -15
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -1
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +1 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.js +35 -26
- package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +0 -1
- package/lib/esm/widgets/management/c4-management-app.js +26 -23
- package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +42 -67
- package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +0 -1
- package/package.json +16 -16
|
@@ -8,6 +8,7 @@ export const C4_EXTERNAL_URLS = {
|
|
|
8
8
|
consoleApiClients: 'https://docs.camunda.io/docs/next/apis-tools/administration-api/administration-api-reference/',
|
|
9
9
|
consoleAlerts: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-alerts/',
|
|
10
10
|
consoleClusterClients: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-api-clients/',
|
|
11
|
+
consoleManageConnectors: 'https://docs.camunda.io/docs/components/console/manage-connectors/',
|
|
11
12
|
connectorSecrets: 'https://docs.camunda.io/docs/next/components/connectors/use-connectors/#using-secrets',
|
|
12
13
|
consoleIpWhitelist: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-ip-allowlists/',
|
|
13
14
|
conceptsRBA: 'https://docs.camunda.io/docs/components/concepts/resource-authorizations/',
|
|
@@ -39,7 +40,7 @@ export const C4_EXTERNAL_URLS = {
|
|
|
39
40
|
autoPause: 'https://docs.camunda.io/docs/components/concepts/clusters/#auto-pause',
|
|
40
41
|
},
|
|
41
42
|
auditLog: 'https://docs.camunda.io/docs/next/components/audit-log/overview/',
|
|
42
|
-
secureConnectivity: 'https://docs.camunda.io/components/saas/secure-connectivity/',
|
|
43
|
+
secureConnectivity: 'https://docs.camunda.io/docs/components/saas/secure-connectivity/secure-connectivity-AWS/',
|
|
43
44
|
releasePolicy: 'https://camunda.com/release-policy/',
|
|
44
45
|
jobDashboard: {
|
|
45
46
|
roles: 'https://docs.camunda.io/docs/components/identity/role/',
|
|
@@ -81,11 +81,6 @@ const resources = {
|
|
|
81
81
|
subtitle: 'Update the cluster to access the latest features.',
|
|
82
82
|
actionLabel: 'Learn more',
|
|
83
83
|
},
|
|
84
|
-
authorizationsEnabled: {
|
|
85
|
-
title: 'Authorizations enabled',
|
|
86
|
-
subtitle: 'Access to this cluster’s resources is restricted based on permissions set in the Admin component.',
|
|
87
|
-
actionLabel: 'Learn more about managing authorizations',
|
|
88
|
-
},
|
|
89
84
|
authorizationsDisabled: {
|
|
90
85
|
title: 'Authorizations disabled',
|
|
91
86
|
subtitle: 'All authenticated users & clients have full access to this cluster’s resources. To restrict access, enable authorizations in the settings.',
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"warning": "The client secret will not be shown again.",
|
|
72
72
|
"error": {
|
|
73
|
+
"title": "Error",
|
|
73
74
|
"generic": "We're having trouble creating the client",
|
|
74
75
|
"doublette": "Client name needs to be unique"
|
|
75
76
|
},
|
|
@@ -102,6 +103,7 @@
|
|
|
102
103
|
"loadingText": "Deleting...",
|
|
103
104
|
"description": "Are you sure you want to delete this client?",
|
|
104
105
|
"error": {
|
|
106
|
+
"title": "Error",
|
|
105
107
|
"generic": "We're having trouble deleting the client"
|
|
106
108
|
}
|
|
107
109
|
},
|
|
@@ -139,6 +141,7 @@
|
|
|
139
141
|
}
|
|
140
142
|
},
|
|
141
143
|
"error": {
|
|
144
|
+
"title": "Error",
|
|
142
145
|
"generic": "We're having trouble updating the client"
|
|
143
146
|
}
|
|
144
147
|
}
|
|
@@ -191,6 +191,10 @@
|
|
|
191
191
|
"learnMoreLink": "Learn more about PrivateLink endpoint service",
|
|
192
192
|
"disableButton": "Deactivate",
|
|
193
193
|
"deactivatingButton": "Deactivating…",
|
|
194
|
+
"updatePrincipalsModalHeading": "Edit allowed principals",
|
|
195
|
+
"updateRegionsModalHeading": "Edit supported regions",
|
|
196
|
+
"updateModalSave": "Save changes",
|
|
197
|
+
"updateModalErrorTitle": "Update failed",
|
|
194
198
|
"enabledStatusLabel": "Status",
|
|
195
199
|
"allowedRegionsLabel": "Allowed regions",
|
|
196
200
|
"allowedPrincipalsLabel": "Allowed principals",
|
|
@@ -299,11 +303,15 @@
|
|
|
299
303
|
"status": {
|
|
300
304
|
"label": "Status",
|
|
301
305
|
"wakeLabel": "Resume cluster",
|
|
302
|
-
"sleepLabel": "Suspend cluster (internal)"
|
|
306
|
+
"sleepLabel": "Suspend cluster (internal)",
|
|
307
|
+
"waitingForInputTooltip": "Waiting for external encryption to be configured"
|
|
303
308
|
},
|
|
304
309
|
"title": "Cluster Details",
|
|
305
310
|
"clusterId": "Cluster Id",
|
|
306
311
|
"createdAt": "Created at",
|
|
312
|
+
"swaggerUrl": "Swagger UI",
|
|
313
|
+
"openSwaggerUi": "Open Swagger UI",
|
|
314
|
+
"swaggerUiPausedWarning": "Not accessible while the cluster is paused",
|
|
307
315
|
"provider": "Provider",
|
|
308
316
|
"region": "Region",
|
|
309
317
|
"regionId": "Region Id",
|
|
@@ -535,6 +543,7 @@
|
|
|
535
543
|
"description": "The Orchestration Cluster REST API is documented using the",
|
|
536
544
|
"spec": "OpenAPI specification",
|
|
537
545
|
"description2": ". When enabled, it is accessible via Swagger UI.",
|
|
546
|
+
"accessSwagger": "Access your cluster Swagger UI:",
|
|
538
547
|
"description3": "Learn more about ",
|
|
539
548
|
"description4": "accessing API endpoints via Swagger UI.",
|
|
540
549
|
"action": {
|
|
@@ -584,6 +593,13 @@
|
|
|
584
593
|
"button": {
|
|
585
594
|
"enable": "Enable",
|
|
586
595
|
"disable": "Disable"
|
|
596
|
+
},
|
|
597
|
+
"modal": {
|
|
598
|
+
"heading": "Upgrade to Tasklist v2",
|
|
599
|
+
"description": "This action cannot be undone. Once upgraded to Tasklist v2, downgrading back to v1 will not be possible.",
|
|
600
|
+
"confirm": "Upgrade to Tasklist v2",
|
|
601
|
+
"cancel": "Cancel",
|
|
602
|
+
"error": "We're having trouble upgrading to Tasklist v2. Please try again later."
|
|
587
603
|
}
|
|
588
604
|
},
|
|
589
605
|
"tags": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"region": {
|
|
38
38
|
"title": "Select region",
|
|
39
|
-
"description": "To
|
|
39
|
+
"description": "To minimize network latency and traffic costs, select your preferred cloud provider and a region near your client application and/or users.",
|
|
40
40
|
"teaseForEnterprise": "Custom regions are available in the Enterprise plan and you can <0>contact us</0> to know more.",
|
|
41
41
|
"validationMessage": "Please select a region for your cluster"
|
|
42
42
|
},
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"generation": {
|
|
48
48
|
"title": "Channel",
|
|
49
49
|
"olderGenerationsLabel": "View older generations",
|
|
50
|
-
"olderGenerationsHelperText": "These are older generations that are used in your organization."
|
|
50
|
+
"olderGenerationsHelperText": "These are older generations that are used in your organization.",
|
|
51
|
+
"orgUnlockedGenerationsHelperText": "These are older generations that have been unlocked for your organization."
|
|
51
52
|
},
|
|
52
53
|
"autoUpdate": {
|
|
53
54
|
"title": "Automatic cluster patch updates",
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { C4_ASSET_URLS } from './assetUrls';
|
|
1
2
|
export { C4ActionableNotification } from './components/c4-actionable-notification/c4-actionable-notification';
|
|
2
3
|
export type { C4ActionableNotificationProps } from './components/c4-actionable-notification/c4-actionable-notification.types';
|
|
3
4
|
export { C4ActivityGraph } from './components/c4-activity-graph/c4-activity-graph';
|
package/lib/esm/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
4
|
* You may not use this file except in compliance with the commercial license.
|
|
5
5
|
*/
|
|
6
|
+
export { C4_ASSET_URLS } from './assetUrls.js';
|
|
6
7
|
export { C4ActionableNotification } from './components/c4-actionable-notification/c4-actionable-notification.js';
|
|
7
8
|
export { C4ActivityGraph } from './components/c4-activity-graph/c4-activity-graph.js';
|
|
8
9
|
// Re-export chart definition types for consumers
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ConsoleClusterDto } from '@camunda/ccma-shared-types';
|
|
2
|
+
import type { ConsoleStage } from './c4-console-runtime.types';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the cluster-specific Swagger UI URL.
|
|
5
|
+
*
|
|
6
|
+
* Returns `undefined` when the swagger feature is disabled or when the cluster
|
|
7
|
+
* status does not yet carry an operateUrl (e.g. cluster is still being created).
|
|
8
|
+
*
|
|
9
|
+
* URL format depends on the cluster generation version:
|
|
10
|
+
* - Camunda 8.8.x: https://{regionId}.operate.{domain}/{clusterId}/swagger-ui/index.html
|
|
11
|
+
* - Camunda 8.9+: https://{regionId}.api.{domain}/{clusterId}/swagger
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildClusterSwaggerUrl(params: {
|
|
14
|
+
cluster: Pick<ConsoleClusterDto, 'status' | 'externalMetadata' | 'generation'>;
|
|
15
|
+
clusterId: string;
|
|
16
|
+
stage: ConsoleStage;
|
|
17
|
+
}): string | undefined;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
+
* You may not use this file except in compliance with the commercial license.
|
|
5
|
+
*/
|
|
6
|
+
import { checkVersion, VersionCheckOperator } from '@camunda/ccma-shared-types';
|
|
7
|
+
import { toServiceDomain } from './to-api-domain.js';
|
|
8
|
+
/**
|
|
9
|
+
* Builds the cluster-specific Swagger UI URL.
|
|
10
|
+
*
|
|
11
|
+
* Returns `undefined` when the swagger feature is disabled or when the cluster
|
|
12
|
+
* status does not yet carry an operateUrl (e.g. cluster is still being created).
|
|
13
|
+
*
|
|
14
|
+
* URL format depends on the cluster generation version:
|
|
15
|
+
* - Camunda 8.8.x: https://{regionId}.operate.{domain}/{clusterId}/swagger-ui/index.html
|
|
16
|
+
* - Camunda 8.9+: https://{regionId}.api.{domain}/{clusterId}/swagger
|
|
17
|
+
*/
|
|
18
|
+
export function buildClusterSwaggerUrl(params) {
|
|
19
|
+
const swaggerEnabled = params.cluster.externalMetadata?.swagger ?? true;
|
|
20
|
+
const operateUrl = params.cluster?.status?.operateUrl;
|
|
21
|
+
if (!swaggerEnabled || !operateUrl) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
let regionId;
|
|
25
|
+
try {
|
|
26
|
+
regionId = new URL(operateUrl).hostname.split('.')[0];
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
const zeebeVersion = params.cluster.generation?.versions?.zeebe;
|
|
32
|
+
const is89OrHigher = checkVersion({
|
|
33
|
+
possiblyVersionOrDockerPath: zeebeVersion,
|
|
34
|
+
trueForSnapshot: true,
|
|
35
|
+
trueOnInvalidVersion: false,
|
|
36
|
+
versionToCompareTo: '8.9.0',
|
|
37
|
+
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
38
|
+
});
|
|
39
|
+
if (is89OrHigher) {
|
|
40
|
+
return `https://${regionId}.${toServiceDomain(params.stage, 'api')}/${params.clusterId}/swagger`;
|
|
41
|
+
}
|
|
42
|
+
// Camunda 8.8.x format
|
|
43
|
+
return `https://${regionId}.${toServiceDomain(params.stage, 'operate')}/${params.clusterId}/swagger-ui/index.html`;
|
|
44
|
+
}
|
|
@@ -120,9 +120,10 @@ export function deriveConsoleAuthzFromAccessToken(params) {
|
|
|
120
120
|
clusters: {
|
|
121
121
|
canCreate: canCreateFromOrgPermissions ?? clusters.createOnBehalf,
|
|
122
122
|
canDelete: canDeleteFromOrgPermissions ?? clusters.canDeleteAllClusters,
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
canWake: canWakeFromOrgPermissions
|
|
123
|
+
// Users must be able to resume auto-suspended clusters via org access.
|
|
124
|
+
// Internal manual sleep stays token-scoped via canSleep.
|
|
125
|
+
canWake: Boolean(canWakeFromOrgPermissions || clusters.canSendToSleep),
|
|
126
|
+
canSleep: clusters.canSendToSleep,
|
|
126
127
|
canEdit: canEditFromOrgPermissions ??
|
|
127
128
|
(clusters.canOverrideEnvVars ||
|
|
128
129
|
clusters.canUpdateClusterPlanType ||
|
|
@@ -60,6 +60,7 @@ describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
|
60
60
|
expect(result.orgPermissions?.org.clusters.read).toBe(true);
|
|
61
61
|
expect(result.visibilities.clusters?.canSeeClusterLoad).toBe(true);
|
|
62
62
|
expect(result.visibilities.clusters?.canWake).toBe(true);
|
|
63
|
+
expect(result.visibilities.clusters?.canSleep).toBe(false);
|
|
63
64
|
});
|
|
64
65
|
it('derives cluster mutation visibilities from org roles', () => {
|
|
65
66
|
const token = makeFakeJwt({
|
|
@@ -77,8 +78,9 @@ describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
|
77
78
|
expect(result.visibilities.clusters?.canEdit).toBe(true);
|
|
78
79
|
expect(result.visibilities.clusters?.canUpdateTag).toBe(true);
|
|
79
80
|
expect(result.visibilities.clusters?.canWake).toBe(true);
|
|
81
|
+
expect(result.visibilities.clusters?.canSleep).toBe(false);
|
|
80
82
|
});
|
|
81
|
-
it('
|
|
83
|
+
it('keeps manual suspend tied to the internal token permission', () => {
|
|
82
84
|
const token = makeFakeJwt({
|
|
83
85
|
permissions: [
|
|
84
86
|
ConsolePermissions.CLUSTERS_DELETE_CLUSTER,
|
|
@@ -97,7 +99,8 @@ describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
|
97
99
|
expect(result.visibilities.clusters?.canDelete).toBe(false);
|
|
98
100
|
expect(result.visibilities.clusters?.canEdit).toBe(false);
|
|
99
101
|
expect(result.visibilities.clusters?.canUpdateTag).toBe(false);
|
|
100
|
-
expect(result.visibilities.clusters?.canWake).toBe(
|
|
102
|
+
expect(result.visibilities.clusters?.canWake).toBe(true);
|
|
103
|
+
expect(result.visibilities.clusters?.canSleep).toBe(true);
|
|
101
104
|
expect(result.visibilities.clusters?.canSeeClusterLoad).toBe(true);
|
|
102
105
|
});
|
|
103
106
|
it('falls back to global token permissions when org permissions are unavailable', () => {
|
|
@@ -118,6 +121,7 @@ describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
|
118
121
|
expect(result.visibilities.clusters?.canEdit).toBe(true);
|
|
119
122
|
expect(result.visibilities.clusters?.canUpdateTag).toBe(true);
|
|
120
123
|
expect(result.visibilities.clusters?.canWake).toBe(true);
|
|
124
|
+
expect(result.visibilities.clusters?.canSleep).toBe(true);
|
|
121
125
|
});
|
|
122
126
|
it('is safe on invalid tokens', () => {
|
|
123
127
|
const result = deriveConsoleAuthzFromAccessToken({
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ConsoleStage } from './c4-console-runtime.types';
|
|
2
|
+
export type ServicePrefix = 'api' | 'operate';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the stage-appropriate domain for the given service prefix, used to
|
|
5
|
+
* construct cluster REST API URLs.
|
|
6
|
+
*
|
|
7
|
+
* api prefix:
|
|
8
|
+
* - prod → api.camunda.io
|
|
9
|
+
* - int → api.ultrawombat.com
|
|
10
|
+
* - dev / devAws / local* → api.dev.ultrawombat.com
|
|
11
|
+
*
|
|
12
|
+
* operate prefix (used for Camunda 8.8.x clusters):
|
|
13
|
+
* - prod → operate.camunda.io
|
|
14
|
+
* - int → operate.ultrawombat.com
|
|
15
|
+
* - dev / devAws / local* → operate.dev.ultrawombat.com
|
|
16
|
+
*/
|
|
17
|
+
export declare function toServiceDomain(stage: ConsoleStage, prefix: ServicePrefix): string;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the stage-appropriate API domain used to construct cluster REST API URLs.
|
|
20
|
+
*
|
|
21
|
+
* - prod → api.camunda.io
|
|
22
|
+
* - int → api.ultrawombat.com
|
|
23
|
+
* - dev / devAws / local* → api.dev.ultrawombat.com
|
|
24
|
+
*/
|
|
25
|
+
export declare function toApiDomain(stage: ConsoleStage): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
+
* You may not use this file except in compliance with the commercial license.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Returns the stage-appropriate domain for the given service prefix, used to
|
|
8
|
+
* construct cluster REST API URLs.
|
|
9
|
+
*
|
|
10
|
+
* api prefix:
|
|
11
|
+
* - prod → api.camunda.io
|
|
12
|
+
* - int → api.ultrawombat.com
|
|
13
|
+
* - dev / devAws / local* → api.dev.ultrawombat.com
|
|
14
|
+
*
|
|
15
|
+
* operate prefix (used for Camunda 8.8.x clusters):
|
|
16
|
+
* - prod → operate.camunda.io
|
|
17
|
+
* - int → operate.ultrawombat.com
|
|
18
|
+
* - dev / devAws / local* → operate.dev.ultrawombat.com
|
|
19
|
+
*/
|
|
20
|
+
export function toServiceDomain(stage, prefix) {
|
|
21
|
+
switch (stage) {
|
|
22
|
+
case 'prod':
|
|
23
|
+
return `${prefix}.camunda.io`;
|
|
24
|
+
case 'int':
|
|
25
|
+
return `${prefix}.ultrawombat.com`;
|
|
26
|
+
case 'dev':
|
|
27
|
+
case 'devAws':
|
|
28
|
+
case 'local':
|
|
29
|
+
case 'localaccounts':
|
|
30
|
+
case 'localconsole':
|
|
31
|
+
return `${prefix}.dev.ultrawombat.com`;
|
|
32
|
+
default:
|
|
33
|
+
// For unknown/custom stages, keep the production default.
|
|
34
|
+
return `${prefix}.camunda.io`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Returns the stage-appropriate API domain used to construct cluster REST API URLs.
|
|
39
|
+
*
|
|
40
|
+
* - prod → api.camunda.io
|
|
41
|
+
* - int → api.ultrawombat.com
|
|
42
|
+
* - dev / devAws / local* → api.dev.ultrawombat.com
|
|
43
|
+
*/
|
|
44
|
+
export function toApiDomain(stage) {
|
|
45
|
+
return toServiceDomain(stage, 'api');
|
|
46
|
+
}
|
|
@@ -69,7 +69,7 @@ function getClusterDetailsTabTelemetryId(tabId) {
|
|
|
69
69
|
return 'byom-clients';
|
|
70
70
|
case 'ipWhitelist':
|
|
71
71
|
return 'ip-whitelist';
|
|
72
|
-
case '
|
|
72
|
+
case 'privateNetworking':
|
|
73
73
|
return 'secure-connectivity';
|
|
74
74
|
case 'backups':
|
|
75
75
|
return 'backups';
|
|
@@ -249,7 +249,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
249
249
|
const [activeTabId, setActiveTabId] = useState(props.desiredTabId ?? 'overview');
|
|
250
250
|
useEffect(() => {
|
|
251
251
|
if (props.desiredTabId) {
|
|
252
|
-
if (props.desiredTabId === '
|
|
252
|
+
if (props.desiredTabId === 'privateNetworking' &&
|
|
253
253
|
!isSecureConnectivityEnabled) {
|
|
254
254
|
setActiveTabId('overview');
|
|
255
255
|
return;
|
|
@@ -430,11 +430,9 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
430
430
|
},
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
if (hasIdentityIntegration) {
|
|
433
|
+
if (hasIdentityIntegration && !cluster.identityBackendChecksEnabled) {
|
|
434
434
|
return {
|
|
435
|
-
kind:
|
|
436
|
-
? 'authorizationsEnabled'
|
|
437
|
-
: 'authorizationsDisabled',
|
|
435
|
+
kind: 'authorizationsDisabled',
|
|
438
436
|
onLearnMore: () => {
|
|
439
437
|
props.onNavigate?.({
|
|
440
438
|
kind: 'openUrl',
|
|
@@ -862,10 +860,11 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
862
860
|
}
|
|
863
861
|
return _jsx(_Fragment, {});
|
|
864
862
|
}
|
|
865
|
-
return (_jsx(C4ClusterDetailsOverviewTab, { cluster: cluster, clusterError: clusterError, creationParameters: creationParameters, clustersOfOrg: clustersOfOrg, clusterPlanTypeReservations: clusterPlanTypeReservations, clusterLoadLatest: clusterLoadLatest, clusterLoadPerDay: clusterLoadPerDay, clusterLoad24h: clusterLoad24h, clusterLoadLoading: clusterLoadLoading, canSeeClusterLoad: canSeeClusterLoad, canEditCluster: Boolean(authz.visibilities.clusters?.canEdit), canWakeCluster: Boolean(authz.visibilities.clusters?.canWake), canManageUsers: canManageUsers, canViewConnectorsLink: Boolean(orgPermissions?.cluster.connectors.read), hasIdentityIntegration: hasIdentityIntegration, orgId: props.orgId, clusterId: props.clusterId, jobDashboardEnabled: jobDashboardEnabled, jobDashboardDocsUrls: urls.docs.jobDashboard, upgradeDocsUrls: urls.docs.upgrade, statisticsConfig: statisticsConfig, apiConfig: apiConfig, t: t ?? ((key) => key), onReloadCluster: reloadCluster, onReloadClusterLoad: reloadClusterLoad, onNavigate: props.onNavigate, ignoreGracePeriod: ignoreGracePeriod, clusterLoadDocsUrl: urls.docs.clusterLoad }));
|
|
863
|
+
return (_jsx(C4ClusterDetailsOverviewTab, { cluster: cluster, clusterError: clusterError, creationParameters: creationParameters, clustersOfOrg: clustersOfOrg, clusterPlanTypeReservations: clusterPlanTypeReservations, clusterLoadLatest: clusterLoadLatest, clusterLoadPerDay: clusterLoadPerDay, clusterLoad24h: clusterLoad24h, clusterLoadLoading: clusterLoadLoading, canSeeClusterLoad: canSeeClusterLoad, canEditCluster: Boolean(authz.visibilities.clusters?.canEdit), canWakeCluster: Boolean(authz.visibilities.clusters?.canWake), canSleepCluster: Boolean(authz.visibilities.clusters?.canSleep), canManageUsers: canManageUsers, canViewConnectorsLink: Boolean(orgPermissions?.cluster.connectors.read), hasIdentityIntegration: hasIdentityIntegration, orgId: props.orgId, clusterId: props.clusterId, jobDashboardEnabled: jobDashboardEnabled, jobDashboardDocsUrls: urls.docs.jobDashboard, upgradeDocsUrls: urls.docs.upgrade, statisticsConfig: statisticsConfig, apiConfig: apiConfig, t: t ?? ((key) => key), onReloadCluster: reloadCluster, onReloadClusterLoad: reloadClusterLoad, onNavigate: props.onNavigate, ignoreGracePeriod: ignoreGracePeriod, clusterLoadDocsUrl: urls.docs.clusterLoad }));
|
|
866
864
|
}, [
|
|
867
865
|
apiConfig,
|
|
868
866
|
authz.visibilities.clusters?.canEdit,
|
|
867
|
+
authz.visibilities.clusters?.canSleep,
|
|
869
868
|
authz.visibilities.clusters?.canWake,
|
|
870
869
|
canManageUsers,
|
|
871
870
|
cluster,
|
|
@@ -1030,7 +1029,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1030
1029
|
t,
|
|
1031
1030
|
urls.docs.byom,
|
|
1032
1031
|
]);
|
|
1033
|
-
const secureConnectivityComponent = (_jsx(C4ClusterDetailsSecureConnectivityTab, { orgId: props.orgId, clusterId: props.clusterId, apiConfig: apiConfig, canMutateCluster: canMutateCluster, isActive: activeTabId === '
|
|
1032
|
+
const secureConnectivityComponent = (_jsx(C4ClusterDetailsSecureConnectivityTab, { orgId: props.orgId, clusterId: props.clusterId, apiConfig: apiConfig, canMutateCluster: canMutateCluster, isActive: activeTabId === 'privateNetworking', t: t, docsUrls: {
|
|
1034
1033
|
secureConnectivity: urls.docs.secureConnectivity,
|
|
1035
1034
|
}, onNavigate: props.onNavigate }));
|
|
1036
1035
|
const connectorSecretsComponent = (_jsx(C4ClusterDetailsConnectorSecretsTab, { orgId: props.orgId, clusterId: props.clusterId, apiConfig: apiConfig, canMutateCluster: canMutateCluster, connectorSecretsPermissions: {
|
|
@@ -1150,8 +1149,8 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1150
1149
|
init: () => { },
|
|
1151
1150
|
},
|
|
1152
1151
|
{
|
|
1153
|
-
id: '
|
|
1154
|
-
label: safeTranslate(t, 'clusterdetails:secureConnectivity.title', '
|
|
1152
|
+
id: 'privateNetworking',
|
|
1153
|
+
label: safeTranslate(t, 'clusterdetails:secureConnectivity.title', 'Private networking'),
|
|
1155
1154
|
component: secureConnectivityComponent,
|
|
1156
1155
|
visible: isSecureConnectivityTabVisible &&
|
|
1157
1156
|
canViewSecureConnectivityTab &&
|
|
@@ -1239,7 +1238,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1239
1238
|
]);
|
|
1240
1239
|
useEffect(() => {
|
|
1241
1240
|
if (!isClusterLoading &&
|
|
1242
|
-
activeTabId === '
|
|
1241
|
+
activeTabId === 'privateNetworking' &&
|
|
1243
1242
|
!isSecureConnectivityTabVisible) {
|
|
1244
1243
|
setActiveTabId('overview');
|
|
1245
1244
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type C4ClusterDetailsTabId = 'overview' | 'api' | 'monitoring' | 'alerts' | 'activity' | '
|
|
1
|
+
export type C4ClusterDetailsTabId = 'overview' | 'api' | 'monitoring' | 'alerts' | 'activity' | 'privateNetworking' | 'backups' | 'auditLog' | 'settings' | 'secrets' | 'encryption' | 'ipWhitelist';
|
|
2
2
|
export type C4ClusterDetailsNavigateEvent = {
|
|
3
3
|
kind: 'tabChange';
|
|
4
4
|
orgId: string;
|
|
@@ -64,17 +64,6 @@ function buildBanner(opts) {
|
|
|
64
64
|
},
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
if (banner.kind === 'authorizationsEnabled') {
|
|
68
|
-
return {
|
|
69
|
-
kind: 'info',
|
|
70
|
-
title: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsEnabled.title', 'Authorizations enabled'),
|
|
71
|
-
subtitle: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsEnabled.subtitle', 'Access to this cluster’s resources is restricted based on permissions set in the Admin component.'),
|
|
72
|
-
action: {
|
|
73
|
-
label: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsEnabled.actionLabel', 'Learn more about managing authorizations'),
|
|
74
|
-
onClick: banner.onLearnMore,
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
67
|
return {
|
|
79
68
|
kind: 'warning',
|
|
80
69
|
title: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.title', 'Authorizations disabled'),
|
|
@@ -4,7 +4,7 @@ export type C4ClusterDetailsPageBanner = {
|
|
|
4
4
|
isAlphaGeneration: boolean;
|
|
5
5
|
onLearnMore: () => void;
|
|
6
6
|
} | {
|
|
7
|
-
kind: '
|
|
7
|
+
kind: 'authorizationsDisabled';
|
|
8
8
|
onLearnMore: () => void;
|
|
9
9
|
};
|
|
10
10
|
export type C4ClusterDetailsTab = C4TabProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleClusterClientsService, ConsoleConnectorSecretsService, } from '@camunda/ccma-api';
|
|
3
|
-
import { checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
3
|
+
import { checkVersion, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
4
4
|
import { Checkbox, Form, InlineNotification, Link, Modal, Stack, TextInput, } from '@carbon/react';
|
|
5
5
|
import { useCallback, useMemo, useState } from 'react';
|
|
6
6
|
import { C4ClusterClientCredentialsModal } from '../../../components/c4-cluster-client-credentials/c4-cluster-client-credentials.js';
|
|
@@ -287,7 +287,7 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
287
287
|
kind: 'openUrl',
|
|
288
288
|
url: identityAuthorizationDocsUrl,
|
|
289
289
|
});
|
|
290
|
-
}, children: "Learn more about authorizations" }) })] })), clientMutationError && _jsx(
|
|
290
|
+
}, children: "Learn more about authorizations" }) })] })), clientMutationError && (_jsx(InlineNotification, { kind: 'error', title: safeTranslate(t, 'clusterclients:create.error.title', 'Error'), subtitle: clientMutationError, hideCloseButton: true, lowContrast: true })), _jsx(TextInput, { id: 'clusterClientName-create', name: 'name', "data-modal-primary-focus": true, labelText: safeTranslate(t, 'clusterclients:create.fields.name.label', 'Client Name'), maxLength: 50, value: clientName, placeholder: safeTranslate(t, 'clusterclients:create.fields.name.label', 'Client Name'), helperText: safeTranslate(t, 'clusterclients:create.fields.name.helperText', 'can contain letters, dashes, underscores, and digits'), invalid: Boolean(clientNameTouched && validateClientName(clientName)), invalidText: (clientNameTouched && validateClientName(clientName)) ?? '', onChange: (event) => {
|
|
291
291
|
setClientName(event.target.value);
|
|
292
292
|
}, onBlur: () => setClientNameTouched(true) }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText', 'Scopes define the access for client credentials.') }), hasIdentityIntegration && (_jsx("p", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText8_8', 'Granular authorizations for the Orchestration Cluster API can be managed via Orchestration Cluster Identity.') })), _jsx("div", { style: { marginBottom: '8px' }, children: renderInlineLink(safeTranslate(t, 'clusterclients:create.fields.scopes.learnMoreHelperText', 'Read more about <0>Scopes for Client Credentials</0>.'), {
|
|
293
293
|
href: clientsDocsUrl,
|
|
@@ -465,7 +465,15 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
465
465
|
const saveAsConnectorSecretLabel = safeTranslate(t, 'clusterclients:create.connectorSecret.buttonText', 'Save as connector secret');
|
|
466
466
|
const saveConnectorSecret = async () => {
|
|
467
467
|
trackEvent('apiClients:createConnectorSecret', 'Save credentials as connector secret', { clientId });
|
|
468
|
-
const
|
|
468
|
+
const SECRET_NAME_MAX_LENGTH = 50;
|
|
469
|
+
const prefix = 'CLUSTER_CLIENT_';
|
|
470
|
+
const suffix = '_SECRET';
|
|
471
|
+
const maxMiddleLength = SECRET_NAME_MAX_LENGTH - prefix.length - suffix.length;
|
|
472
|
+
const nameOrId = clientCreatedName || clientId;
|
|
473
|
+
const middle = nameOrId.length > maxMiddleLength
|
|
474
|
+
? nameOrId.slice(0, maxMiddleLength)
|
|
475
|
+
: nameOrId;
|
|
476
|
+
const secretName = `${prefix}${middle}${suffix}`;
|
|
469
477
|
const secretValue = clientSecret;
|
|
470
478
|
try {
|
|
471
479
|
const existing = await ConsoleConnectorSecretsService.getAll({
|
|
@@ -487,6 +495,14 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
487
495
|
body: { secretName, secretValue },
|
|
488
496
|
});
|
|
489
497
|
}
|
|
498
|
+
window.dispatchEvent(new CustomEvent('clusterchange', {
|
|
499
|
+
detail: {
|
|
500
|
+
org: orgId,
|
|
501
|
+
entity: SseEntity.CONNECTOR_SECRETS,
|
|
502
|
+
type: exists ? 'updated' : 'created',
|
|
503
|
+
clusterId,
|
|
504
|
+
},
|
|
505
|
+
}));
|
|
490
506
|
trackEvent('apiClients:createConnectorSecret:success', 'Saved credentials as connector secret', { clientId, secretName });
|
|
491
507
|
}
|
|
492
508
|
catch (error) {
|
|
@@ -843,7 +859,7 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
843
859
|
setClientMutationBusy(false);
|
|
844
860
|
}
|
|
845
861
|
})();
|
|
846
|
-
}, children: _jsxs(Stack, { gap: 4, children: [clientMutationError && _jsx(
|
|
862
|
+
}, children: _jsxs(Stack, { gap: 4, children: [clientMutationError && (_jsx(InlineNotification, { kind: 'error', title: safeTranslate(t, 'clusterclients:update.error.title', 'Error'), subtitle: clientMutationError, hideCloseButton: true, lowContrast: true })), _jsx(TextInput, { id: 'client-update-name', labelText: 'Name', value: clientName, onChange: (event) => setClientName(event.target.value) })] }) }), _jsx(Modal, { open: deleteClientOpen, danger: true, modalHeading: 'Delete API client', primaryButtonText: 'Delete', secondaryButtonText: 'Cancel', primaryButtonDisabled: clientMutationBusy, onRequestClose: () => {
|
|
847
863
|
trackEvent('apiClients:delete:cancel', 'Cancel Delete Api Client Modal');
|
|
848
864
|
setDeleteClientOpen(false);
|
|
849
865
|
}, onRequestSubmit: () => {
|
|
@@ -877,5 +893,5 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
877
893
|
setClientMutationBusy(false);
|
|
878
894
|
}
|
|
879
895
|
})();
|
|
880
|
-
}, children: _jsxs(Stack, { gap: 4, children: [clientMutationError && _jsx(
|
|
896
|
+
}, children: _jsxs(Stack, { gap: 4, children: [clientMutationError && (_jsx(InlineNotification, { kind: 'error', title: safeTranslate(t, 'clusterclients:delete.error.title', 'Error'), subtitle: clientMutationError, hideCloseButton: true, lowContrast: true })), _jsx("p", { children: "Delete this client?" })] }) })] }));
|
|
881
897
|
};
|
|
@@ -120,6 +120,25 @@ describe('C4ClusterDetailsClientsTab', () => {
|
|
|
120
120
|
}));
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
|
+
it('shows an InlineNotification when create client returns a 4xx error', async () => {
|
|
124
|
+
vi.mocked(ConsoleClusterClientsService.create).mockRejectedValue(new Error('Maximum number of clients reached for this cluster'));
|
|
125
|
+
renderTab();
|
|
126
|
+
await userEvent.click(screen.getByRole('button', { name: 'Open create client' }));
|
|
127
|
+
const createDialog = await screen.findByRole('dialog', {
|
|
128
|
+
name: 'Create new client credentials',
|
|
129
|
+
});
|
|
130
|
+
fireEvent.change(screen.getByLabelText('Client Name'), {
|
|
131
|
+
target: { value: 'my-client' },
|
|
132
|
+
});
|
|
133
|
+
await userEvent.click(screen.getByLabelText('Optimize'));
|
|
134
|
+
const createButton = within(createDialog).getByRole('button', {
|
|
135
|
+
name: 'Create',
|
|
136
|
+
});
|
|
137
|
+
await userEvent.click(createButton);
|
|
138
|
+
await waitFor(() => {
|
|
139
|
+
expect(within(createDialog).getByText('Maximum number of clients reached for this cluster')).toBeTruthy();
|
|
140
|
+
});
|
|
141
|
+
});
|
|
123
142
|
it("does not include a trailing '/' in ZEEBE_ADDRESS", async () => {
|
|
124
143
|
vi.mocked(ConsoleClusterClientsService.create).mockResolvedValue({
|
|
125
144
|
uuid: 'uuid-new',
|
|
@@ -29,6 +29,7 @@ interface C4ClusterDetailsOverviewTabProps {
|
|
|
29
29
|
canSeeClusterLoad: boolean;
|
|
30
30
|
canEditCluster: boolean;
|
|
31
31
|
canWakeCluster: boolean;
|
|
32
|
+
canSleepCluster: boolean;
|
|
32
33
|
canManageUsers: boolean;
|
|
33
34
|
/** Legacy/backport visibility: orgPermissions.cluster.connectors.read */
|
|
34
35
|
canViewConnectorsLink: boolean;
|