mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 15:27:27 +00:00
feat: reptile and rabbit changes
This commit is contained in:
@@ -297,17 +297,17 @@ export const registerDynamicSecretRouter = async (server: FastifyZodProvider) =>
|
|||||||
hide: false,
|
hide: false,
|
||||||
tags: [ApiDocsTags.DynamicSecrets],
|
tags: [ApiDocsTags.DynamicSecrets],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
name: z.string().min(1).describe(DYNAMIC_SECRETS.LIST_LEAES_BY_NAME.name)
|
name: z.string().min(1).describe(DYNAMIC_SECRETS.LIST_LEASES_BY_NAME.name)
|
||||||
}),
|
}),
|
||||||
querystring: z.object({
|
querystring: z.object({
|
||||||
projectSlug: z.string().min(1).describe(DYNAMIC_SECRETS.LIST_LEAES_BY_NAME.projectSlug),
|
projectSlug: z.string().min(1).describe(DYNAMIC_SECRETS.LIST_LEASES_BY_NAME.projectSlug),
|
||||||
path: z
|
path: z
|
||||||
.string()
|
.string()
|
||||||
.trim()
|
.trim()
|
||||||
.default("/")
|
.default("/")
|
||||||
.transform(removeTrailingSlash)
|
.transform(removeTrailingSlash)
|
||||||
.describe(DYNAMIC_SECRETS.LIST_LEAES_BY_NAME.path),
|
.describe(DYNAMIC_SECRETS.LIST_LEASES_BY_NAME.path),
|
||||||
environmentSlug: z.string().min(1).describe(DYNAMIC_SECRETS.LIST_LEAES_BY_NAME.environmentSlug)
|
environmentSlug: z.string().min(1).describe(DYNAMIC_SECRETS.LIST_LEASES_BY_NAME.environmentSlug)
|
||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|||||||
|
|
||||||
import { IdentityProjectAdditionalPrivilegeTemporaryMode } from "@app/ee/services/identity-project-additional-privilege/identity-project-additional-privilege-types";
|
import { IdentityProjectAdditionalPrivilegeTemporaryMode } from "@app/ee/services/identity-project-additional-privilege/identity-project-additional-privilege-types";
|
||||||
import { backfillPermissionV1SchemaToV2Schema } from "@app/ee/services/permission/project-permission";
|
import { backfillPermissionV1SchemaToV2Schema } from "@app/ee/services/permission/project-permission";
|
||||||
import { IDENTITY_ADDITIONAL_PRIVILEGE } from "@app/lib/api-docs";
|
import { ApiDocsTags, IDENTITY_ADDITIONAL_PRIVILEGE } from "@app/lib/api-docs";
|
||||||
import { UnauthorizedError } from "@app/lib/errors";
|
import { UnauthorizedError } from "@app/lib/errors";
|
||||||
import { ms } from "@app/lib/ms";
|
import { ms } from "@app/lib/ms";
|
||||||
import { alphaNumericNanoId } from "@app/lib/nanoid";
|
import { alphaNumericNanoId } from "@app/lib/nanoid";
|
||||||
@@ -25,6 +25,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
rateLimit: writeLimit
|
rateLimit: writeLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||||
description: "Create a permanent or a non expiry specific privilege for identity.",
|
description: "Create a permanent or a non expiry specific privilege for identity.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -85,6 +87,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
rateLimit: writeLimit
|
rateLimit: writeLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||||
description: "Create a temporary or a expiring specific privilege for identity.",
|
description: "Create a temporary or a expiring specific privilege for identity.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -157,6 +161,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
rateLimit: writeLimit
|
rateLimit: writeLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||||
description: "Update a specific privilege of an identity.",
|
description: "Update a specific privilege of an identity.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -240,6 +246,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
rateLimit: writeLimit
|
rateLimit: writeLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||||
description: "Delete a specific privilege of an identity.",
|
description: "Delete a specific privilege of an identity.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -279,6 +287,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||||
description: "Retrieve details of a specific privilege by privilege slug.",
|
description: "Retrieve details of a specific privilege by privilege slug.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -319,6 +329,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||||
description: "List of a specific privilege of an identity in a project.",
|
description: "List of a specific privilege of an identity in a project.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
hide: false,
|
hide: false,
|
||||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||||
description: "Add an additional privilege for identity.",
|
description: "Add an additional privilege for identity.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -87,7 +87,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
hide: false,
|
hide: false,
|
||||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||||
description: "Update a specific identity privilege.",
|
description: "Update a specific identity privilege.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -153,7 +153,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
hide: false,
|
hide: false,
|
||||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||||
description: "Delete the specified identity privilege.",
|
description: "Delete the specified identity privilege.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -190,7 +190,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
hide: false,
|
hide: false,
|
||||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||||
description: "Retrieve details of a specific privilege by id.",
|
description: "Retrieve details of a specific privilege by id.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -227,7 +227,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
hide: false,
|
hide: false,
|
||||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||||
description: "Retrieve details of a specific privilege by slug.",
|
description: "Retrieve details of a specific privilege by slug.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
@@ -269,7 +269,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
hide: false,
|
hide: false,
|
||||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||||
description: "List privileges for the specified identity by project.",
|
description: "List privileges for the specified identity by project.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ export enum ApiDocsTags {
|
|||||||
Identities = "Identities",
|
Identities = "Identities",
|
||||||
TokenAuth = "Token Auth",
|
TokenAuth = "Token Auth",
|
||||||
UniversalAuth = "Universal Auth",
|
UniversalAuth = "Universal Auth",
|
||||||
GcpAuth = "Gcp Auth",
|
GcpAuth = "GCP Auth",
|
||||||
AwsAuth = "Aws Auth",
|
AwsAuth = "AWS Auth",
|
||||||
AzureAuth = "Azure Auth",
|
AzureAuth = "Azure Auth",
|
||||||
KubernetesAuth = "Kubernetes Auth",
|
KubernetesAuth = "Kubernetes Auth",
|
||||||
JwtAuth = "JWT Auth",
|
JwtAuth = "JWT Auth",
|
||||||
@@ -24,8 +24,8 @@ export enum ApiDocsTags {
|
|||||||
ProjectUsers = "Project Users",
|
ProjectUsers = "Project Users",
|
||||||
ProjectGroups = "Project Groups",
|
ProjectGroups = "Project Groups",
|
||||||
ProjectIdentities = "Project Identities",
|
ProjectIdentities = "Project Identities",
|
||||||
ProjectRoles = "ProjectRoles",
|
ProjectRoles = "Project Roles",
|
||||||
ProjectTemplates = "ProjectTemplates",
|
ProjectTemplates = "Project Templates",
|
||||||
Environments = "Environments",
|
Environments = "Environments",
|
||||||
Folders = "Folders",
|
Folders = "Folders",
|
||||||
SecretTags = "Secret Tags",
|
SecretTags = "Secret Tags",
|
||||||
@@ -33,34 +33,10 @@ export enum ApiDocsTags {
|
|||||||
DynamicSecrets = "Dynamic Secrets",
|
DynamicSecrets = "Dynamic Secrets",
|
||||||
SecretImports = "Secret Imports",
|
SecretImports = "Secret Imports",
|
||||||
SecretRotations = "Secret Rotations",
|
SecretRotations = "Secret Rotations",
|
||||||
IdentitySpecificPrivileges = "Identity Specific Privileges",
|
IdentitySpecificPrivilegesV1 = "Identity Specific Privileges",
|
||||||
|
IdentitySpecificPrivilegesV2 = "Identity Specific Privileges V2",
|
||||||
AppConnections = "App Connections",
|
AppConnections = "App Connections",
|
||||||
AppConnectionsAuth0 = "App Connection Auth0",
|
|
||||||
AppConnectionsAWS = "App Connection AWS",
|
|
||||||
AppConnectionsAzureAppConfiguration = "App Connection Azure App Configuration",
|
|
||||||
AppConnectionsAzureKeyVault = "App Connection Azure Key Vault",
|
|
||||||
AppConnectionsCamunda = "App Connection Camunda",
|
|
||||||
AppConnectionsDatabricks = "App Connection Databricks",
|
|
||||||
AppConnectionsGCP = "App Connection GCP",
|
|
||||||
AppConnectionsGitHub = "App Connection GitHub",
|
|
||||||
AppConnectionHumanitec = "App Connection Humanitec",
|
|
||||||
AppConnectionMsSQL = "App Connection Microsoft SQL Server",
|
|
||||||
AppConnectionPostgreSQL = "App Connection PostgreSQL",
|
|
||||||
AppConnectionTerraformCloud = "App Connection Terraform Cloud",
|
|
||||||
AppConnectionVercel = "App Connection Vercel",
|
|
||||||
AppConnectionWindmill = "App Connection Windmill",
|
|
||||||
SecretSyncs = "Secret Syncs",
|
SecretSyncs = "Secret Syncs",
|
||||||
SecretSyncAwsParameterStore = "Secret Syncs AWS Parameter Store",
|
|
||||||
SecretSyncsAwsSecretManager = "Secret Syncs AWS Secret Manager",
|
|
||||||
SecretSyncAzureAppConfiguration = "Secret Syncs Azure App Configuration",
|
|
||||||
SecretSyncCamunda = "Secret Syncs Camunda",
|
|
||||||
SecretSyncDatabricks = "Secret Syncs Databricks",
|
|
||||||
SecretSyncGcpSecretManager = "Secret Syncs GCP Secret Manager",
|
|
||||||
SecretSyncGitHub = "Secret Syncs GitHub",
|
|
||||||
SecretSyncHumanitec = "Secret Syncs Humanitec",
|
|
||||||
SecretSyncTerraformCloud = "Secret Syncs Terraform Cloud",
|
|
||||||
SecretSyncVercel = "Secret Syncs Vercel",
|
|
||||||
SecretSyncWindmill = "Secret Syncs Windmill",
|
|
||||||
Integrations = "Integrations",
|
Integrations = "Integrations",
|
||||||
ServiceTokens = "Service Tokens",
|
ServiceTokens = "Service Tokens",
|
||||||
AuditLogs = "Audit Logs",
|
AuditLogs = "Audit Logs",
|
||||||
@@ -957,7 +933,7 @@ export const DYNAMIC_SECRETS = {
|
|||||||
environmentSlug: "The slug of the environment to list folders from.",
|
environmentSlug: "The slug of the environment to list folders from.",
|
||||||
path: "The path to list folders from."
|
path: "The path to list folders from."
|
||||||
},
|
},
|
||||||
LIST_LEAES_BY_NAME: {
|
LIST_LEASES_BY_NAME: {
|
||||||
projectSlug: "The slug of the project to create dynamic secret in.",
|
projectSlug: "The slug of the project to create dynamic secret in.",
|
||||||
environmentSlug: "The slug of the environment to list folders from.",
|
environmentSlug: "The slug of the environment to list folders from.",
|
||||||
path: "The path to list folders from.",
|
path: "The path to list folders from.",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
||||||
|
import { ApiDocsTags } from "@app/lib/api-docs";
|
||||||
import { readLimit } from "@app/server/config/rateLimiter";
|
import { readLimit } from "@app/server/config/rateLimiter";
|
||||||
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||||
import { Auth0ConnectionListItemSchema, SanitizedAuth0ConnectionSchema } from "@app/services/app-connection/auth0";
|
import { Auth0ConnectionListItemSchema, SanitizedAuth0ConnectionSchema } from "@app/services/app-connection/auth0";
|
||||||
@@ -42,7 +43,6 @@ import {
|
|||||||
WindmillConnectionListItemSchema
|
WindmillConnectionListItemSchema
|
||||||
} from "@app/services/app-connection/windmill";
|
} from "@app/services/app-connection/windmill";
|
||||||
import { AuthMode } from "@app/services/auth/auth-type";
|
import { AuthMode } from "@app/services/auth/auth-type";
|
||||||
import { ApiDocsTags } from "@app/lib/api-docs";
|
|
||||||
|
|
||||||
// can't use discriminated due to multiple schemas for certain apps
|
// can't use discriminated due to multiple schemas for certain apps
|
||||||
const SanitizedAppConnectionSchema = z.union([
|
const SanitizedAppConnectionSchema = z.union([
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|||||||
|
|
||||||
import { IdentityAwsAuthsSchema } from "@app/db/schemas";
|
import { IdentityAwsAuthsSchema } from "@app/db/schemas";
|
||||||
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
||||||
import { AWS_AUTH, ApiDocsTags } from "@app/lib/api-docs";
|
import { ApiDocsTags, AWS_AUTH } from "@app/lib/api-docs";
|
||||||
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
||||||
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||||
import { AuthMode } from "@app/services/auth/auth-type";
|
import { AuthMode } from "@app/services/auth/auth-type";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|||||||
|
|
||||||
import { IdentityAzureAuthsSchema } from "@app/db/schemas";
|
import { IdentityAzureAuthsSchema } from "@app/db/schemas";
|
||||||
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
||||||
import { AZURE_AUTH, ApiDocsTags } from "@app/lib/api-docs";
|
import { ApiDocsTags, AZURE_AUTH } from "@app/lib/api-docs";
|
||||||
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
||||||
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||||
import { AuthMode } from "@app/services/auth/auth-type";
|
import { AuthMode } from "@app/services/auth/auth-type";
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export const registerIdentityGcpAuthRouter = async (server: FastifyZodProvider)
|
|||||||
tags: [ApiDocsTags.GcpAuth],
|
tags: [ApiDocsTags.GcpAuth],
|
||||||
description: "Login with GCP Auth",
|
description: "Login with GCP Auth",
|
||||||
body: z.object({
|
body: z.object({
|
||||||
identityId: z.string().trim().describe(GCP_AUTH.LOGIN.identityId).trim(),
|
identityId: z.string().trim().describe(GCP_AUTH.LOGIN.identityId),
|
||||||
jwt: z.string()
|
jwt: z.string()
|
||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
UsersSchema
|
UsersSchema
|
||||||
} from "@app/db/schemas";
|
} from "@app/db/schemas";
|
||||||
import { EventType, UserAgentType } from "@app/ee/services/audit-log/audit-log-types";
|
import { EventType, UserAgentType } from "@app/ee/services/audit-log/audit-log-types";
|
||||||
import { AUDIT_LOGS, ApiDocsTags, ORGANIZATIONS } from "@app/lib/api-docs";
|
import { ApiDocsTags, AUDIT_LOGS, ORGANIZATIONS } from "@app/lib/api-docs";
|
||||||
import { getLastMidnightDateISO, removeTrailingSlash } from "@app/lib/fn";
|
import { getLastMidnightDateISO, removeTrailingSlash } from "@app/lib/fn";
|
||||||
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
||||||
import { GenericResourceNameSchema, slugSchema } from "@app/server/lib/schemas";
|
import { GenericResourceNameSchema, slugSchema } from "@app/server/lib/schemas";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/:workspaceId/environments/:envId",
|
url: "/:workspaceId/environments/:envId",
|
||||||
config: {
|
config: {
|
||||||
rateLimit: writeLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
hide: false,
|
hide: false,
|
||||||
|
|||||||
@@ -563,6 +563,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.Integrations],
|
||||||
description: "List integration auth objects for a workspace.",
|
description: "List integration auth objects for a workspace.",
|
||||||
security: [
|
security: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -346,6 +346,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.PkiCertificateAuthorities],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
slug: slugSchema({ min: 5, max: 36 }).describe(PROJECTS.LIST_CAS.slug)
|
slug: slugSchema({ min: 5, max: 36 }).describe(PROJECTS.LIST_CAS.slug)
|
||||||
}),
|
}),
|
||||||
@@ -387,6 +389,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.PkiCertificates],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
slug: slugSchema({ min: 5, max: 36 }).describe(PROJECTS.LIST_CERTIFICATES.slug)
|
slug: slugSchema({ min: 5, max: 36 }).describe(PROJECTS.LIST_CERTIFICATES.slug)
|
||||||
}),
|
}),
|
||||||
@@ -555,6 +559,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.SshCertificateTemplates],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
projectId: z.string().trim().describe(PROJECTS.LIST_SSH_CERTIFICATE_TEMPLATES.projectId)
|
projectId: z.string().trim().describe(PROJECTS.LIST_SSH_CERTIFICATE_TEMPLATES.projectId)
|
||||||
}),
|
}),
|
||||||
@@ -585,6 +591,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
hide: false,
|
||||||
|
tags: [ApiDocsTags.SshCertificateAuthorities],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
projectId: z.string().trim().describe(PROJECTS.LIST_SSH_CAS.projectId)
|
projectId: z.string().trim().describe(PROJECTS.LIST_SSH_CAS.projectId)
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import { z } from "zod";
|
|||||||
|
|
||||||
import { ServiceTokensSchema } from "@app/db/schemas";
|
import { ServiceTokensSchema } from "@app/db/schemas";
|
||||||
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
||||||
|
import { ApiDocsTags } from "@app/lib/api-docs";
|
||||||
import { removeTrailingSlash } from "@app/lib/fn";
|
import { removeTrailingSlash } from "@app/lib/fn";
|
||||||
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
||||||
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||||
import { AuthMode } from "@app/services/auth/auth-type";
|
import { AuthMode } from "@app/services/auth/auth-type";
|
||||||
|
|
||||||
import { sanitizedServiceTokenUserSchema } from "../sanitizedSchemas";
|
import { sanitizedServiceTokenUserSchema } from "../sanitizedSchemas";
|
||||||
import { ApiDocsTags } from "@app/lib/api-docs";
|
|
||||||
|
|
||||||
export const sanitizedServiceTokenSchema = ServiceTokensSchema.omit({
|
export const sanitizedServiceTokenSchema = ServiceTokensSchema.omit({
|
||||||
secretHash: true,
|
secretHash: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user