Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

tests: name external KMS and GitHub org sync routes for the blackbox client

Claudead902a0ded0e
diff --git a/backend/src/ee/routes/v1/external-kms-router.ts b/backend/src/ee/routes/v1/external-kms-router.ts
index 72aefc3271..fbcd2e84d2 100644
--- a/backend/src/ee/routes/v1/external-kms-router.ts
+++ b/backend/src/ee/routes/v1/external-kms-router.ts
@@ -61,6 +61,7 @@ export const registerExternalKmsRouter = async (server: FastifyZodProvider) => {
rateLimit: writeLimit
},
schema: {
+ operationId: "createExternalKms",
body: z.object({
name: z.string().min(1).trim().toLowerCase(),
description: z.string().trim().optional(),
@@ -109,6 +110,7 @@ export const registerExternalKmsRouter = async (server: FastifyZodProvider) => {
rateLimit: writeLimit
},
schema: {
+ operationId: "updateExternalKms",
params: z.object({
id: z.string().trim().min(1)
}),
@@ -161,6 +163,7 @@ export const registerExternalKmsRouter = async (server: FastifyZodProvider) => {
rateLimit: writeLimit
},
schema: {
+ operationId: "deleteExternalKms",
params: z.object({
id: z.string().trim().min(1)
}),
@@ -203,6 +206,7 @@ export const registerExternalKmsRouter = async (server: FastifyZodProvider) => {
rateLimit: readLimit
},
schema: {
+ operationId: "getExternalKmsById",
params: z.object({
id: z.string().trim().min(1)
}),
@@ -245,6 +249,7 @@ export const registerExternalKmsRouter = async (server: FastifyZodProvider) => {
rateLimit: readLimit
},
schema: {
+ operationId: "listExternalKms",
response: {
200: z.object({
externalKmsList: sanitizedExternalSchemaForGetAll
@@ -270,6 +275,7 @@ export const registerExternalKmsRouter = async (server: FastifyZodProvider) => {
rateLimit: readLimit
},
schema: {
+ operationId: "getExternalKmsByName",
params: z.object({
name: z.string().trim().min(1)
}),
diff --git a/backend/src/ee/routes/v1/external-kms-routers/external-kms-endpoints.ts b/backend/src/ee/routes/v1/external-kms-routers/external-kms-endpoints.ts
index a5e3e604b8..0e54c4faf1 100644
--- a/backend/src/ee/routes/v1/external-kms-routers/external-kms-endpoints.ts
+++ b/backend/src/ee/routes/v1/external-kms-routers/external-kms-endpoints.ts
@@ -41,6 +41,8 @@ export const registerExternalKmsEndpoints = <
createSchema: z.ZodType<T["inputs"]>;
updateSchema: z.ZodType<Partial<T["inputs"]>>;
}) => {
+ const providerNameForOpId = provider.charAt(0).toUpperCase() + provider.slice(1);
+
server.route({
method: "GET",
url: "/:id",
@@ -48,6 +50,7 @@ export const registerExternalKmsEndpoints = <
rateLimit: readLimit
},
schema: {
+ operationId: `get${providerNameForOpId}ExternalKms`,
params: z.object({
id: z.string().trim().min(1)
}),
@@ -106,6 +109,7 @@ export const registerExternalKmsEndpoints = <
rateLimit: writeLimit
},
schema: {
+ operationId: `create${providerNameForOpId}ExternalKms`,
body: z.object({
name: z.string().min(1).trim().toLowerCase(),
description: z.string().trim().optional(),
@@ -174,6 +178,7 @@ export const registerExternalKmsEndpoints = <
rateLimit: writeLimit
},
schema: {
+ operationId: `update${providerNameForOpId}ExternalKms`,
params: z.object({
id: z.string().trim().min(1)
}),
@@ -246,6 +251,7 @@ export const registerExternalKmsEndpoints = <
rateLimit: writeLimit
},
schema: {
+ operationId: `delete${providerNameForOpId}ExternalKms`,
params: z.object({
id: z.string().trim().min(1)
}),
diff --git a/backend/src/ee/routes/v1/github-org-sync-router.ts b/backend/src/ee/routes/v1/github-org-sync-router.ts
index 67ab38cc39..ef92a63c4f 100644
--- a/backend/src/ee/routes/v1/github-org-sync-router.ts
+++ b/backend/src/ee/routes/v1/github-org-sync-router.ts
@@ -27,6 +27,7 @@ export const registerGithubOrgSyncRouter = async (server: FastifyZodProvider) =>
},
onRequest: verifyAuth([AuthMode.JWT]),
schema: {
+ operationId: "createGithubOrgSyncConfig",
body: z.object({
githubOrgName: GithubOrgNameCreateSchema,
githubOrgAccessToken: z.string().trim().max(1000).optional(),
@@ -67,6 +68,7 @@ export const registerGithubOrgSyncRouter = async (server: FastifyZodProvider) =>
},
onRequest: verifyAuth([AuthMode.JWT]),
schema: {
+ operationId: "updateGithubOrgSyncConfig",
body: z
.object({
githubOrgName: GithubOrgNamePatchSchema,
@@ -112,6 +114,7 @@ export const registerGithubOrgSyncRouter = async (server: FastifyZodProvider) =>
},
onRequest: verifyAuth([AuthMode.JWT]),
schema: {
+ operationId: "deleteGithubOrgSyncConfig",
response: {
200: z.object({
githubOrgSyncConfig: SanitizedGithubOrgSyncSchema
@@ -146,6 +149,7 @@ export const registerGithubOrgSyncRouter = async (server: FastifyZodProvider) =>
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.OAUTH]),
schema: {
+ operationId: "getGithubOrgSyncConfig",
response: {
200: z.object({
githubOrgSyncConfig: SanitizedGithubOrgSyncSchema
@@ -169,6 +173,7 @@ export const registerGithubOrgSyncRouter = async (server: FastifyZodProvider) =>
},
onRequest: verifyAuth([AuthMode.JWT]),
schema: {
+ operationId: "syncAllGithubOrgTeams",
response: {
200: z.object({
totalUsers: z.number(),
diff --git a/tests/clients/api/oapi-codegen.yaml b/tests/clients/api/oapi-codegen.yaml
index 8b56abf4b1..291203112d 100644
--- a/tests/clients/api/oapi-codegen.yaml
+++ b/tests/clients/api/oapi-codegen.yaml
@@ -702,3 +702,25 @@ output-options:
- createLdapGroupMap
- deleteLdapGroupMap
- testLdapConnection
+ - createExternalKms
+ - updateExternalKms
+ - deleteExternalKms
+ - getExternalKmsById
+ - listExternalKms
+ - getExternalKmsByName
+ - createAwsExternalKms
+ - getAwsExternalKms
+ - updateAwsExternalKms
+ - deleteAwsExternalKms
+ - createGithubOrgSyncConfig
+ - updateGithubOrgSyncConfig
+ - deleteGithubOrgSyncConfig
+ - getGithubOrgSyncConfig
+ - syncAllGithubOrgTeams
+ - listWorkflowIntegrations
+ - listSlackIntegrations
+ - getSlackInstallUrl
+ - getSlackIntegration
+ - deleteSlackIntegration
+ - listMicrosoftTeamsIntegrations
+ - getMicrosoftTeamsClientId