Skip to content

SDX subsystems, services, runtime groups and connections#1313

Open
ikethecoder wants to merge 30 commits intodevfrom
feature/sdx-service
Open

SDX subsystems, services, runtime groups and connections#1313
ikethecoder wants to merge 30 commits intodevfrom
feature/sdx-service

Conversation

@ikethecoder
Copy link
Member

@ikethecoder ikethecoder commented Dec 24, 2025

Closes the following issues:

  • APS-3961
  • APS-3966 Assign SDX Edge Server to Gateway
  • APS-4047
  • APS-4050 Provision new Runtime Group
  • APS-4054
  • APS-4060
  • APS-4214
  • APS-4215

🚀 Feature branch deployment: https://api-services-portal-feature-sdx-service.apps.silver.devops.gov.bc.ca


🚀 Feature branch deployment: https://api-services-portal-feature-sdx-service.apps.silver.devops.gov.bc.ca

@ikethecoder ikethecoder added the WIP Any PRs still in progress label Dec 24, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces SDX (Secure Data Exchange) service functionality to the API Services Portal. The changes add comprehensive support for managing organization subsystems and OpenAPI service specifications through a new API endpoint structure.

Key changes:

  • New SDX v1 API with endpoints for catalog, subsystems, and OAS services
  • Database schema additions for Subsystem and OpenAPISpec entities
  • New "system-owner" role with System.Manage scope for organization-level permissions
  • Refactored namespace creation into a reusable workflow service

Reviewed changes

Copilot reviewed 64 out of 66 changed files in this pull request and generated 43 comments.

Show a summary per file
File Description
src/tsoa-sdx-v1.json Configuration for new SDX v1 API specification and routes
src/lists/Subsystem.js, OpenAPISpec.js New Keystone list definitions for subsystems and OpenAPI specs
src/services/batch/subsystem.ts, oas-service.ts Service layer for subsystem and OAS management
src/services/workflow/openapi-spec-loader.ts Workflow for loading and validating OpenAPI specifications
src/services/workflow/create-namespace.ts Refactored namespace creation into reusable service
src/controllers/sdx/v1/*.ts New SDX API controllers for catalog, subsystems, and services
src/services/org-groups/roles.ts Added system-owner role with System.Manage permissions
src/authz/matrix.csv Updated authorization rules for new entities and roles
local/db/keystone-init.sql Database schema for Subsystem and OpenAPISpec tables
e2e/cypress/tests/21-sdx-api/** Comprehensive E2E tests for new SDX endpoints

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


describe('Subsystem Happy Paths', () => {
it('PUT /organizations/{org}/subsystems', () => {
const { org, gateway, dataset, datasetId, product } = workingData
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable gateway.

Copilot uses AI. Check for mistakes.

describe('Subsystem Happy Paths', () => {
it('PUT /organizations/{org}/subsystems', () => {
const { org, gateway, dataset, datasetId, product } = workingData
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable dataset.

Copilot uses AI. Check for mistakes.

describe('Subsystem Happy Paths', () => {
it('PUT /organizations/{org}/subsystems', () => {
const { org, gateway, dataset, datasetId, product } = workingData
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable product.

Copilot uses AI. Check for mistakes.
})

it('DELETE /organizations/{org}/subsystems/{name}', () => {
const { org, gateway, dataset, datasetId, product } = workingData
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable gateway.

Suggested change
const { org, gateway, dataset, datasetId, product } = workingData
const { org, dataset, datasetId, product } = workingData

Copilot uses AI. Check for mistakes.
})

it('DELETE /organizations/{org}/subsystems/{name}', () => {
const { org, gateway, dataset, datasetId, product } = workingData
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable dataset.

Copilot uses AI. Check for mistakes.
// node dist/test/integrated/gateway-patterns/catalog.js

import { logger } from '../../../logger';
import YAML from 'js-yaml';
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import YAML.

Copilot uses AI. Check for mistakes.
} from '../../../services/keycloak';
import { o } from '../util';
import { GroupMembership } from '@/services/org-groups/types';
import { remove } from 'lodash';
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import remove.

Copilot uses AI. Check for mistakes.
authentication: { item: identity },
});

if (false) {
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is unreachable.

Copilot uses AI. Check for mistakes.
await kc.createOrUpdateGroupAccess(access, ['idir']);
}
if (true) {
if (false) {
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is unreachable.

Copilot uses AI. Check for mistakes.
// const access = await kc.getGroupAccess('databc');
// console.log(JSON.stringify(access, null, 4));
// }
if (false) {
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is unreachable.

Copilot uses AI. Check for mistakes.
@ikethecoder ikethecoder marked this pull request as ready for review January 8, 2026 17:08
@ikethecoder ikethecoder removed the WIP Any PRs still in progress label Jan 8, 2026
Copy link
Contributor

@rustyjux rustyjux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow there's a lot in here!

Generally looks good. A few questions:

  1. Seems like subsystem and oas-service are just there for cataloging; will oas-service be linked up to actual (SDX) services at some stage? oas-service be a child of an SDX service?
  2. For catalog/discovery purposes, do we need a way of linking users/contacts to oas-services (or perhaps subsystems)? Or are we good with oas-service > subsystem > gateway > owners / access managers, which should be accessible with the current path?
  3. Forget about org units? too fickle?

I see mocks haven't been created for the new endpoints but we can add those later if they are deemed necessary for future frontend dev.

Request for changes: A few new test failures have arisen which need addressing - #1328. Only these 3 are expected/acceptable w/ Kong 3 - #1306

I also left one or two comments of significance.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🔔 Friendly reminder: The following reviewers still need to review this PR: @phowells, @Elson9

PS: @sdqdadat

Copy link

@phowells phowells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot to look at here. It would be helpful if there were more in-line comments on the code as well as in-line comments in the PR explaining why you made changes.

@ikethecoder ikethecoder changed the title Feature/sdx service APS-3961, APS-4060 - Subsystems and OAS Services Feb 6, 2026
@ikethecoder ikethecoder changed the title APS-3961, APS-4060 - Subsystems and OAS Services SDX subsystems, services, runtime groups and connections Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants