From 4a8c0d3ed620e4534d913371a40cb99b930c0f82 Mon Sep 17 00:00:00 2001 From: Angelika Schneider Date: Tue, 27 May 2025 08:30:38 +0200 Subject: [PATCH 1/2] Change '/v1/orchestrator/certification_targets/' to '/v1/orchestrator/audit_scopes' --- package-lock.json | 6 +++--- src/lib/api/evaluation.ts | 4 ++-- src/lib/api/orchestrator.ts | 5 +++-- src/routes/(app)/cloud/[id]/compliance/+page.svelte | 2 +- src/routes/(app)/cloud/[id]/compliance/new/+page.svelte | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8521f75..23421fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1925,9 +1925,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "version": "1.0.30001718", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", + "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", "dev": true, "funding": [ { diff --git a/src/lib/api/evaluation.ts b/src/lib/api/evaluation.ts index 0448223..1145b5a 100644 --- a/src/lib/api/evaluation.ts +++ b/src/lib/api/evaluation.ts @@ -34,7 +34,7 @@ export interface EvaluationResult { export async function startEvaluation(auditScope: AuditScope): Promise { const apiUrl = clouditorize( - `/v1/evaluation/evaluate/${auditScope.certificationTargetId}/${auditScope.catalogId}/start` + `/v1/evaluation/evaluate/${auditScope.id}/start` ); return fetch(apiUrl, { @@ -47,7 +47,7 @@ export async function startEvaluation(auditScope: AuditScope): Promise { const apiUrl = clouditorize( - `/v1/evaluation/evaluate/${auditScope.certificationTargetId}/${auditScope.catalogId}/stop` + `/v1/evaluation/evaluate/${auditScope.id}/stop` ); return fetch(apiUrl, { diff --git a/src/lib/api/orchestrator.ts b/src/lib/api/orchestrator.ts index 13d98ad..be2f2ed 100644 --- a/src/lib/api/orchestrator.ts +++ b/src/lib/api/orchestrator.ts @@ -34,6 +34,7 @@ export interface CertificationTarget { } export interface AuditScope { + id: string; certificationTargetId: string; catalogId: string; assuranceLevel?: string; @@ -411,7 +412,7 @@ export async function removeAuditScope( target: AuditScope ): Promise { const apiUrl = clouditorize( - `/v1/orchestrator/certification_targets/${target.certificationTargetId}/audit_scopes/${target.catalogId}` + `/v1/orchestrator/audit_scopes/${target.id}` ); return fetch(apiUrl, { @@ -480,7 +481,7 @@ export async function listAuditScopes( serviceId: string, fetch = window.fetch ): Promise { - const apiUrl = clouditorize(`/v1/orchestrator/certification_targets/${serviceId}/audit_scopes`); + const apiUrl = clouditorize(`/v1/orchestrator/audit_scopes`); return fetch(apiUrl, { method: 'GET', diff --git a/src/routes/(app)/cloud/[id]/compliance/+page.svelte b/src/routes/(app)/cloud/[id]/compliance/+page.svelte index efbc315..3d14287 100644 --- a/src/routes/(app)/cloud/[id]/compliance/+page.svelte +++ b/src/routes/(app)/cloud/[id]/compliance/+page.svelte @@ -46,7 +46,7 @@ await removeAuditScope(e.detail.auditScope); // refresh our ToEs - invalidate((url) => url.pathname == `/v1/orchestrator/certification_targets/${data.service.id}/audit_scopes`); + invalidate((url) => url.pathname == `/v1/orchestrator/audit_scopes`); } diff --git a/src/routes/(app)/cloud/[id]/compliance/new/+page.svelte b/src/routes/(app)/cloud/[id]/compliance/new/+page.svelte index 41b453e..8958ec1 100644 --- a/src/routes/(app)/cloud/[id]/compliance/new/+page.svelte +++ b/src/routes/(app)/cloud/[id]/compliance/new/+page.svelte @@ -27,7 +27,7 @@ await Promise.all(auditScopes.map((auditScope) => startEvaluation(auditScope))); await invalidate( - (url) => url.pathname === `/v1/orchestrator/certification_targets/${data.service.id}/audit_scopes` + (url) => url.pathname === `/v1/orchestrator/audit_scopes` ); goto('../'); } From c08d4b78ba20d56649d10c972283bfe8fc6f44d7 Mon Sep 17 00:00:00 2001 From: Angelika Schneider Date: Tue, 27 May 2025 08:49:34 +0200 Subject: [PATCH 2/2] Rename Certification Target to Target of Evaluation --- src/lib/api/orchestrator.ts | 76 +++++++++---------- .../components/CatalogComplianceItem.svelte | 2 +- src/lib/components/ComplianceChart.svelte | 2 +- src/lib/components/Sidebar.svelte | 6 +- src/lib/components/Wizard.svelte | 12 +-- src/lib/components/WizardStepCatalog.svelte | 2 +- src/lib/components/WizardStepSave.svelte | 6 +- src/routes/(app)/+layout.ts | 4 +- src/routes/(app)/cloud/+page.svelte | 12 +-- src/routes/(app)/cloud/[id]/+layout.svelte | 6 +- src/routes/(app)/cloud/[id]/+layout.ts | 4 +- src/routes/(app)/cloud/[id]/+page.ts | 2 +- .../(app)/cloud/[id]/activity/+page.svelte | 2 +- src/routes/(app)/cloud/[id]/activity/+page.ts | 4 +- .../(app)/cloud/[id]/assessments/+page.ts | 4 +- .../(app)/cloud/[id]/resources/+page.svelte | 2 +- .../(app)/cloud/[id]/resources/+page.ts | 4 +- src/routes/(app)/cloud/new/+page.svelte | 18 ++--- src/routes/(marketing)/about/+layout.svelte | 4 +- 19 files changed, 86 insertions(+), 86 deletions(-) diff --git a/src/lib/api/orchestrator.ts b/src/lib/api/orchestrator.ts index be2f2ed..1f4981a 100644 --- a/src/lib/api/orchestrator.ts +++ b/src/lib/api/orchestrator.ts @@ -22,7 +22,7 @@ export interface Tag { tag: object; } -export interface CertificationTarget { +export interface TargetOfEvaluation { id: string; name: string; description?: string; @@ -35,14 +35,14 @@ export interface CertificationTarget { export interface AuditScope { id: string; - certificationTargetId: string; + targetOfEvaluationId: string; catalogId: string; assuranceLevel?: string; controlsInScope?: Control[]; } export interface ControlInScope { - auditScopeCertificationTargetId: string; + auditScopeTargetOfEvaluationId: string; auditScopeCatalogId: string; controlId: string; controlCategoryName: string; @@ -105,7 +105,7 @@ export interface ListMetricConfigurationsResponse { export interface Certificate { id: string; name: string; - certificationTargetId: string; + targetOfEvaluationId: string; issueDate: string; expirationDate: string; standard: string; @@ -139,8 +139,8 @@ export interface ListAssessmentResultsResponse { results: AssessmentResult[]; } -export interface ListCertificationTargetsResponse { - targets: CertificationTarget[]; +export interface ListTargetsOfEvaluationResponse { + targets: TargetOfEvaluation[]; } export interface ListAuditScopesResponse { @@ -203,12 +203,12 @@ export async function listAssessmentResults( * * @returns an array of {@link AssessmentResult}s. */ -export async function listCertificationTargetAssessmentResults( +export async function listTargetOfEvaluationAssessmentResults( serviceId: string, fetch = window.fetch ): Promise { const apiUrl = clouditorize( - `/v1/orchestrator/assessment_results?pageSize=1000&filter.certificationTargetId=${serviceId}&orderBy=timestamp&asc=false` + `/v1/orchestrator/assessment_results?pageSize=1000&filter.targetOfEvaluationId=${serviceId}&orderBy=timestamp&asc=false` ); return fetch(apiUrl, { @@ -271,7 +271,7 @@ export async function getMetricImplementation(id: string): Promise { const apiUrl = clouditorize( - `/v1/orchestrator/certification_targets/${serviceId}/metric_configurations/${metricId}` + `/v1/orchestrator/targets_of_evaluation/${serviceId}/metric_configurations/${metricId}` ); return fetch(apiUrl, { @@ -306,7 +306,7 @@ export async function listMetricConfigurations( serviceId: string, skipDefault = false ): Promise> { - const apiUrl = clouditorize(`/v1/orchestrator/certification_targets/${serviceId}/metric_configurations`); + const apiUrl = clouditorize(`/v1/orchestrator/targets_of_evaluation/${serviceId}/metric_configurations`); return fetch(apiUrl, { method: 'GET', @@ -330,10 +330,10 @@ export async function listMetricConfigurations( } /** - * Creates a new certification target + * Creates a new target of evaluation */ -export async function registerCertificationTarget(service: CertificationTarget): Promise { - const apiUrl = clouditorize(`/v1/orchestrator/certification_targets`); +export async function registerTargetOfEvaluation(service: TargetOfEvaluation): Promise { + const apiUrl = clouditorize(`/v1/orchestrator/targets_of_evaluation`); return fetch(apiUrl, { method: 'POST', @@ -344,16 +344,16 @@ export async function registerCertificationTarget(service: CertificationTarget): }) .then(throwError) .then((res) => res.json()) - .then((response: CertificationTarget) => { + .then((response: TargetOfEvaluation) => { return response; }); } /** - * Removes a certification target. + * Removes a target of evaluation. */ -export async function removeCertificationTarget(targetId: string): Promise { - const apiUrl = clouditorize(`/v1/orchestrator/certification_targets/${targetId}`); +export async function removeTargetOfEvaluation(targetId: string): Promise { + const apiUrl = clouditorize(`/v1/orchestrator/targets_of_evaluation/${targetId}`); return fetch(apiUrl, { method: 'DELETE', @@ -366,12 +366,12 @@ export async function removeCertificationTarget(targetId: string): Promise } /** - * Retrieves a list of certification targets from the orchestrator service. + * Retrieves a list of targets of evaluation from the orchestrator service. * - * @returns an array of {@link CertificationTarget}s. + * @returns an array of {@link TargetOfEvaluation}s. */ -export async function listCertificationTargets(fetch = window.fetch): Promise { - const apiUrl = clouditorize(`/v1/orchestrator/certification_targets`); +export async function listTargetsOfEvaluation(fetch = window.fetch): Promise { + const apiUrl = clouditorize(`/v1/orchestrator/targets_of_evaluation`); return fetch(apiUrl, { method: 'GET', @@ -381,7 +381,7 @@ export async function listCertificationTargets(fetch = window.fetch): Promise res.json()) - .then((response: ListCertificationTargetsResponse) => { + .then((response: ListTargetsOfEvaluationResponse) => { return response.targets; }); } @@ -434,7 +434,7 @@ export async function addControlToScope( fetch = window.fetch ): Promise { const apiUrl = clouditorize( - `/v1/orchestrator/certification_targets/${scope.auditScopeCertificationTargetId}/audit_scopes/${scope.auditScopeCatalogId}/controls_in_scope` + `/v1/orchestrator/targets_of_evaluation/${scope.auditScopeTargetOfEvaluationId}/audit_scopes/${scope.auditScopeCatalogId}/controls_in_scope` ); return fetch(apiUrl, { @@ -459,7 +459,7 @@ export async function removeControlFromScope( fetch = window.fetch ): Promise { const apiUrl = clouditorize( - `/v1/orchestrator/certification_targets/${scope.auditScopeCertificationTargetId}/audit_scopes/${scope.auditScopeCatalogId}/controls_in_scope/categories/${scope.controlCategoryName}/controls/${scope.controlId}` + `/v1/orchestrator/targets_of_evaluation/${scope.auditScopeTargetOfEvaluationId}/audit_scopes/${scope.auditScopeCatalogId}/controls_in_scope/categories/${scope.controlCategoryName}/controls/${scope.controlId}` ); return fetch(apiUrl, { @@ -507,7 +507,7 @@ export async function listControlsInScope( fetch = window.fetch ): Promise { const apiUrl = clouditorize( - `/v1/orchestrator/certification_targets/${serviceId}/audit_scopes/${catalogId}/controls_in_scope?pageSize=1500&orderBy=control_id&asc=true` + `/v1/orchestrator/targets_of_evaluation/${serviceId}/audit_scopes/${catalogId}/controls_in_scope?pageSize=1500&orderBy=control_id&asc=true` ); return fetch(apiUrl, { @@ -606,12 +606,12 @@ export async function listControls( } /** - * Retrieve a certification target from the orchestrator service using its ID. + * Retrieve a target of evaluation from the orchestrator service using its ID. * - * @returns the certification target + * @returns the target of evaluation */ -export async function getCertificationTarget(id: string, fetch = window.fetch): Promise { - const apiUrl = clouditorize(`/v1/orchestrator/certification_targets/${id}`); +export async function getTargetOfEvaluation(id: string, fetch = window.fetch): Promise { + const apiUrl = clouditorize(`/v1/orchestrator/targets_of_evaluation/${id}`); return fetch(apiUrl, { method: 'GET', @@ -623,11 +623,11 @@ export async function getCertificationTarget(id: string, fetch = window.fetch): .then((res) => res.json()); } -export async function updateCertificationTarget( - service: CertificationTarget, +export async function updateTargetOfEvaluation( + service: TargetOfEvaluation, fetch = window.fetch -): Promise { - const apiUrl = clouditorize(`/v1/orchestrator/certification_targets/${service.id}`); +): Promise { + const apiUrl = clouditorize(`/v1/orchestrator/targets_of_evaluation/${service.id}`); return fetch(apiUrl, { method: 'PUT', @@ -638,7 +638,7 @@ export async function updateCertificationTarget( }) .then(throwError) .then((res) => res.json()) - .then((response: CertificationTarget) => { + .then((response: TargetOfEvaluation) => { return response; }); } @@ -646,9 +646,9 @@ export async function updateCertificationTarget( export async function updateControlInScope( scope: ControlInScope, fetch = window.fetch -): Promise { +): Promise { const apiUrl = clouditorize( - `/v1/orchestrator/certification_targets/${scope.auditScopeCertificationTargetId}/audit_scopes/${scope.auditScopeCatalogId}/controls_in_scope/categories/${scope.controlCategoryName}/controls/${scope.controlId}` + `/v1/orchestrator/targets_of_evaluation/${scope.auditScopeTargetOfEvaluationId}/audit_scopes/${scope.auditScopeCatalogId}/controls_in_scope/categories/${scope.controlCategoryName}/controls/${scope.controlId}` ); return fetch(apiUrl, { @@ -660,7 +660,7 @@ export async function updateControlInScope( }) .then(throwError) .then((res) => res.json()) - .then((response: CertificationTarget) => { + .then((response: TargetOfEvaluation) => { return response; }); } diff --git a/src/lib/components/CatalogComplianceItem.svelte b/src/lib/components/CatalogComplianceItem.svelte index b7cf7be..1aa10d5 100644 --- a/src/lib/components/CatalogComplianceItem.svelte +++ b/src/lib/components/CatalogComplianceItem.svelte @@ -26,7 +26,7 @@
  • - +
    {catalog.name}
    {catalog.description}
    diff --git a/src/lib/components/ComplianceChart.svelte b/src/lib/components/ComplianceChart.svelte index 87385d2..b9fbbd0 100644 --- a/src/lib/components/ComplianceChart.svelte +++ b/src/lib/components/ComplianceChart.svelte @@ -63,7 +63,7 @@ params.append('status', s); } - goto(`/cloud/${auditScope.certificationTargetId}/compliance/${auditScope.catalogId}?${params.toString()}`); + goto(`/cloud/${auditScope.targetOfEvaluationId}/compliance/${auditScope.catalogId}?${params.toString()}`); } }; }); diff --git a/src/lib/components/Sidebar.svelte b/src/lib/components/Sidebar.svelte index 8888468..f1c1290 100644 --- a/src/lib/components/Sidebar.svelte +++ b/src/lib/components/Sidebar.svelte @@ -1,5 +1,5 @@
    - This page provides an overview of all configured certification targets within Clouditor. Click on the - name of a certification target to display more information about it. + This page provides an overview of all configured targets of evaluation within Clouditor. Click on the + name of a target of evaluation to display more information about it.
      diff --git a/src/routes/(app)/cloud/[id]/+layout.svelte b/src/routes/(app)/cloud/[id]/+layout.svelte index a831e08..04b4abf 100644 --- a/src/routes/(app)/cloud/[id]/+layout.svelte +++ b/src/routes/(app)/cloud/[id]/+layout.svelte @@ -1,6 +1,6 @@ diff --git a/src/routes/(app)/cloud/[id]/+layout.ts b/src/routes/(app)/cloud/[id]/+layout.ts index 5309239..5dc50dd 100644 --- a/src/routes/(app)/cloud/[id]/+layout.ts +++ b/src/routes/(app)/cloud/[id]/+layout.ts @@ -1,4 +1,4 @@ -import { getCertificationTarget } from '$lib/api/orchestrator'; +import { getTargetOfEvaluation } from '$lib/api/orchestrator'; import { error } from '@sveltejs/kit'; import type { LayoutLoad } from './$types'; import { listResources } from '$lib/api/discovery'; @@ -8,7 +8,7 @@ export const load = (async ({ fetch, params }) => { throw error(405, 'Required parameter missing'); } - const service = await getCertificationTarget(params.id, fetch); + const service = await getTargetOfEvaluation(params.id, fetch); // TODO: replace with statistics endpoint to avoid slow loading of resource data const resources = await listResources(service.id, '', fetch); diff --git a/src/routes/(app)/cloud/[id]/+page.ts b/src/routes/(app)/cloud/[id]/+page.ts index b5f15c9..08a8e2a 100644 --- a/src/routes/(app)/cloud/[id]/+page.ts +++ b/src/routes/(app)/cloud/[id]/+page.ts @@ -6,7 +6,7 @@ export const load = (async ({ params }) => { throw error(405, 'Required parameter missing'); } - // In case someone access the "root" of a certification target, we redirect him to + // In case someone access the "root" of a target of evaluation, we redirect him to // the activity view throw redirect(301, '/cloud/' + params.id + '/activity'); }) satisfies PageLoad; diff --git a/src/routes/(app)/cloud/[id]/activity/+page.svelte b/src/routes/(app)/cloud/[id]/activity/+page.svelte index 3eeabca..23ea3a3 100644 --- a/src/routes/(app)/cloud/[id]/activity/+page.svelte +++ b/src/routes/(app)/cloud/[id]/activity/+page.svelte @@ -44,7 +44,7 @@ const date = new Date(data.service.createdAt); timeline.push({ - content: 'Created certification target', + content: 'Created target of evaluation', target: data.service.name, href: '/cloud/' + data.service.id, date: formatDate(date), diff --git a/src/routes/(app)/cloud/[id]/activity/+page.ts b/src/routes/(app)/cloud/[id]/activity/+page.ts index e8f4a45..3abadcf 100644 --- a/src/routes/(app)/cloud/[id]/activity/+page.ts +++ b/src/routes/(app)/cloud/[id]/activity/+page.ts @@ -1,4 +1,4 @@ -import { listCertificationTargetAssessmentResults } from '$lib/api/orchestrator'; +import { listTargetOfEvaluationAssessmentResults } from '$lib/api/orchestrator'; import { error } from '@sveltejs/kit'; import type { PageLoad } from './$types'; @@ -7,7 +7,7 @@ export const load = (async ({ fetch, params }) => { throw error(405, 'Required parameter missing'); } - const results = await listCertificationTargetAssessmentResults(params.id, fetch); + const results = await listTargetOfEvaluationAssessmentResults(params.id, fetch); return { results: results diff --git a/src/routes/(app)/cloud/[id]/assessments/+page.ts b/src/routes/(app)/cloud/[id]/assessments/+page.ts index 914f441..b991005 100644 --- a/src/routes/(app)/cloud/[id]/assessments/+page.ts +++ b/src/routes/(app)/cloud/[id]/assessments/+page.ts @@ -1,4 +1,4 @@ -import { listCertificationTargetAssessmentResults } from '$lib/api/orchestrator'; +import { listTargetOfEvaluationAssessmentResults } from '$lib/api/orchestrator'; import { error } from '@sveltejs/kit'; @@ -12,7 +12,7 @@ export const load = (async ({ fetch, params, url }) => { const filterIds = url.searchParams.get('filterIds')?.split(',') ?? []; const filterResourceId = url.searchParams.get('filterResourceId'); const page = Number(url.searchParams.get('page')); - const results = await listCertificationTargetAssessmentResults(params.id, fetch); + const results = await listTargetOfEvaluationAssessmentResults(params.id, fetch); return { filterIds, diff --git a/src/routes/(app)/cloud/[id]/resources/+page.svelte b/src/routes/(app)/cloud/[id]/resources/+page.svelte index 691a597..c70c682 100644 --- a/src/routes/(app)/cloud/[id]/resources/+page.svelte +++ b/src/routes/(app)/cloud/[id]/resources/+page.svelte @@ -144,7 +144,7 @@ {#if data.resources.length == 0} - Clouditor Discovery with with the certification target ID
      {data.service.id}
      + Clouditor Discovery with with the target of evaluation ID
      {data.service.id}
      {:else} diff --git a/src/routes/(app)/cloud/[id]/resources/+page.ts b/src/routes/(app)/cloud/[id]/resources/+page.ts index 8d4d9b1..7b95fff 100644 --- a/src/routes/(app)/cloud/[id]/resources/+page.ts +++ b/src/routes/(app)/cloud/[id]/resources/+page.ts @@ -1,4 +1,4 @@ -import { listCertificationTargetAssessmentResults } from '$lib/api/orchestrator'; +import { listTargetOfEvaluationAssessmentResults } from '$lib/api/orchestrator'; import { error } from '@sveltejs/kit'; @@ -10,7 +10,7 @@ export const load = (async ({ fetch, params, url }) => { throw error(405, 'Required parameter missing'); } - const results = await listCertificationTargetAssessmentResults(params.id, fetch); + const results = await listTargetOfEvaluationAssessmentResults(params.id, fetch); const edges = await listGraphEdges(); const page = Number(url.searchParams.get('page')); diff --git a/src/routes/(app)/cloud/new/+page.svelte b/src/routes/(app)/cloud/new/+page.svelte index f7e161d..13ed48e 100644 --- a/src/routes/(app)/cloud/new/+page.svelte +++ b/src/routes/(app)/cloud/new/+page.svelte @@ -1,6 +1,6 @@