@camunda/ccma-saas-frontend 0.0.36 → 0.0.38

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.
Files changed (61) hide show
  1. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
  2. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +10 -4
  3. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +2 -0
  4. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +39 -28
  5. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +2 -1
  6. package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.d.ts +1 -0
  7. package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.js +87 -0
  8. package/lib/esm/components/c4-cluster-overview/applications.d.ts +5 -1
  9. package/lib/esm/components/c4-cluster-overview/applications.js +70 -9
  10. package/lib/esm/components/c4-cluster-overview/applications.spec.d.ts +1 -0
  11. package/lib/esm/components/c4-cluster-overview/applications.spec.js +32 -0
  12. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +8 -0
  13. package/lib/esm/components/c4-cluster-overview/cluster-details.js +26 -7
  14. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -1
  15. package/lib/esm/components/c4-page-template/c4-page-template.d.ts +1 -0
  16. package/lib/esm/components/c4-page-template/c4-page-template.js +1 -1
  17. package/lib/esm/externalUrls.const.d.ts +2 -1
  18. package/lib/esm/externalUrls.const.js +2 -1
  19. package/lib/esm/i18n/c4-console-i18n.js +0 -5
  20. package/lib/esm/i18n/en/pages/clusterdetails.json +13 -1
  21. package/lib/esm/i18n/en/pages/createcluster.json +1 -1
  22. package/lib/esm/runtime/build-cluster-swagger-url.d.ts +17 -0
  23. package/lib/esm/runtime/build-cluster-swagger-url.js +44 -0
  24. package/lib/esm/runtime/c4-console-authz.d.ts +1 -0
  25. package/lib/esm/runtime/c4-console-authz.js +4 -3
  26. package/lib/esm/runtime/c4-console-authz.spec.js +6 -2
  27. package/lib/esm/runtime/to-api-domain.d.ts +25 -0
  28. package/lib/esm/runtime/to-api-domain.js +46 -0
  29. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +5 -5
  30. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +40 -20
  31. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +26 -0
  32. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +3 -2
  33. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +18 -2
  34. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +9 -2
  35. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +1 -1
  36. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +1 -0
  37. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +69 -34
  38. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +142 -0
  39. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +47 -13
  40. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +74 -1
  41. package/lib/esm/widgets/clusters/c4-clusters-page.js +5 -8
  42. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +97 -15
  43. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +2 -1
  44. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +1 -1
  45. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +3 -14
  46. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -1
  47. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +5 -2
  48. package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
  49. package/lib/esm/widgets/group-details/c4-group-details-page.js +35 -26
  50. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +0 -1
  51. package/lib/esm/widgets/is-cluster-reconciliation-paused.d.ts +6 -0
  52. package/lib/esm/widgets/is-cluster-reconciliation-paused.js +54 -0
  53. package/lib/esm/widgets/management/c4-management-app.js +12 -0
  54. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +2 -1
  55. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +33 -27
  56. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.spec.d.ts +1 -0
  57. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.spec.js +246 -0
  58. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  59. package/lib/esm/widgets/user-details/c4-user-details-page.js +42 -67
  60. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +0 -1
  61. package/package.json +16 -16
@@ -303,11 +303,15 @@
303
303
  "status": {
304
304
  "label": "Status",
305
305
  "wakeLabel": "Resume cluster",
306
- "sleepLabel": "Suspend cluster (internal)"
306
+ "sleepLabel": "Suspend cluster (internal)",
307
+ "waitingForInputTooltip": "Waiting for external encryption to be configured"
307
308
  },
308
309
  "title": "Cluster Details",
309
310
  "clusterId": "Cluster Id",
310
311
  "createdAt": "Created at",
312
+ "swaggerUrl": "Swagger UI",
313
+ "openSwaggerUi": "Open Swagger UI",
314
+ "swaggerUiPausedWarning": "Not accessible while the cluster is paused",
311
315
  "provider": "Provider",
312
316
  "region": "Region",
313
317
  "regionId": "Region Id",
@@ -539,6 +543,7 @@
539
543
  "description": "The Orchestration Cluster REST API is documented using the",
540
544
  "spec": "OpenAPI specification",
541
545
  "description2": ". When enabled, it is accessible via Swagger UI.",
546
+ "accessSwagger": "Access your cluster Swagger UI:",
542
547
  "description3": "Learn more about ",
543
548
  "description4": "accessing API endpoints via Swagger UI.",
544
549
  "action": {
@@ -588,6 +593,13 @@
588
593
  "button": {
589
594
  "enable": "Enable",
590
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."
591
603
  }
592
604
  },
593
605
  "tags": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "region": {
38
38
  "title": "Select region",
39
- "description": "To minimze network latency and traffic costs, select your prefered cloud provider and a region near your client application and/or users.",
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
  },
@@ -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
+ }
@@ -10,6 +10,7 @@ export interface C4ConsoleVisibilities {
10
10
  canDelete?: boolean;
11
11
  canUpdateTag?: boolean;
12
12
  canWake?: boolean;
13
+ canSleep?: boolean;
13
14
  canSeeClusterLoad?: boolean;
14
15
  };
15
16
  }
@@ -120,9 +120,10 @@ export function deriveConsoleAuthzFromAccessToken(params) {
120
120
  clusters: {
121
121
  canCreate: canCreateFromOrgPermissions ?? clusters.createOnBehalf,
122
122
  canDelete: canDeleteFromOrgPermissions ?? clusters.canDeleteAllClusters,
123
- // Prefer org-level permissions where available (see useC4ConsoleAuthz).
124
- // This token-scope is kept as a fallback for internal users.
125
- canWake: canWakeFromOrgPermissions ?? clusters.canSendToSleep,
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('does not overgrant cluster mutations from global token permissions when org permissions are read-only', () => {
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(false);
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
+ }
@@ -430,17 +430,16 @@ export const C4ClusterDetailsApp = observer((props) => {
430
430
  },
431
431
  };
432
432
  }
433
- if (hasIdentityIntegration) {
433
+ if (hasIdentityIntegration && !cluster.identityBackendChecksEnabled) {
434
434
  return {
435
- kind: cluster.identityBackendChecksEnabled
436
- ? 'authorizationsEnabled'
437
- : 'authorizationsDisabled',
435
+ kind: 'authorizationsDisabled',
438
436
  onLearnMore: () => {
439
437
  props.onNavigate?.({
440
438
  kind: 'openUrl',
441
439
  url: urls.docs.identityAuthorization,
442
440
  });
443
441
  },
442
+ docsUrl: urls.docs.identityAuthorization,
444
443
  };
445
444
  }
446
445
  return undefined;
@@ -862,10 +861,11 @@ export const C4ClusterDetailsApp = observer((props) => {
862
861
  }
863
862
  return _jsx(_Fragment, {});
864
863
  }
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 }));
864
+ 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
865
  }, [
867
866
  apiConfig,
868
867
  authz.visibilities.clusters?.canEdit,
868
+ authz.visibilities.clusters?.canSleep,
869
869
  authz.visibilities.clusters?.canWake,
870
870
  canManageUsers,
871
871
  cluster,
@@ -4,7 +4,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
- import { BreadcrumbSkeleton, SkeletonText, Stack, TabsSkeleton, } from '@carbon/react';
7
+ import { BreadcrumbSkeleton, Link, SkeletonText, Stack, TabsSkeleton, Tooltip, } from '@carbon/react';
8
+ import { WarningAltFilled } from '@carbon/react/icons/index.esm.js';
8
9
  import { C4PageTemplate } from '../../components/c4-page-template/c4-page-template.js';
9
10
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
10
11
  const breadCrumbWrapperStyles = {
@@ -64,26 +65,40 @@ function buildBanner(opts) {
64
65
  },
65
66
  };
66
67
  }
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
- };
68
+ return undefined;
69
+ }
70
+ function buildAuthorizationsDisabledIndicator(opts) {
71
+ const { banner, t } = opts;
72
+ if (!banner || banner.kind !== 'authorizationsDisabled') {
73
+ return undefined;
77
74
  }
78
- return {
79
- kind: 'warning',
80
- title: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.title', 'Authorizations disabled'),
81
- subtitle: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.subtitle', 'All authenticated users & clients have full access to this cluster’s resources. To restrict access, enable authorizations in the settings.'),
82
- action: {
83
- label: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.actionLabel', 'Learn more about managing authorizations'),
84
- onClick: banner.onLearnMore,
85
- },
86
- };
75
+ const title = safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.title', 'Authorizations disabled');
76
+ const subtitle = safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.subtitle', 'All authenticated users & clients have full access to this cluster’s resources. To restrict access, enable authorizations in the settings.');
77
+ const actionLabel = safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.actionLabel', 'Learn more about managing authorizations');
78
+ return (_jsx("div", { style: {
79
+ '--cds-background-inverse': 'var(--cds-layer)',
80
+ '--cds-text-inverse': 'var(--cds-text-primary)',
81
+ '--cds-link-inverse': 'var(--cds-link-primary)',
82
+ }, children: _jsx(Tooltip, { align: 'bottom-end', autoAlign: true, dropShadow: true, description: _jsxs("span", { style: {
83
+ display: 'block',
84
+ whiteSpace: 'normal',
85
+ maxWidth: '20rem',
86
+ }, children: [subtitle, ' ', _jsx(Link, { href: banner.docsUrl, target: '_blank', rel: 'noopener noreferrer', inline: true, onClick: (event) => {
87
+ if (banner.onLearnMore) {
88
+ event.preventDefault();
89
+ banner.onLearnMore();
90
+ }
91
+ }, children: actionLabel })] }), children: _jsxs("button", { type: 'button', "aria-label": title, style: {
92
+ display: 'inline-flex',
93
+ alignItems: 'center',
94
+ gap: '0.25rem',
95
+ padding: 0,
96
+ border: 0,
97
+ background: 'transparent',
98
+ cursor: 'default',
99
+ color: 'var(--cds-text-secondary)',
100
+ fontSize: 'var(--cds-body-compact-01-font-size)',
101
+ }, children: [_jsx(WarningAltFilled, { size: 16, style: { fill: 'var(--cds-support-caution-major)' } }), title] }) }) }));
87
102
  }
88
103
  export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan, urls, onNavigateToClusters, menu, banner, tabs, }) => {
89
104
  const runtime = useC4ConsoleRuntime();
@@ -95,9 +110,14 @@ export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan,
95
110
  ? safeTranslate(t, 'c4console:clusterDetails.tag.development', 'Development')
96
111
  : '';
97
112
  const bannerProps = buildBanner({ banner, t });
113
+ const authorizationsIndicator = buildAuthorizationsDisabledIndicator({
114
+ banner,
115
+ t,
116
+ });
98
117
  return (_jsx(C4PageTemplate, { loading: loading, banner: bannerProps, header: {
99
118
  title: clusterName ?? '',
100
119
  tag,
120
+ indicator: authorizationsIndicator,
101
121
  menuItems: buildMenuItems({ menu, t }),
102
122
  }, breadcrumbs: {
103
123
  elements: [
@@ -64,4 +64,30 @@ describe('C4ClusterDetailsPage', () => {
64
64
  expect(screen.getByText('Rename')).toBeInTheDocument();
65
65
  expect(screen.getByText('Delete')).toBeInTheDocument();
66
66
  });
67
+ it('renders a condensed indicator for authorizations disabled instead of a banner', () => {
68
+ const onLearnMore = vi.fn();
69
+ const banner = {
70
+ kind: 'authorizationsDisabled',
71
+ onLearnMore,
72
+ docsUrl: 'https://docs.example.com/authorizations',
73
+ };
74
+ renderPage({ banner });
75
+ expect(screen.getByLabelText('Authorizations disabled')).toBeInTheDocument();
76
+ expect(screen.queryByRole('status')).not.toBeInTheDocument();
77
+ });
78
+ it('shows tooltip content with docs link when hovering the authorizations disabled indicator', async () => {
79
+ const onLearnMore = vi.fn();
80
+ const banner = {
81
+ kind: 'authorizationsDisabled',
82
+ onLearnMore,
83
+ docsUrl: 'https://docs.example.com/authorizations',
84
+ };
85
+ renderPage({ banner });
86
+ const indicator = screen.getByLabelText('Authorizations disabled');
87
+ await userEvent.hover(indicator);
88
+ expect(screen.getByText(/All authenticated users & clients have full access to this cluster/)).toBeInTheDocument();
89
+ const docsLink = screen.getByText('Learn more about managing authorizations');
90
+ expect(docsLink).toBeInTheDocument();
91
+ expect(docsLink.closest('a')).toHaveAttribute('href', 'https://docs.example.com/authorizations');
92
+ });
67
93
  });
@@ -4,8 +4,9 @@ export type C4ClusterDetailsPageBanner = {
4
4
  isAlphaGeneration: boolean;
5
5
  onLearnMore: () => void;
6
6
  } | {
7
- kind: 'authorizationsEnabled' | 'authorizationsDisabled';
8
- onLearnMore: () => void;
7
+ kind: 'authorizationsDisabled';
8
+ onLearnMore?: () => void;
9
+ docsUrl: string;
9
10
  };
10
11
  export type C4ClusterDetailsTab = C4TabProps;
11
12
  export interface C4ClusterDetailsPageProps {
@@ -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';
@@ -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 secretName = clientCreatedName || `client-${clientId}`;
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) {
@@ -138,9 +138,15 @@ export const C4ClusterDetailsConnectorSecretsTab = (props) => {
138
138
  }
139
139
  void reloadConnectorSecrets();
140
140
  }, [reloadConnectorSecrets, sseSecretsVersion]);
141
+ // Secrets prefixed with 'CAMUNDA_PROVIDED_' are system-managed and should be
142
+ // shown as protected (hidden) — users cannot reveal, update, or delete them.
141
143
  const secrets = Object.keys(connectorSecretsMap)
142
144
  .sort((a, b) => a.localeCompare(b))
143
- .map((key) => ({ id: key, key }));
145
+ .map((key) => ({
146
+ id: key,
147
+ key,
148
+ isProtected: key.startsWith('CAMUNDA_PROVIDED_'),
149
+ }));
144
150
  const emptyDescription = renderInlineStrong(safeTranslate(t, 'clusterdetails:connectorSecrets.noSecrets.description', 'Create a connector secret to use in your connectors.'));
145
151
  const infoText = renderInlineLink0(safeTranslate(t, 'clusterdetails:connectorSecrets.infoText', 'Learn more about connector secrets in our <0>documentation</0>.'), (label) => (_jsx(Link, { size: 'sm', href: docsUrl ?? '', onClick: (e) => {
146
152
  e.preventDefault();
@@ -169,7 +175,8 @@ export const C4ClusterDetailsConnectorSecretsTab = (props) => {
169
175
  emptyCreateButton: safeTranslate(t, 'clusterdetails:connectorSecrets.noSecrets.button', 'Create secret'),
170
176
  emptyLearnMoreLabel: safeTranslate(t, 'clusterdetails:connectorSecrets.noSecrets.link', 'Learn more'),
171
177
  infoText,
172
- protectedBadge: 'Protected',
178
+ // Label for the badge shown on CAMUNDA_PROVIDED_ secrets
179
+ protectedBadge: safeTranslate(t, 'clusterdetails:connectorSecrets.protectedBadge', 'Hidden'),
173
180
  }, urls: { docs: docsUrl ?? '' }, permissions: {
174
181
  canCreate: connectorSecretsPermissions?.canCreate ?? canMutateCluster,
175
182
  canRead: connectorSecretsPermissions?.canRead ?? canMutateCluster,
@@ -96,7 +96,7 @@ export const C4ClusterDetailsEncryptionTab = (props) => {
96
96
  if (!cluster) {
97
97
  return _jsx(_Fragment, {});
98
98
  }
99
- const clusterRegion = normalizeRegion(cluster?.k8sContext?.region);
99
+ const clusterRegion = normalizeRegion(cluster?.k8sContext?.region ?? cluster?.k8sContext?.name);
100
100
  const backupRegion = normalizeRegion(cluster?.backupRegion);
101
101
  const isDualRegion = Boolean(cluster?.backupRegion?.toLowerCase().includes('dual region'));
102
102
  const primaryEncryptionKeyId = cluster?.primaryEncryptionKeyId ?? null;
@@ -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;