mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
feat: reptile and rabbit changes
This commit is contained in:
@@ -297,17 +297,17 @@ export const registerDynamicSecretRouter = async (server: FastifyZodProvider) =>
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.DynamicSecrets],
|
||||
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({
|
||||
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
|
||||
.string()
|
||||
.trim()
|
||||
.default("/")
|
||||
.transform(removeTrailingSlash)
|
||||
.describe(DYNAMIC_SECRETS.LIST_LEAES_BY_NAME.path),
|
||||
environmentSlug: z.string().min(1).describe(DYNAMIC_SECRETS.LIST_LEAES_BY_NAME.environmentSlug)
|
||||
.describe(DYNAMIC_SECRETS.LIST_LEASES_BY_NAME.path),
|
||||
environmentSlug: z.string().min(1).describe(DYNAMIC_SECRETS.LIST_LEASES_BY_NAME.environmentSlug)
|
||||
}),
|
||||
response: {
|
||||
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 { 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 { ms } from "@app/lib/ms";
|
||||
import { alphaNumericNanoId } from "@app/lib/nanoid";
|
||||
@@ -25,6 +25,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
rateLimit: writeLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||
description: "Create a permanent or a non expiry specific privilege for identity.",
|
||||
security: [
|
||||
{
|
||||
@@ -85,6 +87,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
rateLimit: writeLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||
description: "Create a temporary or a expiring specific privilege for identity.",
|
||||
security: [
|
||||
{
|
||||
@@ -157,6 +161,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
rateLimit: writeLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||
description: "Update a specific privilege of an identity.",
|
||||
security: [
|
||||
{
|
||||
@@ -240,6 +246,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
rateLimit: writeLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||
description: "Delete a specific privilege of an identity.",
|
||||
security: [
|
||||
{
|
||||
@@ -279,6 +287,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
rateLimit: readLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||
description: "Retrieve details of a specific privilege by privilege slug.",
|
||||
security: [
|
||||
{
|
||||
@@ -319,6 +329,8 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
rateLimit: readLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV1],
|
||||
description: "List of a specific privilege of an identity in a project.",
|
||||
security: [
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||
description: "Add an additional privilege for identity.",
|
||||
security: [
|
||||
{
|
||||
@@ -87,7 +87,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||
description: "Update a specific identity privilege.",
|
||||
security: [
|
||||
{
|
||||
@@ -153,7 +153,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||
description: "Delete the specified identity privilege.",
|
||||
security: [
|
||||
{
|
||||
@@ -190,7 +190,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||
description: "Retrieve details of a specific privilege by id.",
|
||||
security: [
|
||||
{
|
||||
@@ -227,7 +227,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||
description: "Retrieve details of a specific privilege by slug.",
|
||||
security: [
|
||||
{
|
||||
@@ -269,7 +269,7 @@ export const registerIdentityProjectAdditionalPrivilegeRouter = async (server: F
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivileges],
|
||||
tags: [ApiDocsTags.IdentitySpecificPrivilegesV2],
|
||||
description: "List privileges for the specified identity by project.",
|
||||
security: [
|
||||
{
|
||||
|
||||
@@ -12,8 +12,8 @@ export enum ApiDocsTags {
|
||||
Identities = "Identities",
|
||||
TokenAuth = "Token Auth",
|
||||
UniversalAuth = "Universal Auth",
|
||||
GcpAuth = "Gcp Auth",
|
||||
AwsAuth = "Aws Auth",
|
||||
GcpAuth = "GCP Auth",
|
||||
AwsAuth = "AWS Auth",
|
||||
AzureAuth = "Azure Auth",
|
||||
KubernetesAuth = "Kubernetes Auth",
|
||||
JwtAuth = "JWT Auth",
|
||||
@@ -24,8 +24,8 @@ export enum ApiDocsTags {
|
||||
ProjectUsers = "Project Users",
|
||||
ProjectGroups = "Project Groups",
|
||||
ProjectIdentities = "Project Identities",
|
||||
ProjectRoles = "ProjectRoles",
|
||||
ProjectTemplates = "ProjectTemplates",
|
||||
ProjectRoles = "Project Roles",
|
||||
ProjectTemplates = "Project Templates",
|
||||
Environments = "Environments",
|
||||
Folders = "Folders",
|
||||
SecretTags = "Secret Tags",
|
||||
@@ -33,34 +33,10 @@ export enum ApiDocsTags {
|
||||
DynamicSecrets = "Dynamic Secrets",
|
||||
SecretImports = "Secret Imports",
|
||||
SecretRotations = "Secret Rotations",
|
||||
IdentitySpecificPrivileges = "Identity Specific Privileges",
|
||||
IdentitySpecificPrivilegesV1 = "Identity Specific Privileges",
|
||||
IdentitySpecificPrivilegesV2 = "Identity Specific Privileges V2",
|
||||
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",
|
||||
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",
|
||||
ServiceTokens = "Service Tokens",
|
||||
AuditLogs = "Audit Logs",
|
||||
@@ -957,7 +933,7 @@ export const DYNAMIC_SECRETS = {
|
||||
environmentSlug: "The slug of the environment 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.",
|
||||
environmentSlug: "The slug of the environment to list folders from.",
|
||||
path: "The path to list folders from.",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { z } from "zod";
|
||||
|
||||
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 { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||
import { Auth0ConnectionListItemSchema, SanitizedAuth0ConnectionSchema } from "@app/services/app-connection/auth0";
|
||||
@@ -42,7 +43,6 @@ import {
|
||||
WindmillConnectionListItemSchema
|
||||
} from "@app/services/app-connection/windmill";
|
||||
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
|
||||
const SanitizedAppConnectionSchema = z.union([
|
||||
|
||||
@@ -2,7 +2,7 @@ import { z } from "zod";
|
||||
|
||||
import { IdentityAwsAuthsSchema } from "@app/db/schemas";
|
||||
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 { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||
import { AuthMode } from "@app/services/auth/auth-type";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { z } from "zod";
|
||||
|
||||
import { IdentityAzureAuthsSchema } from "@app/db/schemas";
|
||||
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 { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||
import { AuthMode } from "@app/services/auth/auth-type";
|
||||
|
||||
@@ -22,7 +22,7 @@ export const registerIdentityGcpAuthRouter = async (server: FastifyZodProvider)
|
||||
tags: [ApiDocsTags.GcpAuth],
|
||||
description: "Login with GCP Auth",
|
||||
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()
|
||||
}),
|
||||
response: {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
UsersSchema
|
||||
} from "@app/db/schemas";
|
||||
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 { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
||||
import { GenericResourceNameSchema, slugSchema } from "@app/server/lib/schemas";
|
||||
|
||||
@@ -13,7 +13,7 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => {
|
||||
method: "GET",
|
||||
url: "/:workspaceId/environments/:envId",
|
||||
config: {
|
||||
rateLimit: writeLimit
|
||||
rateLimit: readLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
|
||||
@@ -563,6 +563,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
rateLimit: readLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.Integrations],
|
||||
description: "List integration auth objects for a workspace.",
|
||||
security: [
|
||||
{
|
||||
|
||||
@@ -346,6 +346,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
rateLimit: readLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.PkiCertificateAuthorities],
|
||||
params: z.object({
|
||||
slug: slugSchema({ min: 5, max: 36 }).describe(PROJECTS.LIST_CAS.slug)
|
||||
}),
|
||||
@@ -387,6 +389,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
rateLimit: readLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.PkiCertificates],
|
||||
params: z.object({
|
||||
slug: slugSchema({ min: 5, max: 36 }).describe(PROJECTS.LIST_CERTIFICATES.slug)
|
||||
}),
|
||||
@@ -555,6 +559,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
rateLimit: readLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.SshCertificateTemplates],
|
||||
params: z.object({
|
||||
projectId: z.string().trim().describe(PROJECTS.LIST_SSH_CERTIFICATE_TEMPLATES.projectId)
|
||||
}),
|
||||
@@ -585,6 +591,8 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
rateLimit: readLimit
|
||||
},
|
||||
schema: {
|
||||
hide: false,
|
||||
tags: [ApiDocsTags.SshCertificateAuthorities],
|
||||
params: z.object({
|
||||
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 { EventType } from "@app/ee/services/audit-log/audit-log-types";
|
||||
import { ApiDocsTags } from "@app/lib/api-docs";
|
||||
import { removeTrailingSlash } from "@app/lib/fn";
|
||||
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
||||
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||
import { AuthMode } from "@app/services/auth/auth-type";
|
||||
|
||||
import { sanitizedServiceTokenUserSchema } from "../sanitizedSchemas";
|
||||
import { ApiDocsTags } from "@app/lib/api-docs";
|
||||
|
||||
export const sanitizedServiceTokenSchema = ServiceTokensSchema.omit({
|
||||
secretHash: true,
|
||||
|
||||
Reference in New Issue
Block a user