Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions services/bin/octobus-tentacles.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ const services = {
entryFile: "../skycloud__inet/bin/skycloud-inet.js",
serviceModule: "../skycloud__inet/src/service.js",
},
"tencent-dsgc": {
entryFile: "../tencent__dsgc/bin/tencent-dsgc.js",
serviceModule: "../tencent__dsgc/src/service.js",
},
"tencent-qyweixin-group-robot": {
entryFile: "../tencent__qyweixin-group-robot/bin/tencent-qyweixin-group-robot.js",
serviceModule: "../tencent__qyweixin-group-robot/src/service.js",
Expand Down
10 changes: 10 additions & 0 deletions services/bin/tencent-dsgc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env node

import { fileURLToPath } from "node:url";
import { runServiceMain } from "@chaitin-ai/octobus-sdk";

import { service } from "../tencent__dsgc/src/service.js";

await runServiceMain(service, {
entryFile: fileURLToPath(new URL("../tencent__dsgc/bin/tencent-dsgc.js", import.meta.url)),
});
3 changes: 3 additions & 0 deletions services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"sangfor-xdr-v2-0-45": "bin/sangfor-xdr-v2-0-45.js",
"skycloud-inet": "bin/skycloud-inet.js",
"slack-group-robot": "bin/slack-group-robot.js",
"tencent-dsgc": "bin/tencent-dsgc.js",
"tencent-qyweixin-group-robot": "bin/tencent-qyweixin-group-robot.js",
"tencent-tix-saas": "bin/tencent-tix-saas.js",
"tencent-tsec-v2-5-1": "bin/tencent-tsec-v2-5-1.js",
Expand Down Expand Up @@ -111,6 +112,7 @@
"bin/sangfor-xdr-v2-0-45.js",
"bin/tencent-qyweixin-group-robot.js",
"bin/tencent-tix-saas.js",
"bin/tencent-dsgc.js",
"bin/tencent-tsec-v2-5-1.js",
"bin/telegram-bot-api.js",
"bin/threatbook-cloudapi-v3.js",
Expand Down Expand Up @@ -171,6 +173,7 @@
"chaitin__safeline-waf",
"sangfor__fw_v8-0-45",
"sangfor__xdr_v2-0-45",
"tencent__dsgc",
"tencent__qyweixin-group-robot",
"tencent__tix-saas",
"tencent__tsec_v2-5-1",
Expand Down
22 changes: 22 additions & 0 deletions services/tencent__dsgc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Tencent Cloud DSGC OctoBus Service

## Verified OctoBus Surface

This service package intentionally exposes only `ListDSPAClusters` in proto/rpcdef because this is the RPC currently covered by real OctoBus Connect evidence. Other vendor APIs are not exposed until matching OctoBus runtime evidence is added.

## Configuration

Use the service `config.schema.json` and `secret.schema.json` files for required endpoint, region, and credential fields. Secrets must be supplied at runtime and are not stored in this package.

## Evidence

- OctoBus Connect evidence: `docs/evidence/octobus-connect-evidence.md`
- Manual terminal screenshot: `docs/evidence/manual-octobus-connect-evidence.png`

## Tests

Run the service test with Node.js from the repository or service worktree:

```bash
node --test test/*.test.js
```
10 changes: 10 additions & 0 deletions services/tencent__dsgc/bin/tencent-dsgc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env node

import { fileURLToPath } from 'node:url';
import { runServiceMain } from '@chaitin-ai/octobus-sdk';

import { service } from '../src/service.js';

await runServiceMain(service, {
entryFile: fileURLToPath(import.meta.url),
});
43 changes: 43 additions & 0 deletions services/tencent__dsgc/config.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"properties": {
"endpoint": {
"type": "string",
"default": "https://dsgc.tencentcloudapi.com",
"description": "Tencent Cloud DSGC API endpoint."
},
"host": {
"type": "string",
"description": "Alias for endpoint."
},
"region": {
"type": "string",
"default": "ap-guangzhou",
"description": "Tencent Cloud region used in X-TC-Region."
},
"version": {
"type": "string",
"default": "2019-07-23",
"description": "Tencent Cloud DSGC API version."
},
"language": {
"type": "string",
"description": "Optional X-TC-Language value, such as zh-CN or en-US."
},
"timeoutMs": {
"type": "integer",
"minimum": 1,
"default": 5000,
"description": "HTTP request timeout in milliseconds."
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Optional extra HTTP headers."
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions services/tencent__dsgc/docs/evidence/octobus-connect-evidence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# OctoBus Connect Evidence

Recorded from an actual local OctoBus connect run on 2026-06-27. Secrets, signatures, account IDs, instance IDs, and request IDs are redacted.

## Exposed Interface Scope

This service package now exposes only the OctoBus Connect verified RPC `ListDSPAClusters` in proto/rpcdef. Other vendor APIs are intentionally left out of proto/rpcdef until corresponding OctoBus runtime evidence is added.


## Setup

```text
octobus serve
octobus service import tencent-dsgc services/tencent__dsgc
octobus instance create tencent-dsgc-live --service tencent-dsgc --config-json '{"region":"ap-guangzhou","timeoutMs":10000}' --secret-json '<redacted>'
octobus capset create cap --name cap
octobus capset add-instance cap tencent-dsgc-live
```

## ListDSPAClusters

### Request

```http
POST http://127.0.0.1:19123/capsets/cap/connect/tencent-dsgc-live/Tencent_DSGC.TencentDsgcService/ListDSPAClusters
Content-Type: application/json

{"limit":1}
```

### Response

```http
HTTP/1.1 200 OK
Content-Type: application/json
```

```json
{
"action": "ListDSPAClusters",
"requestId": "<redacted-request-id>",
"totalCount": "1",
"items": [
{
"AppId": "<redacted-app-id>",
"Channel": "dsgc",
"CosBindCount": 0,
"CosQuotaUnit": "GB",
"CosTotalQuota": 1,
"DBAuthCount": 0,
"DbTotalQuota": 2,
"DspaDescription": "free edition",
"DspaId": "<redacted-dspa-id>",
"DspaName": "<redacted-dspa-name>",
"InsAuthCount": 0,
"InsTotalQuota": 2,
"InstanceVersion": "free",
"Status": "enabled"
}
],
"response": {
"DenyAll": false,
"InstanceList": [
{
"AppId": "<redacted-app-id>",
"Channel": "dsgc",
"CosBindCount": 0,
"CosQuotaUnit": "GB",
"CosTotalQuota": 1,
"DBAuthCount": 0,
"DbTotalQuota": 2,
"DspaDescription": "free edition",
"DspaId": "<redacted-dspa-id>",
"DspaName": "<redacted-dspa-name>",
"InsAuthCount": 0,
"InsTotalQuota": 2,
"InstanceVersion": "free",
"Status": "enabled"
}
],
"RequestId": "<redacted-request-id>",
"TotalCount": 1
}
}
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions services/tencent__dsgc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@chaitin-ai/octobus-service-tencent-dsgc",
"version": "0.1.0",
"private": true,
"type": "module",
"bin": {
"tencent-dsgc": "bin/tencent-dsgc.js"
},
"dependencies": {
"@chaitin-ai/octobus-sdk": "^0.5.0"
}
}
35 changes: 35 additions & 0 deletions services/tencent__dsgc/proto/tencent_dsgc.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
syntax = "proto3";

package Tencent_DSGC;

import "google/protobuf/struct.proto";

option go_package = "miner/grpc-service/Tencent_DSGC";

service TencentDsgcService {
// Query DSGC cluster list, calls ListDSPAClusters.
rpc ListDSPAClusters(TencentCloudQueryRequest) returns (TencentCloudListResponse) {}
}

message TencentCloudQueryRequest {
google.protobuf.Struct params = 1;
int64 offset = 2;
int64 limit = 3;
}


message TencentCloudActionResponse {
string action = 1;
string request_id = 2;
google.protobuf.Struct response = 3;
google.protobuf.Struct raw = 4;
}

message TencentCloudListResponse {
string action = 1;
string request_id = 2;
int64 total_count = 3;
repeated google.protobuf.Struct items = 4;
google.protobuf.Struct response = 5;
google.protobuf.Struct raw = 6;
}
27 changes: 27 additions & 0 deletions services/tencent__dsgc/secret.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"properties": {
"secretId": {
"type": "string",
"description": "Tencent Cloud API SecretId."
},
"secret_id": {
"type": "string",
"description": "Alias for secretId."
},
"secretKey": {
"type": "string",
"description": "Tencent Cloud API SecretKey."
},
"secret_key": {
"type": "string",
"description": "Alias for secretKey."
},
"token": {
"type": "string",
"description": "Optional temporary security token, sent as X-TC-Token."
}
}
}
29 changes: 29 additions & 0 deletions services/tencent__dsgc/service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"schema": "chaitin.octobus.service.v1",
"name": "tencent-dsgc",
"displayName": "Tencent Cloud DSGC",
"description": "OctoBus package for Tencent Cloud Data Security Governance Center API 3.0 read-only operations.",
"runtime": {
"mode": "long-running"
},
"proto": {
"roots": [
"proto"
],
"files": [
"proto/tencent_dsgc.proto"
]
},
"configSchema": "config.schema.json",
"secretSchema": "secret.schema.json",
"sdk": {
"cli": {
"commands": {
"Tencent_DSGC.TencentDsgcService/ListDSPAClusters": {
"name": "list-dspa-clusters",
"description": "Query Tencent Cloud DSGC DSPA clusters."
}
}
}
}
}
7 changes: 7 additions & 0 deletions services/tencent__dsgc/src/service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineService } from '@chaitin-ai/octobus-sdk';

import { handlers } from './tencent-dsgc.js';

export { handlers } from './tencent-dsgc.js';

export const service = defineService({ handlers });
Loading
Loading