diff --git a/e2e/openapi-cfg.yaml b/e2e/openapi-cfg.yaml index eafa460d..2ad67883 100644 --- a/e2e/openapi-cfg.yaml +++ b/e2e/openapi-cfg.yaml @@ -17,8 +17,8 @@ output-options: - getRelays - listGateways - createProject - - createKubernetesPamResource - - createRedisPamResource + - createPamFolder + - createPamAccountTemplate - deleteSecretV4 - updateSecretV4 - createSecretV4 @@ -32,11 +32,7 @@ output-options: - attachUniversalAuth - createUniversalAuthClientSecret - createCloudflareAppConnection - - createPostgresPamResource - createPostgresPamAccount - - createSshPamResource - createSshPamAccount - - createRedisPamAccount - - createWindowsPamResource - createWindowsPamAccount - createAwsAppConnection diff --git a/e2e/packages/client/client.gen.go b/e2e/packages/client/client.gen.go index 6db51fb3..2b93b05d 100644 --- a/e2e/packages/client/client.gen.go +++ b/e2e/packages/client/client.gen.go @@ -97,6 +97,12 @@ const ( CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithmSLHDSASHAKE256s CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm = "SLH-DSA-SHAKE-256s" ) +// Defines values for CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeySource. +const ( + Hsm CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeySource = "hsm" + Infisical CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeySource = "infisical" +) + // Defines values for CreateInternalCertificateAuthorityV1JSONBodyConfigurationType. const ( Intermediate CreateInternalCertificateAuthorityV1JSONBodyConfigurationType = "intermediate" @@ -119,6 +125,7 @@ const ( // Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed. const ( + CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedAnyPurpose CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "any_purpose" CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "client_auth" CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "code_signing" CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowedEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed = "email_protection" @@ -129,6 +136,7 @@ const ( // Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied. const ( + CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedAnyPurpose CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "any_purpose" CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "client_auth" CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "code_signing" CreateCertificatePolicyJSONBodyExtendedKeyUsagesDeniedEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied = "email_protection" @@ -139,6 +147,7 @@ const ( // Defines values for CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired. const ( + CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredAnyPurpose CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "any_purpose" CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredClientAuth CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "client_auth" CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredCodeSigning CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "code_signing" CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequiredEmailProtection CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired = "email_protection" @@ -188,16 +197,18 @@ const ( // Defines values for CreateCertificatePolicyJSONBodySansType. const ( - DnsName CreateCertificatePolicyJSONBodySansType = "dns_name" - Email CreateCertificatePolicyJSONBodySansType = "email" - IpAddress CreateCertificatePolicyJSONBodySansType = "ip_address" - Uri CreateCertificatePolicyJSONBodySansType = "uri" + CreateCertificatePolicyJSONBodySansTypeDnsName CreateCertificatePolicyJSONBodySansType = "dns_name" + CreateCertificatePolicyJSONBodySansTypeEmail CreateCertificatePolicyJSONBodySansType = "email" + CreateCertificatePolicyJSONBodySansTypeIpAddress CreateCertificatePolicyJSONBodySansType = "ip_address" + CreateCertificatePolicyJSONBodySansTypeUpn CreateCertificatePolicyJSONBodySansType = "upn" + CreateCertificatePolicyJSONBodySansTypeUri CreateCertificatePolicyJSONBodySansType = "uri" ) // Defines values for CreateCertificatePolicyJSONBodySubjectType. const ( CommonName CreateCertificatePolicyJSONBodySubjectType = "common_name" Country CreateCertificatePolicyJSONBodySubjectType = "country" + DomainComponent CreateCertificatePolicyJSONBodySubjectType = "domain_component" Locality CreateCertificatePolicyJSONBodySubjectType = "locality" Organization CreateCertificatePolicyJSONBodySubjectType = "organization" OrganizationalUnit CreateCertificatePolicyJSONBodySubjectType = "organizational_unit" @@ -206,6 +217,7 @@ const ( // Defines values for CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages. const ( + CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesAnyPurpose CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "any_purpose" CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesClientAuth CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "client_auth" CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesCodeSigning CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "code_signing" CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsagesEmailProtection CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages = "email_protection" @@ -277,12 +289,13 @@ const ( SLHDSASHAKE256s CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm = "SLH-DSA-SHAKE-256s" ) -// Defines values for CreateCertificateProfileJSONBodyEnrollmentType. +// Defines values for CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType. const ( - Acme CreateCertificateProfileJSONBodyEnrollmentType = "acme" - Api CreateCertificateProfileJSONBodyEnrollmentType = "api" - Est CreateCertificateProfileJSONBodyEnrollmentType = "est" - Scep CreateCertificateProfileJSONBodyEnrollmentType = "scep" + CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesTypeDnsName CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType = "dns_name" + CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesTypeEmail CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType = "email" + CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesTypeIpAddress CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType = "ip_address" + CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesTypeUpn CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType = "upn" + CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesTypeUri CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType = "uri" ) // Defines values for CreateCertificateProfileJSONBodyIssuerType. @@ -291,61 +304,174 @@ const ( SelfSigned CreateCertificateProfileJSONBodyIssuerType = "self-signed" ) -// Defines values for CreateCertificateProfileJSONBodyScepConfigChallengeType. -const ( - Dynamic CreateCertificateProfileJSONBodyScepConfigChallengeType = "dynamic" - Static CreateCertificateProfileJSONBodyScepConfigChallengeType = "static" -) - -// Defines values for CreateSshPamAccountJSONBodyCredentials0AuthMethod. -const ( - CreateSshPamAccountJSONBodyCredentials0AuthMethodPassword CreateSshPamAccountJSONBodyCredentials0AuthMethod = "password" -) - -// Defines values for CreateSshPamAccountJSONBodyCredentials1AuthMethod. +// Defines values for CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion. const ( - CreateSshPamAccountJSONBodyCredentials1AuthMethodPublicKey CreateSshPamAccountJSONBodyCredentials1AuthMethod = "public-key" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionAfSouth1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "af-south-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApEast1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-east-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApNortheast1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-northeast-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApNortheast2 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-northeast-2" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApNortheast3 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-northeast-3" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApSouth1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-south-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApSouth2 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-south-2" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApSoutheast1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-southeast-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApSoutheast2 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-southeast-2" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApSoutheast3 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-southeast-3" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionApSoutheast4 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ap-southeast-4" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionCaCentral1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "ca-central-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionEuCentral1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "eu-central-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionEuCentral2 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "eu-central-2" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionEuNorth1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "eu-north-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionEuSouth1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "eu-south-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionEuSouth2 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "eu-south-2" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionEuWest1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "eu-west-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionEuWest2 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "eu-west-2" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionEuWest3 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "eu-west-3" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionMeCentral1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "me-central-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionMeSouth1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "me-south-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionSaEast1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "sa-east-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionUsEast1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "us-east-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionUsEast2 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "us-east-2" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionUsGovEast1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "us-gov-east-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionUsGovWest1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "us-gov-west-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionUsWest1 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "us-west-1" + CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegionUsWest2 CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion = "us-west-2" ) -// Defines values for CreateSshPamAccountJSONBodyCredentials2AuthMethod. +// Defines values for CreatePamAccountTemplateJSONBodySettingsRecordingStorageBackend. const ( - CreateSshPamAccountJSONBodyCredentials2AuthMethodCertificate CreateSshPamAccountJSONBodyCredentials2AuthMethod = "certificate" + CreatePamAccountTemplateJSONBodySettingsRecordingStorageBackendAwsS3 CreatePamAccountTemplateJSONBodySettingsRecordingStorageBackend = "aws-s3" + CreatePamAccountTemplateJSONBodySettingsRecordingStorageBackendPostgres CreatePamAccountTemplateJSONBodySettingsRecordingStorageBackend = "postgres" ) -// Defines values for CreateWindowsPamAccountJSONBodyInternalMetadataAccountType. +// Defines values for CreatePamAccountTemplateJSONBodyType. const ( - Service CreateWindowsPamAccountJSONBodyInternalMetadataAccountType = "service" - User CreateWindowsPamAccountJSONBodyInternalMetadataAccountType = "user" + CreatePamAccountTemplateJSONBodyTypeAwsIam CreatePamAccountTemplateJSONBodyType = "aws-iam" + CreatePamAccountTemplateJSONBodyTypeAzureCli CreatePamAccountTemplateJSONBodyType = "azure-cli" + CreatePamAccountTemplateJSONBodyTypeGcpServiceAccount CreatePamAccountTemplateJSONBodyType = "gcp-service-account" + CreatePamAccountTemplateJSONBodyTypeKubernetes CreatePamAccountTemplateJSONBodyType = "kubernetes" + CreatePamAccountTemplateJSONBodyTypeMongodb CreatePamAccountTemplateJSONBodyType = "mongodb" + CreatePamAccountTemplateJSONBodyTypeMssql CreatePamAccountTemplateJSONBodyType = "mssql" + CreatePamAccountTemplateJSONBodyTypeMysql CreatePamAccountTemplateJSONBodyType = "mysql" + CreatePamAccountTemplateJSONBodyTypeOracledb CreatePamAccountTemplateJSONBodyType = "oracledb" + CreatePamAccountTemplateJSONBodyTypePostgres CreatePamAccountTemplateJSONBodyType = "postgres" + CreatePamAccountTemplateJSONBodyTypeRedis CreatePamAccountTemplateJSONBodyType = "redis" + CreatePamAccountTemplateJSONBodyTypeSsh CreatePamAccountTemplateJSONBodyType = "ssh" + CreatePamAccountTemplateJSONBodyTypeWindows CreatePamAccountTemplateJSONBodyType = "windows" + CreatePamAccountTemplateJSONBodyTypeWindowsAd CreatePamAccountTemplateJSONBodyType = "windows-ad" ) -// Defines values for CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod. +// Defines values for CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion. const ( - ServiceAccountToken CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod = "service-account-token" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionAfSouth1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "af-south-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApEast1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-east-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast2 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-2" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast3 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-3" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSouth1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-south-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSouth2 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-south-2" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast2 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-2" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast3 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-3" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast4 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-4" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionCaCentral1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ca-central-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuCentral1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-central-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuCentral2 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-central-2" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuNorth1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-north-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuSouth1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-south-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuSouth2 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-south-2" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest2 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-2" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest3 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-3" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionMeCentral1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "me-central-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionMeSouth1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "me-south-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionSaEast1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "sa-east-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsEast1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-east-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsEast2 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-east-2" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsGovEast1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-gov-east-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsGovWest1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-gov-west-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsWest1 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-west-1" + CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsWest2 CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-west-2" ) -// Defines values for CreateKubernetesPamResourceJSONBodyRotationAccountCredentials1AuthMethod. +// Defines values for CreateSshPamAccountJSONBodyCredentials0AuthMethod. const ( - GatewayKubernetesAuth CreateKubernetesPamResourceJSONBodyRotationAccountCredentials1AuthMethod = "gateway-kubernetes-auth" + Password CreateSshPamAccountJSONBodyCredentials0AuthMethod = "password" ) -// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod. +// Defines values for CreateSshPamAccountJSONBodyCredentials1AuthMethod. const ( - CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethodPassword CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod = "password" + PublicKey CreateSshPamAccountJSONBodyCredentials1AuthMethod = "public-key" ) -// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod. +// Defines values for CreateSshPamAccountJSONBodyCredentials2AuthMethod. const ( - CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethodPublicKey CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod = "public-key" + Certificate CreateSshPamAccountJSONBodyCredentials2AuthMethod = "certificate" ) -// Defines values for CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod. +// Defines values for CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion. const ( - CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethodCertificate CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod = "certificate" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionAfSouth1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "af-south-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApEast1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-east-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast2 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-2" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast3 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-3" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSouth1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-south-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSouth2 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-south-2" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast2 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-2" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast3 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-3" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast4 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-4" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionCaCentral1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ca-central-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuCentral1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-central-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuCentral2 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-central-2" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuNorth1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-north-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuSouth1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-south-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuSouth2 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-south-2" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest2 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-2" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest3 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-3" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionMeCentral1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "me-central-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionMeSouth1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "me-south-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionSaEast1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "sa-east-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsEast1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-east-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsEast2 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-east-2" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsGovEast1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-gov-east-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsGovWest1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-gov-west-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsWest1 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-west-1" + CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsWest2 CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-west-2" ) -// Defines values for CreateWindowsPamResourceJSONBodyConnectionDetailsProtocol. +// Defines values for CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion. const ( - Rdp CreateWindowsPamResourceJSONBodyConnectionDetailsProtocol = "rdp" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionAfSouth1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "af-south-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApEast1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-east-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast2 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-2" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApNortheast3 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-northeast-3" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSouth1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-south-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSouth2 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-south-2" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast2 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-2" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast3 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-3" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionApSoutheast4 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ap-southeast-4" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionCaCentral1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "ca-central-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuCentral1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-central-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuCentral2 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-central-2" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuNorth1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-north-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuSouth1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-south-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuSouth2 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-south-2" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest2 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-2" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionEuWest3 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "eu-west-3" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionMeCentral1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "me-central-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionMeSouth1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "me-south-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionSaEast1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "sa-east-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsEast1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-east-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsEast2 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-east-2" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsGovEast1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-gov-east-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsGovWest1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-gov-west-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsWest1 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-west-1" + CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegionUsWest2 CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion = "us-west-2" ) // Defines values for CreateProjectJSONBodyType. @@ -683,9 +809,6 @@ type CreateAcmeCertificateAuthorityV1JSONBody struct { // Name The name of the ACME-compatible CA Certificate Authority to create. Must be slug-friendly. Name string `json:"name"` - // ProjectId The ID of the project to create the Certificate Authority in. - ProjectId openapi_types.UUID `json:"projectId"` - // Status The status of the ACME-compatible CA Certificate Authority. Status CreateAcmeCertificateAuthorityV1JSONBodyStatus `json:"status"` } @@ -725,6 +848,9 @@ type UpdateAcmeCertificateAuthorityV1JSONBody struct { EabKid *string `json:"eabKid,omitempty"` } `json:"configuration,omitempty"` + // Name The updated name of the ACME-compatible CA Certificate Authority. Must be slug-friendly. + Name *string `json:"name,omitempty"` + // Status The updated status of the ACME-compatible CA Certificate Authority. Status *UpdateAcmeCertificateAuthorityV1JSONBodyStatus `json:"status,omitempty"` } @@ -746,16 +872,28 @@ type CreateInternalCertificateAuthorityV1JSONBody struct { // Country The country name (C) for the CA. Country *string `json:"country,omitempty"` - // CrlDistributionPointUrls Additional CRL Distribution Point URLs (HTTP/HTTPS) embedded in every certificate issued by this CA. Up to 4 URLs; the Infisical-managed CRL endpoint is always included as the primary. + // CrlDistributionPointUrls Additional CRL Distribution Point URLs (HTTP/HTTPS) embedded in every certificate issued by this CA. Up to 4 URLs; the Infisical-managed CRL endpoint is included by default unless disabled. CrlDistributionPointUrls *[]string `json:"crlDistributionPointUrls,omitempty"` - Dn *string `json:"dn"` + + // DisableManagedCrlDistributionPointUrl When set to true, the Infisical-managed CRL endpoint URL will not be embedded in certificates issued by this CA. Only custom CRL Distribution Point URLs (if any) will be included. + DisableManagedCrlDistributionPointUrl *bool `json:"disableManagedCrlDistributionPointUrl,omitempty"` + Dn *string `json:"dn"` // FriendlyName A friendly name for the CA. FriendlyName *string `json:"friendlyName,omitempty"` + // HsmConnectorId The ID of the HSM Connector to generate and store the CA's signing key in. Required when keySource is 'hsm'. + HsmConnectorId *openapi_types.UUID `json:"hsmConnectorId,omitempty"` + + // HsmKeyLabel The label of the CA's signing key on the HSM. Not user-supplied: it is the HSM Connector's configured key name prefix followed by a per-CA label built from the CA name and a random 5-character suffix (ca--). + HsmKeyLabel *string `json:"hsmKeyLabel,omitempty"` + // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. KeyAlgorithm CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm `json:"keyAlgorithm"` + // KeySource Where the CA's signing key is generated and stored. 'infisical' keeps the key in Infisical's KMS; 'hsm' generates and stores the key in the HSM reached through the specified HSM Connector. + KeySource *CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeySource `json:"keySource,omitempty"` + // Locality The locality name for the CA. Locality *string `json:"locality,omitempty"` @@ -786,9 +924,6 @@ type CreateInternalCertificateAuthorityV1JSONBody struct { // Name The name of the Internal Certificate Authority to create. Must be slug-friendly. Name string `json:"name"` - // ProjectId The ID of the project to create the Certificate Authority in. - ProjectId openapi_types.UUID `json:"projectId"` - // Status The status of the Internal Certificate Authority. Status CreateInternalCertificateAuthorityV1JSONBodyStatus `json:"status"` } @@ -796,6 +931,9 @@ type CreateInternalCertificateAuthorityV1JSONBody struct { // CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm defines parameters for CreateInternalCertificateAuthorityV1. type CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeyAlgorithm string +// CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeySource defines parameters for CreateInternalCertificateAuthorityV1. +type CreateInternalCertificateAuthorityV1JSONBodyConfigurationKeySource string + // CreateInternalCertificateAuthorityV1JSONBodyConfigurationType defines parameters for CreateInternalCertificateAuthorityV1. type CreateInternalCertificateAuthorityV1JSONBodyConfigurationType string @@ -807,7 +945,7 @@ type CreateCertificatePolicyJSONBody struct { Algorithms *struct { KeyAlgorithm *[]string `json:"keyAlgorithm,omitempty"` Signature *[]string `json:"signature,omitempty"` - } `json:"algorithms,omitempty"` + } `json:"algorithms"` BasicConstraints *struct { IsCA *CreateCertificatePolicyJSONBodyBasicConstraintsIsCA `json:"isCA,omitempty"` MaxPathLength *int `json:"maxPathLength,omitempty"` @@ -817,29 +955,28 @@ type CreateCertificatePolicyJSONBody struct { Allowed *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesAllowed `json:"allowed,omitempty"` Denied *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesDenied `json:"denied,omitempty"` Required *[]CreateCertificatePolicyJSONBodyExtendedKeyUsagesRequired `json:"required,omitempty"` - } `json:"extendedKeyUsages,omitempty"` + } `json:"extendedKeyUsages"` KeyUsages *struct { Allowed *[]CreateCertificatePolicyJSONBodyKeyUsagesAllowed `json:"allowed,omitempty"` Denied *[]CreateCertificatePolicyJSONBodyKeyUsagesDenied `json:"denied,omitempty"` Required *[]CreateCertificatePolicyJSONBodyKeyUsagesRequired `json:"required,omitempty"` - } `json:"keyUsages,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - Sans *[]struct { + } `json:"keyUsages"` + Name string `json:"name"` + Sans *[]struct { Allowed *[]string `json:"allowed,omitempty"` Denied *[]string `json:"denied,omitempty"` Required *[]string `json:"required,omitempty"` Type CreateCertificatePolicyJSONBodySansType `json:"type"` - } `json:"sans,omitempty"` + } `json:"sans"` Subject *[]struct { Allowed *[]string `json:"allowed,omitempty"` Denied *[]string `json:"denied,omitempty"` Required *[]string `json:"required,omitempty"` Type CreateCertificatePolicyJSONBodySubjectType `json:"type"` - } `json:"subject,omitempty"` + } `json:"subject"` Validity *struct { Max *string `json:"max,omitempty"` - } `json:"validity,omitempty"` + } `json:"validity"` } // CreateCertificatePolicyJSONBodyBasicConstraintsIsCA defines parameters for CreateCertificatePolicy. @@ -871,14 +1008,6 @@ type CreateCertificatePolicyJSONBodySubjectType string // CreateCertificateProfileJSONBody defines parameters for CreateCertificateProfile. type CreateCertificateProfileJSONBody struct { - AcmeConfig *struct { - SkipDnsOwnershipVerification *bool `json:"skipDnsOwnershipVerification,omitempty"` - SkipEabBinding *bool `json:"skipEabBinding,omitempty"` - } `json:"acmeConfig,omitempty"` - ApiConfig *struct { - AutoRenew *bool `json:"autoRenew,omitempty"` - RenewBeforeDays *float32 `json:"renewBeforeDays,omitempty"` - } `json:"apiConfig,omitempty"` CaId *openapi_types.UUID `json:"caId,omitempty"` CertificatePolicyId openapi_types.UUID `json:"certificatePolicyId"` Defaults *struct { @@ -888,6 +1017,7 @@ type CreateCertificateProfileJSONBody struct { } `json:"basicConstraints,omitempty"` CommonName *string `json:"commonName,omitempty"` Country *string `json:"country,omitempty"` + DomainComponents *[]string `json:"domainComponents,omitempty"` ExtendedKeyUsages *[]CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` KeyAlgorithm *CreateCertificateProfileJSONBodyDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` KeyUsages *[]CreateCertificateProfileJSONBodyDefaultsKeyUsages `json:"keyUsages,omitempty"` @@ -896,27 +1026,16 @@ type CreateCertificateProfileJSONBody struct { OrganizationalUnit *string `json:"organizationalUnit,omitempty"` SignatureAlgorithm *CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` State *string `json:"state,omitempty"` - TtlDays *int `json:"ttlDays,omitempty"` + SubjectAltNames *[]struct { + Type CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType `json:"type"` + Value string `json:"value"` + } `json:"subjectAltNames,omitempty"` + TtlDays *int `json:"ttlDays,omitempty"` } `json:"defaults"` - Description *string `json:"description,omitempty"` - EnrollmentType CreateCertificateProfileJSONBodyEnrollmentType `json:"enrollmentType"` - EstConfig *struct { - CaChain *string `json:"caChain,omitempty"` - DisableBootstrapCaValidation *bool `json:"disableBootstrapCaValidation,omitempty"` - Passphrase string `json:"passphrase"` - } `json:"estConfig,omitempty"` + Description *string `json:"description,omitempty"` ExternalConfigs *CreateCertificateProfileJSONBody_ExternalConfigs `json:"externalConfigs"` IssuerType *CreateCertificateProfileJSONBodyIssuerType `json:"issuerType,omitempty"` - ProjectId string `json:"projectId"` - ScepConfig *struct { - AllowCertBasedRenewal *bool `json:"allowCertBasedRenewal,omitempty"` - ChallengePassword *string `json:"challengePassword,omitempty"` - ChallengeType *CreateCertificateProfileJSONBodyScepConfigChallengeType `json:"challengeType,omitempty"` - DynamicChallengeExpiryMinutes *int `json:"dynamicChallengeExpiryMinutes,omitempty"` - DynamicChallengeMaxPending *int `json:"dynamicChallengeMaxPending,omitempty"` - IncludeCaCertInResponse *bool `json:"includeCaCertInResponse,omitempty"` - } `json:"scepConfig,omitempty"` - Slug string `json:"slug"` + Slug string `json:"slug"` } // CreateCertificateProfileJSONBodyDefaultsExtendedKeyUsages defines parameters for CreateCertificateProfile. @@ -931,8 +1050,8 @@ type CreateCertificateProfileJSONBodyDefaultsKeyUsages string // CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm defines parameters for CreateCertificateProfile. type CreateCertificateProfileJSONBodyDefaultsSignatureAlgorithm string -// CreateCertificateProfileJSONBodyEnrollmentType defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyEnrollmentType string +// CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyDefaultsSubjectAltNamesType string // CreateCertificateProfileJSONBodyExternalConfigs0 defines parameters for CreateCertificateProfile. type CreateCertificateProfileJSONBodyExternalConfigs0 struct { @@ -941,7 +1060,10 @@ type CreateCertificateProfileJSONBodyExternalConfigs0 struct { } // CreateCertificateProfileJSONBodyExternalConfigs1 defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyExternalConfigs1 = map[string]interface{} +type CreateCertificateProfileJSONBodyExternalConfigs1 struct { + // Template Certificate template name for Active Directory Certificate Service + Template string `json:"template"` +} // CreateCertificateProfileJSONBodyExternalConfigs2 defines parameters for CreateCertificateProfile. type CreateCertificateProfileJSONBodyExternalConfigs2 = map[string]interface{} @@ -958,6 +1080,12 @@ type CreateCertificateProfileJSONBodyExternalConfigs5 = map[string]interface{} // CreateCertificateProfileJSONBodyExternalConfigs6 defines parameters for CreateCertificateProfile. type CreateCertificateProfileJSONBodyExternalConfigs6 = map[string]interface{} +// CreateCertificateProfileJSONBodyExternalConfigs7 defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyExternalConfigs7 = map[string]interface{} + +// CreateCertificateProfileJSONBodyExternalConfigs8 defines parameters for CreateCertificateProfile. +type CreateCertificateProfileJSONBodyExternalConfigs8 = map[string]interface{} + // CreateCertificateProfileJSONBody_ExternalConfigs defines parameters for CreateCertificateProfile. type CreateCertificateProfileJSONBody_ExternalConfigs struct { union json.RawMessage @@ -966,9 +1094,6 @@ type CreateCertificateProfileJSONBody_ExternalConfigs struct { // CreateCertificateProfileJSONBodyIssuerType defines parameters for CreateCertificateProfile. type CreateCertificateProfileJSONBodyIssuerType string -// CreateCertificateProfileJSONBodyScepConfigChallengeType defines parameters for CreateCertificateProfile. -type CreateCertificateProfileJSONBodyScepConfigChallengeType string - // CreateMachineIdentityJSONBody defines parameters for CreateMachineIdentity. type CreateMachineIdentityJSONBody struct { // HasDeleteProtection Prevents deletion of the identity when enabled. @@ -988,61 +1113,168 @@ type CreateMachineIdentityJSONBody struct { Role *string `json:"role,omitempty"` } +// CreatePamAccountTemplateJSONBody defines parameters for CreatePamAccountTemplate. +type CreatePamAccountTemplateJSONBody struct { + // Description Optional description + Description *string `json:"description,omitempty"` + + // GatewayId Default gateway ID for accounts using this template + GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` + + // GatewayPoolId Default gateway pool ID + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"` + + // Name Name for the template + Name string `json:"name"` + + // Policies Policy values keyed by policy type + Policies *map[string]interface{} `json:"policies,omitempty"` + + // RecordingConnectionId Recording storage connection ID + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId,omitempty"` + + // Settings Template settings + Settings *struct { + // PasswordRequirements The password requirements to use when generating the new password. + PasswordRequirements *struct { + // AllowedSymbols The allowed symbols to use in the generated password (defaults to "-_.~!*"). + AllowedSymbols *string `json:"allowedSymbols,omitempty"` + + // Length The length of the password to generate. + Length float32 `json:"length"` + Required struct { + // Digits The amount of digits to require in the generated password. + Digits float32 `json:"digits"` + + // Lowercase The amount of lowercase characters to require in the generated password. + Lowercase float32 `json:"lowercase"` + + // Symbols The amount of symbols to require in the generated password. + Symbols float32 `json:"symbols"` + + // Uppercase The amount of uppercase characters to require in the generated password. + Uppercase float32 `json:"uppercase"` + } `json:"required"` + } `json:"passwordRequirements,omitempty"` + RecordingEnabled *bool `json:"recordingEnabled,omitempty"` + RecordingS3Config *struct { + Bucket string `json:"bucket"` + KeyPrefix *string `json:"keyPrefix,omitempty"` + Region CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion `json:"region"` + } `json:"recordingS3Config,omitempty"` + RecordingStorageBackend *CreatePamAccountTemplateJSONBodySettingsRecordingStorageBackend `json:"recordingStorageBackend,omitempty"` + Rotation *struct { + Enabled bool `json:"enabled"` + IntervalSeconds *int `json:"intervalSeconds"` + } `json:"rotation,omitempty"` + SessionLogMaskingPatterns *string `json:"sessionLogMaskingPatterns,omitempty"` + } `json:"settings,omitempty"` + + // Type The account type this template applies to + Type CreatePamAccountTemplateJSONBodyType `json:"type"` +} + +// CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion defines parameters for CreatePamAccountTemplate. +type CreatePamAccountTemplateJSONBodySettingsRecordingS3ConfigRegion string + +// CreatePamAccountTemplateJSONBodySettingsRecordingStorageBackend defines parameters for CreatePamAccountTemplate. +type CreatePamAccountTemplateJSONBodySettingsRecordingStorageBackend string + +// CreatePamAccountTemplateJSONBodyType defines parameters for CreatePamAccountTemplate. +type CreatePamAccountTemplateJSONBodyType string + // CreatePostgresPamAccountJSONBody defines parameters for CreatePostgresPamAccount. type CreatePostgresPamAccountJSONBody struct { - Credentials struct { - Password string `json:"password"` - Username string `json:"username"` - } `json:"credentials"` - Description *string `json:"description"` - FolderId *openapi_types.UUID `json:"folderId,omitempty"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - PolicyId *openapi_types.UUID `json:"policyId"` - RequireMfa *bool `json:"requireMfa,omitempty"` - ResourceId openapi_types.UUID `json:"resourceId"` -} - -// CreateRedisPamAccountJSONBody defines parameters for CreateRedisPamAccount. -type CreateRedisPamAccountJSONBody struct { + ConnectionDetails struct { + Database string `json:"database"` + Host string `json:"host"` + Port float32 `json:"port"` + SslCertificate *string `json:"sslCertificate,omitempty"` + SslEnabled bool `json:"sslEnabled"` + SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` + } `json:"connectionDetails"` Credentials struct { Password *string `json:"password,omitempty"` - Username *string `json:"username,omitempty"` + Username string `json:"username"` } `json:"credentials"` - Description *string `json:"description"` - FolderId *openapi_types.UUID `json:"folderId,omitempty"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - PolicyId *openapi_types.UUID `json:"policyId"` - RequireMfa *bool `json:"requireMfa,omitempty"` - ResourceId openapi_types.UUID `json:"resourceId"` + + // Description Optional description of the account + Description *string `json:"description,omitempty"` + + // FolderId The ID of the folder to place the account in + FolderId openapi_types.UUID `json:"folderId"` + + // GatewayId The ID of the gateway to use + GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` + + // GatewayPoolId The ID of the gateway pool to use + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"` + + // Name Name for the account + Name string `json:"name"` + + // RecordingConnectionId The ID of the recording connection to use + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId,omitempty"` + + // SettingsOverrides Account-level template settings overrides + SettingsOverrides *struct { + RecordingS3Config *struct { + Bucket string `json:"bucket"` + KeyPrefix *string `json:"keyPrefix,omitempty"` + Region CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion `json:"region"` + } `json:"recordingS3Config,omitempty"` + } `json:"settingsOverrides"` + + // TemplateId The ID of the account template to use + TemplateId openapi_types.UUID `json:"templateId"` } +// CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion defines parameters for CreatePostgresPamAccount. +type CreatePostgresPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion string + // CreateSshPamAccountJSONBody defines parameters for CreateSshPamAccount. type CreateSshPamAccountJSONBody struct { + ConnectionDetails struct { + Host string `json:"host"` + Port float32 `json:"port"` + } `json:"connectionDetails"` Credentials CreateSshPamAccountJSONBody_Credentials `json:"credentials"` - Description *string `json:"description"` - FolderId *openapi_types.UUID `json:"folderId,omitempty"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - PolicyId *openapi_types.UUID `json:"policyId"` - RequireMfa *bool `json:"requireMfa,omitempty"` - ResourceId openapi_types.UUID `json:"resourceId"` + + // Description Optional description of the account + Description *string `json:"description,omitempty"` + + // FolderId The ID of the folder to place the account in + FolderId openapi_types.UUID `json:"folderId"` + + // GatewayId The ID of the gateway to use + GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` + + // GatewayPoolId The ID of the gateway pool to use + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"` + + // Name Name for the account + Name string `json:"name"` + + // RecordingConnectionId The ID of the recording connection to use + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId,omitempty"` + + // SettingsOverrides Account-level template settings overrides + SettingsOverrides *struct { + RecordingS3Config *struct { + Bucket string `json:"bucket"` + KeyPrefix *string `json:"keyPrefix,omitempty"` + Region CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion `json:"region"` + } `json:"recordingS3Config,omitempty"` + } `json:"settingsOverrides"` + + // TemplateId The ID of the account template to use + TemplateId openapi_types.UUID `json:"templateId"` } // CreateSshPamAccountJSONBodyCredentials0 defines parameters for CreateSshPamAccount. type CreateSshPamAccountJSONBodyCredentials0 struct { AuthMethod CreateSshPamAccountJSONBodyCredentials0AuthMethod `json:"authMethod"` - Password string `json:"password"` + Password *string `json:"password,omitempty"` Username string `json:"username"` } @@ -1052,7 +1284,7 @@ type CreateSshPamAccountJSONBodyCredentials0AuthMethod string // CreateSshPamAccountJSONBodyCredentials1 defines parameters for CreateSshPamAccount. type CreateSshPamAccountJSONBodyCredentials1 struct { AuthMethod CreateSshPamAccountJSONBodyCredentials1AuthMethod `json:"authMethod"` - PrivateKey string `json:"privateKey"` + PrivateKey *string `json:"privateKey,omitempty"` Username string `json:"username"` } @@ -1073,204 +1305,67 @@ type CreateSshPamAccountJSONBody_Credentials struct { union json.RawMessage } +// CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion defines parameters for CreateSshPamAccount. +type CreateSshPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion string + // CreateWindowsPamAccountJSONBody defines parameters for CreateWindowsPamAccount. type CreateWindowsPamAccountJSONBody struct { - Credentials struct { - Password string `json:"password"` - Username string `json:"username"` - } `json:"credentials"` - Description *string `json:"description"` - FolderId *openapi_types.UUID `json:"folderId,omitempty"` - InternalMetadata struct { - AccountType CreateWindowsPamAccountJSONBodyInternalMetadataAccountType `json:"accountType"` - Enabled *bool `json:"enabled,omitempty"` - LastLogon *string `json:"lastLogon,omitempty"` - PasswordLastSet *string `json:"passwordLastSet,omitempty"` - Sid *string `json:"sid,omitempty"` - } `json:"internalMetadata"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - PolicyId *openapi_types.UUID `json:"policyId"` - RequireMfa *bool `json:"requireMfa,omitempty"` - ResourceId openapi_types.UUID `json:"resourceId"` -} - -// CreateWindowsPamAccountJSONBodyInternalMetadataAccountType defines parameters for CreateWindowsPamAccount. -type CreateWindowsPamAccountJSONBodyInternalMetadataAccountType string - -// CreateKubernetesPamResourceJSONBody defines parameters for CreateKubernetesPamResource. -type CreateKubernetesPamResourceJSONBody struct { ConnectionDetails struct { - SslCertificate *string `json:"sslCertificate,omitempty"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - Url string `json:"url"` + Host string `json:"host"` + Port int `json:"port"` + UseWinrmHttps *bool `json:"useWinrmHttps,omitempty"` + WinrmCaCert *string `json:"winrmCaCert,omitempty"` + WinrmPort *int `json:"winrmPort,omitempty"` + WinrmRejectUnauthorized *bool `json:"winrmRejectUnauthorized,omitempty"` } `json:"connectionDetails"` - GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - RotationAccountCredentials *CreateKubernetesPamResourceJSONBody_RotationAccountCredentials `json:"rotationAccountCredentials"` -} - -// CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0 defines parameters for CreateKubernetesPamResource. -type CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0 struct { - AuthMethod CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod `json:"authMethod"` - ServiceAccountToken string `json:"serviceAccountToken"` -} - -// CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod defines parameters for CreateKubernetesPamResource. -type CreateKubernetesPamResourceJSONBodyRotationAccountCredentials0AuthMethod string - -// CreateKubernetesPamResourceJSONBodyRotationAccountCredentials1 defines parameters for CreateKubernetesPamResource. -type CreateKubernetesPamResourceJSONBodyRotationAccountCredentials1 struct { - AuthMethod CreateKubernetesPamResourceJSONBodyRotationAccountCredentials1AuthMethod `json:"authMethod"` - Namespace string `json:"namespace"` - ServiceAccountName string `json:"serviceAccountName"` -} - -// CreateKubernetesPamResourceJSONBodyRotationAccountCredentials1AuthMethod defines parameters for CreateKubernetesPamResource. -type CreateKubernetesPamResourceJSONBodyRotationAccountCredentials1AuthMethod string + Credentials struct { + Password *string `json:"password,omitempty"` + Username string `json:"username"` + } `json:"credentials"` -// CreateKubernetesPamResourceJSONBody_RotationAccountCredentials defines parameters for CreateKubernetesPamResource. -type CreateKubernetesPamResourceJSONBody_RotationAccountCredentials struct { - union json.RawMessage -} + // Description Optional description of the account + Description *string `json:"description,omitempty"` -// CreatePostgresPamResourceJSONBody defines parameters for CreatePostgresPamResource. -type CreatePostgresPamResourceJSONBody struct { - ConnectionDetails struct { - Database string `json:"database"` - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - RotationAccountCredentials *struct { - Password string `json:"password"` - Username string `json:"username"` - } `json:"rotationAccountCredentials"` -} + // FolderId The ID of the folder to place the account in + FolderId openapi_types.UUID `json:"folderId"` -// CreateRedisPamResourceJSONBody defines parameters for CreateRedisPamResource. -type CreateRedisPamResourceJSONBody struct { - ConnectionDetails struct { - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - RotationAccountCredentials *struct { - Password *string `json:"password,omitempty"` - Username *string `json:"username,omitempty"` - } `json:"rotationAccountCredentials"` -} + // GatewayId The ID of the gateway to use + GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` -// CreateSshPamResourceJSONBody defines parameters for CreateSshPamResource. -type CreateSshPamResourceJSONBody struct { - ConnectionDetails struct { - Host string `json:"host"` - Port float32 `json:"port"` - } `json:"connectionDetails"` - GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` + // GatewayPoolId The ID of the gateway pool to use GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - RotationAccountCredentials *CreateSshPamResourceJSONBody_RotationAccountCredentials `json:"rotationAccountCredentials"` -} - -// CreateSshPamResourceJSONBodyRotationAccountCredentials0 defines parameters for CreateSshPamResource. -type CreateSshPamResourceJSONBodyRotationAccountCredentials0 struct { - AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod `json:"authMethod"` - Password string `json:"password"` - Username string `json:"username"` -} -// CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod defines parameters for CreateSshPamResource. -type CreateSshPamResourceJSONBodyRotationAccountCredentials0AuthMethod string + // Name Name for the account + Name string `json:"name"` -// CreateSshPamResourceJSONBodyRotationAccountCredentials1 defines parameters for CreateSshPamResource. -type CreateSshPamResourceJSONBodyRotationAccountCredentials1 struct { - AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod `json:"authMethod"` - PrivateKey string `json:"privateKey"` - Username string `json:"username"` -} + // RecordingConnectionId The ID of the recording connection to use + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId,omitempty"` -// CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod defines parameters for CreateSshPamResource. -type CreateSshPamResourceJSONBodyRotationAccountCredentials1AuthMethod string + // SettingsOverrides Account-level template settings overrides + SettingsOverrides *struct { + RecordingS3Config *struct { + Bucket string `json:"bucket"` + KeyPrefix *string `json:"keyPrefix,omitempty"` + Region CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion `json:"region"` + } `json:"recordingS3Config,omitempty"` + } `json:"settingsOverrides"` -// CreateSshPamResourceJSONBodyRotationAccountCredentials2 defines parameters for CreateSshPamResource. -type CreateSshPamResourceJSONBodyRotationAccountCredentials2 struct { - AuthMethod CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod `json:"authMethod"` - Username string `json:"username"` + // TemplateId The ID of the account template to use + TemplateId openapi_types.UUID `json:"templateId"` } -// CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod defines parameters for CreateSshPamResource. -type CreateSshPamResourceJSONBodyRotationAccountCredentials2AuthMethod string +// CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion defines parameters for CreateWindowsPamAccount. +type CreateWindowsPamAccountJSONBodySettingsOverridesRecordingS3ConfigRegion string -// CreateSshPamResourceJSONBody_RotationAccountCredentials defines parameters for CreateSshPamResource. -type CreateSshPamResourceJSONBody_RotationAccountCredentials struct { - union json.RawMessage -} +// CreatePamFolderJSONBody defines parameters for CreatePamFolder. +type CreatePamFolderJSONBody struct { + // Description Optional description + Description *string `json:"description,omitempty"` -// CreateWindowsPamResourceJSONBody defines parameters for CreateWindowsPamResource. -type CreateWindowsPamResourceJSONBody struct { - ConnectionDetails struct { - Hostname string `json:"hostname"` - Port int `json:"port"` - Protocol CreateWindowsPamResourceJSONBodyConnectionDetailsProtocol `json:"protocol"` - UseWinrmHttps bool `json:"useWinrmHttps"` - WinrmCaCert *string `json:"winrmCaCert,omitempty"` - WinrmPort int `json:"winrmPort"` - WinrmRejectUnauthorized bool `json:"winrmRejectUnauthorized"` - WinrmTlsServerName *string `json:"winrmTlsServerName,omitempty"` - } `json:"connectionDetails"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId,omitempty"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId,omitempty"` - Metadata *[]struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - RotationAccountCredentials *struct { - Password string `json:"password"` - Username string `json:"username"` - } `json:"rotationAccountCredentials"` + // Name Name for the folder + Name string `json:"name"` } -// CreateWindowsPamResourceJSONBodyConnectionDetailsProtocol defines parameters for CreateWindowsPamResource. -type CreateWindowsPamResourceJSONBodyConnectionDetailsProtocol string - // CreateProjectJSONBody defines parameters for CreateProject. type CreateProjectJSONBody struct { HasDeleteProtection *bool `json:"hasDeleteProtection,omitempty"` @@ -1536,32 +1631,20 @@ type CreateCertificateProfileJSONRequestBody CreateCertificateProfileJSONBody // CreateMachineIdentityJSONRequestBody defines body for CreateMachineIdentity for application/json ContentType. type CreateMachineIdentityJSONRequestBody CreateMachineIdentityJSONBody +// CreatePamAccountTemplateJSONRequestBody defines body for CreatePamAccountTemplate for application/json ContentType. +type CreatePamAccountTemplateJSONRequestBody CreatePamAccountTemplateJSONBody + // CreatePostgresPamAccountJSONRequestBody defines body for CreatePostgresPamAccount for application/json ContentType. type CreatePostgresPamAccountJSONRequestBody CreatePostgresPamAccountJSONBody -// CreateRedisPamAccountJSONRequestBody defines body for CreateRedisPamAccount for application/json ContentType. -type CreateRedisPamAccountJSONRequestBody CreateRedisPamAccountJSONBody - // CreateSshPamAccountJSONRequestBody defines body for CreateSshPamAccount for application/json ContentType. type CreateSshPamAccountJSONRequestBody CreateSshPamAccountJSONBody // CreateWindowsPamAccountJSONRequestBody defines body for CreateWindowsPamAccount for application/json ContentType. type CreateWindowsPamAccountJSONRequestBody CreateWindowsPamAccountJSONBody -// CreateKubernetesPamResourceJSONRequestBody defines body for CreateKubernetesPamResource for application/json ContentType. -type CreateKubernetesPamResourceJSONRequestBody CreateKubernetesPamResourceJSONBody - -// CreatePostgresPamResourceJSONRequestBody defines body for CreatePostgresPamResource for application/json ContentType. -type CreatePostgresPamResourceJSONRequestBody CreatePostgresPamResourceJSONBody - -// CreateRedisPamResourceJSONRequestBody defines body for CreateRedisPamResource for application/json ContentType. -type CreateRedisPamResourceJSONRequestBody CreateRedisPamResourceJSONBody - -// CreateSshPamResourceJSONRequestBody defines body for CreateSshPamResource for application/json ContentType. -type CreateSshPamResourceJSONRequestBody CreateSshPamResourceJSONBody - -// CreateWindowsPamResourceJSONRequestBody defines body for CreateWindowsPamResource for application/json ContentType. -type CreateWindowsPamResourceJSONRequestBody CreateWindowsPamResourceJSONBody +// CreatePamFolderJSONRequestBody defines body for CreatePamFolder for application/json ContentType. +type CreatePamFolderJSONRequestBody CreatePamFolderJSONBody // CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType. type CreateProjectJSONRequestBody CreateProjectJSONBody @@ -1719,16 +1802,16 @@ type ClientInterface interface { CreateMachineIdentity(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePamAccountTemplateWithBody request with any body + CreatePamAccountTemplateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePamAccountTemplate(ctx context.Context, body CreatePamAccountTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePostgresPamAccountWithBody request with any body CreatePostgresPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateRedisPamAccountWithBody request with any body - CreateRedisPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateRedisPamAccount(ctx context.Context, body CreateRedisPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSshPamAccountWithBody request with any body CreateSshPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1739,30 +1822,10 @@ type ClientInterface interface { CreateWindowsPamAccount(ctx context.Context, body CreateWindowsPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateKubernetesPamResourceWithBody request with any body - CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateKubernetesPamResource(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreatePostgresPamResourceWithBody request with any body - CreatePostgresPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreatePostgresPamResource(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateRedisPamResourceWithBody request with any body - CreateRedisPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePamFolderWithBody request with any body + CreatePamFolderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateRedisPamResource(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateSshPamResourceWithBody request with any body - CreateSshPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSshPamResource(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateWindowsPamResourceWithBody request with any body - CreateWindowsPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateWindowsPamResource(ctx context.Context, body CreateWindowsPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePamFolder(ctx context.Context, body CreatePamFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateProjectWithBody request with any body CreateProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2126,8 +2189,8 @@ func (c *Client) CreateMachineIdentity(ctx context.Context, body CreateMachineId return c.Client.Do(req) } -func (c *Client) CreatePostgresPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePostgresPamAccountRequestWithBody(c.Server, contentType, body) +func (c *Client) CreatePamAccountTemplateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePamAccountTemplateRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2138,8 +2201,8 @@ func (c *Client) CreatePostgresPamAccountWithBody(ctx context.Context, contentTy return c.Client.Do(req) } -func (c *Client) CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePostgresPamAccountRequest(c.Server, body) +func (c *Client) CreatePamAccountTemplate(ctx context.Context, body CreatePamAccountTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePamAccountTemplateRequest(c.Server, body) if err != nil { return nil, err } @@ -2150,8 +2213,8 @@ func (c *Client) CreatePostgresPamAccount(ctx context.Context, body CreatePostgr return c.Client.Do(req) } -func (c *Client) CreateRedisPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateRedisPamAccountRequestWithBody(c.Server, contentType, body) +func (c *Client) CreatePostgresPamAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamAccountRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2162,8 +2225,8 @@ func (c *Client) CreateRedisPamAccountWithBody(ctx context.Context, contentType return c.Client.Do(req) } -func (c *Client) CreateRedisPamAccount(ctx context.Context, body CreateRedisPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateRedisPamAccountRequest(c.Server, body) +func (c *Client) CreatePostgresPamAccount(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePostgresPamAccountRequest(c.Server, body) if err != nil { return nil, err } @@ -2222,32 +2285,8 @@ func (c *Client) CreateWindowsPamAccount(ctx context.Context, body CreateWindows return c.Client.Do(req) } -func (c *Client) CreateKubernetesPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateKubernetesPamResourceRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateKubernetesPamResource(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateKubernetesPamResourceRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreatePostgresPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePostgresPamResourceRequestWithBody(c.Server, contentType, body) +func (c *Client) CreatePamFolderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePamFolderRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2258,80 +2297,8 @@ func (c *Client) CreatePostgresPamResourceWithBody(ctx context.Context, contentT return c.Client.Do(req) } -func (c *Client) CreatePostgresPamResource(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePostgresPamResourceRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateRedisPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateRedisPamResourceRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateRedisPamResource(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateRedisPamResourceRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSshPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSshPamResourceRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSshPamResource(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSshPamResourceRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateWindowsPamResourceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateWindowsPamResourceRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateWindowsPamResource(ctx context.Context, body CreateWindowsPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateWindowsPamResourceRequest(c.Server, body) +func (c *Client) CreatePamFolder(ctx context.Context, body CreatePamFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePamFolderRequest(c.Server, body) if err != nil { return nil, err } @@ -3092,19 +3059,19 @@ func NewCreateMachineIdentityRequestWithBody(server string, contentType string, return req, nil } -// NewCreatePostgresPamAccountRequest calls the generic CreatePostgresPamAccount builder with application/json body -func NewCreatePostgresPamAccountRequest(server string, body CreatePostgresPamAccountJSONRequestBody) (*http.Request, error) { +// NewCreatePamAccountTemplateRequest calls the generic CreatePamAccountTemplate builder with application/json body +func NewCreatePamAccountTemplateRequest(server string, body CreatePamAccountTemplateJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePostgresPamAccountRequestWithBody(server, "application/json", bodyReader) + return NewCreatePamAccountTemplateRequestWithBody(server, "application/json", bodyReader) } -// NewCreatePostgresPamAccountRequestWithBody generates requests for CreatePostgresPamAccount with any type of body -func NewCreatePostgresPamAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePamAccountTemplateRequestWithBody generates requests for CreatePamAccountTemplate with any type of body +func NewCreatePamAccountTemplateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3112,7 +3079,7 @@ func NewCreatePostgresPamAccountRequestWithBody(server string, contentType strin return nil, err } - operationPath := fmt.Sprintf("/api/v1/pam/accounts/postgres") + operationPath := fmt.Sprintf("/api/v1/pam/account-templates") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3132,19 +3099,19 @@ func NewCreatePostgresPamAccountRequestWithBody(server string, contentType strin return req, nil } -// NewCreateRedisPamAccountRequest calls the generic CreateRedisPamAccount builder with application/json body -func NewCreateRedisPamAccountRequest(server string, body CreateRedisPamAccountJSONRequestBody) (*http.Request, error) { +// NewCreatePostgresPamAccountRequest calls the generic CreatePostgresPamAccount builder with application/json body +func NewCreatePostgresPamAccountRequest(server string, body CreatePostgresPamAccountJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateRedisPamAccountRequestWithBody(server, "application/json", bodyReader) + return NewCreatePostgresPamAccountRequestWithBody(server, "application/json", bodyReader) } -// NewCreateRedisPamAccountRequestWithBody generates requests for CreateRedisPamAccount with any type of body -func NewCreateRedisPamAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePostgresPamAccountRequestWithBody generates requests for CreatePostgresPamAccount with any type of body +func NewCreatePostgresPamAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3152,7 +3119,7 @@ func NewCreateRedisPamAccountRequestWithBody(server string, contentType string, return nil, err } - operationPath := fmt.Sprintf("/api/v1/pam/accounts/redis") + operationPath := fmt.Sprintf("/api/v1/pam/accounts/postgres") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3252,179 +3219,19 @@ func NewCreateWindowsPamAccountRequestWithBody(server string, contentType string return req, nil } -// NewCreateKubernetesPamResourceRequest calls the generic CreateKubernetesPamResource builder with application/json body -func NewCreateKubernetesPamResourceRequest(server string, body CreateKubernetesPamResourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateKubernetesPamResourceRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateKubernetesPamResourceRequestWithBody generates requests for CreateKubernetesPamResource with any type of body -func NewCreateKubernetesPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/pam/resources/kubernetes") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreatePostgresPamResourceRequest calls the generic CreatePostgresPamResource builder with application/json body -func NewCreatePostgresPamResourceRequest(server string, body CreatePostgresPamResourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreatePostgresPamResourceRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreatePostgresPamResourceRequestWithBody generates requests for CreatePostgresPamResource with any type of body -func NewCreatePostgresPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/pam/resources/postgres") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateRedisPamResourceRequest calls the generic CreateRedisPamResource builder with application/json body -func NewCreateRedisPamResourceRequest(server string, body CreateRedisPamResourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateRedisPamResourceRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateRedisPamResourceRequestWithBody generates requests for CreateRedisPamResource with any type of body -func NewCreateRedisPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/pam/resources/redis") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateSshPamResourceRequest calls the generic CreateSshPamResource builder with application/json body -func NewCreateSshPamResourceRequest(server string, body CreateSshPamResourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSshPamResourceRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateSshPamResourceRequestWithBody generates requests for CreateSshPamResource with any type of body -func NewCreateSshPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/v1/pam/resources/ssh") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateWindowsPamResourceRequest calls the generic CreateWindowsPamResource builder with application/json body -func NewCreateWindowsPamResourceRequest(server string, body CreateWindowsPamResourceJSONRequestBody) (*http.Request, error) { +// NewCreatePamFolderRequest calls the generic CreatePamFolder builder with application/json body +func NewCreatePamFolderRequest(server string, body CreatePamFolderJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateWindowsPamResourceRequestWithBody(server, "application/json", bodyReader) + return NewCreatePamFolderRequestWithBody(server, "application/json", bodyReader) } -// NewCreateWindowsPamResourceRequestWithBody generates requests for CreateWindowsPamResource with any type of body -func NewCreateWindowsPamResourceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePamFolderRequestWithBody generates requests for CreatePamFolder with any type of body +func NewCreatePamFolderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3432,7 +3239,7 @@ func NewCreateWindowsPamResourceRequestWithBody(server string, contentType strin return nil, err } - operationPath := fmt.Sprintf("/api/v1/pam/resources/windows") + operationPath := fmt.Sprintf("/api/v1/pam/folders") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4195,16 +4002,16 @@ type ClientWithResponsesInterface interface { CreateMachineIdentityWithResponse(ctx context.Context, body CreateMachineIdentityJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMachineIdentityResponse, error) + // CreatePamAccountTemplateWithBodyWithResponse request with any body + CreatePamAccountTemplateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePamAccountTemplateResponse, error) + + CreatePamAccountTemplateWithResponse(ctx context.Context, body CreatePamAccountTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePamAccountTemplateResponse, error) + // CreatePostgresPamAccountWithBodyWithResponse request with any body CreatePostgresPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) - // CreateRedisPamAccountWithBodyWithResponse request with any body - CreateRedisPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamAccountResponse, error) - - CreateRedisPamAccountWithResponse(ctx context.Context, body CreateRedisPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamAccountResponse, error) - // CreateSshPamAccountWithBodyWithResponse request with any body CreateSshPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamAccountResponse, error) @@ -4215,30 +4022,10 @@ type ClientWithResponsesInterface interface { CreateWindowsPamAccountWithResponse(ctx context.Context, body CreateWindowsPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWindowsPamAccountResponse, error) - // CreateKubernetesPamResourceWithBodyWithResponse request with any body - CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) - - CreateKubernetesPamResourceWithResponse(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) - - // CreatePostgresPamResourceWithBodyWithResponse request with any body - CreatePostgresPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) - - CreatePostgresPamResourceWithResponse(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) - - // CreateRedisPamResourceWithBodyWithResponse request with any body - CreateRedisPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) + // CreatePamFolderWithBodyWithResponse request with any body + CreatePamFolderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePamFolderResponse, error) - CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) - - // CreateSshPamResourceWithBodyWithResponse request with any body - CreateSshPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) - - CreateSshPamResourceWithResponse(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) - - // CreateWindowsPamResourceWithBodyWithResponse request with any body - CreateWindowsPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWindowsPamResourceResponse, error) - - CreateWindowsPamResourceWithResponse(ctx context.Context, body CreateWindowsPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWindowsPamResourceResponse, error) + CreatePamFolderWithResponse(ctx context.Context, body CreatePamFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePamFolderResponse, error) // CreateProjectWithBodyWithResponse request with any body CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) @@ -4285,12 +4072,14 @@ type AdminSignUpResponse struct { Message string `json:"message"` New string `json:"new"` Organization struct { + AllowCrossProjectSecretSharing *bool `json:"allowCrossProjectSecretSharing,omitempty"` AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization"` AuthEnforced *bool `json:"authEnforced"` BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"` BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"` CreatedAt time.Time `json:"createdAt"` CustomerId *string `json:"customerId"` + DefaultCertManagerProjectId *string `json:"defaultCertManagerProjectId"` DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"` EnforceMfa *bool `json:"enforceMfa,omitempty"` GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"` @@ -4439,9 +4228,12 @@ type CreateAwsAppConnectionResponse struct { } } type CreateAwsAppConnection200AppConnection0 struct { - App CreateAwsAppConnection200AppConnection0App `json:"app"` - CreatedAt time.Time `json:"createdAt"` - Credentials map[string]interface{} `json:"credentials"` + App CreateAwsAppConnection200AppConnection0App `json:"app"` + CreatedAt time.Time `json:"createdAt"` + Credentials struct { + // StsEndpoint An optional custom endpoint URL for the AWS STS API to use when connecting with AWS. + StsEndpoint *string `json:"stsEndpoint,omitempty"` + } `json:"credentials"` CredentialsHash *string `json:"credentialsHash,omitempty"` Description *string `json:"description"` GatewayId *openapi_types.UUID `json:"gatewayId"` @@ -5119,16 +4911,12 @@ type CreateAcmeCertificateAuthorityV1Response struct { // DnsResolver An optional custom DNS resolver IP address to use for verifying DNS propagation during ACME challenges. Must be a valid IP address (e.g. 8.8.8.8). When not set, the system default DNS resolver is used. DnsResolver *string `json:"dnsResolver,omitempty"` - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. EabKid *string `json:"eabKid,omitempty"` } `json:"configuration"` EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` Id openapi_types.UUID `json:"id"` Name string `json:"name"` - ProjectId string `json:"projectId"` Status CreateAcmeCertificateAuthorityV1200Status `json:"status"` Type CreateAcmeCertificateAuthorityV1200Type `json:"type"` } @@ -5221,16 +5009,12 @@ type UpdateAcmeCertificateAuthorityV1Response struct { // DnsResolver An optional custom DNS resolver IP address to use for verifying DNS propagation during ACME challenges. Must be a valid IP address (e.g. 8.8.8.8). When not set, the system default DNS resolver is used. DnsResolver *string `json:"dnsResolver,omitempty"` - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. EabKid *string `json:"eabKid,omitempty"` } `json:"configuration"` EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` Id openapi_types.UUID `json:"id"` Name string `json:"name"` - ProjectId string `json:"projectId"` Status UpdateAcmeCertificateAuthorityV1200Status `json:"status"` Type UpdateAcmeCertificateAuthorityV1200Type `json:"type"` } @@ -5312,16 +5096,28 @@ type CreateInternalCertificateAuthorityV1Response struct { // Country The country name (C) for the CA. Country *string `json:"country,omitempty"` - // CrlDistributionPointUrls Additional CRL Distribution Point URLs (HTTP/HTTPS) embedded in every certificate issued by this CA. Up to 4 URLs; the Infisical-managed CRL endpoint is always included as the primary. + // CrlDistributionPointUrls Additional CRL Distribution Point URLs (HTTP/HTTPS) embedded in every certificate issued by this CA. Up to 4 URLs; the Infisical-managed CRL endpoint is included by default unless disabled. CrlDistributionPointUrls *[]string `json:"crlDistributionPointUrls,omitempty"` - Dn *string `json:"dn"` + + // DisableManagedCrlDistributionPointUrl When set to true, the Infisical-managed CRL endpoint URL will not be embedded in certificates issued by this CA. Only custom CRL Distribution Point URLs (if any) will be included. + DisableManagedCrlDistributionPointUrl *bool `json:"disableManagedCrlDistributionPointUrl,omitempty"` + Dn *string `json:"dn"` // FriendlyName A friendly name for the CA. FriendlyName *string `json:"friendlyName,omitempty"` + // HsmConnectorId The ID of the HSM Connector to generate and store the CA's signing key in. Required when keySource is 'hsm'. + HsmConnectorId *openapi_types.UUID `json:"hsmConnectorId,omitempty"` + + // HsmKeyLabel The label of the CA's signing key on the HSM. Not user-supplied: it is the HSM Connector's configured key name prefix followed by a per-CA label built from the CA name and a random 5-character suffix (ca--). + HsmKeyLabel *string `json:"hsmKeyLabel,omitempty"` + // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. KeyAlgorithm CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm `json:"keyAlgorithm"` + // KeySource Where the CA's signing key is generated and stored. 'infisical' keeps the key in Infisical's KMS; 'hsm' generates and stores the key in the HSM reached through the specified HSM Connector. + KeySource *CreateInternalCertificateAuthorityV1200ConfigurationKeySource `json:"keySource,omitempty"` + // Locality The locality name for the CA. Locality *string `json:"locality,omitempty"` @@ -5351,7 +5147,6 @@ type CreateInternalCertificateAuthorityV1Response struct { EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` Id openapi_types.UUID `json:"id"` Name string `json:"name"` - ProjectId string `json:"projectId"` Status CreateInternalCertificateAuthorityV1200Status `json:"status"` Type CreateInternalCertificateAuthorityV1200Type `json:"type"` } @@ -5395,6 +5190,7 @@ type CreateInternalCertificateAuthorityV1Response struct { } } type CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm string +type CreateInternalCertificateAuthorityV1200ConfigurationKeySource string type CreateInternalCertificateAuthorityV1200ConfigurationType string type CreateInternalCertificateAuthorityV1200Status string type CreateInternalCertificateAuthorityV1200Type string @@ -5447,9 +5243,8 @@ type CreateCertificatePolicyResponse struct { Denied *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesDenied `json:"denied,omitempty"` Required *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesRequired `json:"required,omitempty"` } `json:"keyUsages,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - Sans *[]struct { + Name string `json:"name"` + Sans *[]struct { Allowed *[]string `json:"allowed,omitempty"` Denied *[]string `json:"denied,omitempty"` Required *[]string `json:"required,omitempty"` @@ -5555,6 +5350,7 @@ type CreateCertificateProfileResponse struct { } `json:"basicConstraints,omitempty"` CommonName *string `json:"commonName,omitempty"` Country *string `json:"country,omitempty"` + DomainComponents *[]string `json:"domainComponents,omitempty"` ExtendedKeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` KeyAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` KeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsKeyUsages `json:"keyUsages,omitempty"` @@ -5563,7 +5359,11 @@ type CreateCertificateProfileResponse struct { OrganizationalUnit *string `json:"organizationalUnit,omitempty"` SignatureAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` State *string `json:"state,omitempty"` - TtlDays *float32 `json:"ttlDays,omitempty"` + SubjectAltNames *[]struct { + Type CreateCertificateProfile200CertificateProfileDefaultsSubjectAltNamesType `json:"type"` + Value string `json:"value"` + } `json:"subjectAltNames,omitempty"` + TtlDays *float32 `json:"ttlDays,omitempty"` } `json:"defaults"` Description *string `json:"description"` EnrollmentType string `json:"enrollmentType"` @@ -5571,7 +5371,6 @@ type CreateCertificateProfileResponse struct { ExternalConfigs *CreateCertificateProfile_200_CertificateProfile_ExternalConfigs `json:"externalConfigs"` Id openapi_types.UUID `json:"id"` IssuerType *string `json:"issuerType,omitempty"` - ProjectId string `json:"projectId"` ScepConfigId *openapi_types.UUID `json:"scepConfigId"` Slug string `json:"slug"` UpdatedAt time.Time `json:"updatedAt"` @@ -5620,16 +5419,22 @@ type CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages stri type CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm string type CreateCertificateProfile200CertificateProfileDefaultsKeyUsages string type CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm string +type CreateCertificateProfile200CertificateProfileDefaultsSubjectAltNamesType string type CreateCertificateProfile200CertificateProfileExternalConfigs0 struct { // Template Certificate template name for Azure AD CS Template string `json:"template"` } -type CreateCertificateProfile200CertificateProfileExternalConfigs1 = map[string]interface{} +type CreateCertificateProfile200CertificateProfileExternalConfigs1 struct { + // Template Certificate template name for Active Directory Certificate Service + Template string `json:"template"` +} type CreateCertificateProfile200CertificateProfileExternalConfigs2 = map[string]interface{} type CreateCertificateProfile200CertificateProfileExternalConfigs3 = map[string]interface{} type CreateCertificateProfile200CertificateProfileExternalConfigs4 = map[string]interface{} type CreateCertificateProfile200CertificateProfileExternalConfigs5 = map[string]interface{} type CreateCertificateProfile200CertificateProfileExternalConfigs6 = map[string]interface{} +type CreateCertificateProfile200CertificateProfileExternalConfigs7 = map[string]interface{} +type CreateCertificateProfile200CertificateProfileExternalConfigs8 = map[string]interface{} type CreateCertificateProfile_200_CertificateProfile_ExternalConfigs struct { union json.RawMessage } @@ -5739,101 +5544,73 @@ func (r CreateMachineIdentityResponse) StatusCode() int { return 0 } -type CreatePostgresPamAccountResponse struct { +type CreatePamAccountTemplateResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials struct { - Username string `json:"username"` - } `json:"credentials"` - Description *string `json:"description"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - Domain *struct { - DomainType string `json:"domainType"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - } `json:"domain"` - DomainId *openapi_types.UUID `json:"domainId"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata interface{} `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ParentType CreatePostgresPamAccount200AccountParentType `json:"parentType"` - PolicyId *openapi_types.UUID `json:"policyId"` - PolicyName *string `json:"policyName"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - RequireReason *bool `json:"requireReason,omitempty"` - Resource *struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId *openapi_types.UUID `json:"resourceId"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"account"` + CorsProbeUrl *string `json:"corsProbeUrl"` + Template struct { + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + Policies interface{} `json:"policies"` + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId"` + Settings interface{} `json:"settings"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"template"` } JSON400 *struct { Details interface{} `json:"details,omitempty"` Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount400StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate400StatusCode `json:"statusCode"` } JSON401 *struct { Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount401StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate401StatusCode `json:"statusCode"` } JSON403 *struct { Details interface{} `json:"details,omitempty"` Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount403StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate403StatusCode `json:"statusCode"` } JSON404 *struct { Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount404StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate404StatusCode `json:"statusCode"` } JSON422 *struct { Error string `json:"error"` Message interface{} `json:"message,omitempty"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount422StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate422StatusCode `json:"statusCode"` } JSON500 *struct { Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount500StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate500StatusCode `json:"statusCode"` } } -type CreatePostgresPamAccount200AccountParentType string -type CreatePostgresPamAccount400StatusCode float32 -type CreatePostgresPamAccount401StatusCode float32 -type CreatePostgresPamAccount403StatusCode float32 -type CreatePostgresPamAccount404StatusCode float32 -type CreatePostgresPamAccount422StatusCode float32 -type CreatePostgresPamAccount500StatusCode float32 +type CreatePamAccountTemplate400StatusCode float32 +type CreatePamAccountTemplate401StatusCode float32 +type CreatePamAccountTemplate403StatusCode float32 +type CreatePamAccountTemplate404StatusCode float32 +type CreatePamAccountTemplate422StatusCode float32 +type CreatePamAccountTemplate500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreatePostgresPamAccountResponse) Status() string { +func (r CreatePamAccountTemplateResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5841,108 +5618,84 @@ func (r CreatePostgresPamAccountResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreatePostgresPamAccountResponse) StatusCode() int { +func (r CreatePamAccountTemplateResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateRedisPamAccountResponse struct { +type CreatePostgresPamAccountResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials struct { - Username *string `json:"username,omitempty"` - } `json:"credentials"` - Description *string `json:"description"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - Domain *struct { - DomainType string `json:"domainType"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - } `json:"domain"` - DomainId *openapi_types.UUID `json:"domainId"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata interface{} `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ParentType CreateRedisPamAccount200AccountParentType `json:"parentType"` - PolicyId *openapi_types.UUID `json:"policyId"` - PolicyName *string `json:"policyName"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - RequireReason *bool `json:"requireReason,omitempty"` - Resource *struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId *openapi_types.UUID `json:"resourceId"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` + AccountType string `json:"accountType"` + ConnectionDetails map[string]interface{} `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId"` + FolderName string `json:"folderName"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId"` + SettingsOverrides interface{} `json:"settingsOverrides"` + TemplateId openapi_types.UUID `json:"templateId"` + TemplateName string `json:"templateName"` + UpdatedAt time.Time `json:"updatedAt"` } `json:"account"` + CorsProbeUrl *string `json:"corsProbeUrl"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount500StatusCode `json:"statusCode"` } } -type CreateRedisPamAccount200AccountParentType string -type CreateRedisPamAccount400StatusCode float32 -type CreateRedisPamAccount401StatusCode float32 -type CreateRedisPamAccount403StatusCode float32 -type CreateRedisPamAccount404StatusCode float32 -type CreateRedisPamAccount422StatusCode float32 -type CreateRedisPamAccount500StatusCode float32 +type CreatePostgresPamAccount400StatusCode float32 +type CreatePostgresPamAccount401StatusCode float32 +type CreatePostgresPamAccount403StatusCode float32 +type CreatePostgresPamAccount404StatusCode float32 +type CreatePostgresPamAccount422StatusCode float32 +type CreatePostgresPamAccount500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateRedisPamAccountResponse) Status() string { +func (r CreatePostgresPamAccountResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5950,7 +5703,7 @@ func (r CreateRedisPamAccountResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateRedisPamAccountResponse) StatusCode() int { +func (r CreatePostgresPamAccountResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -5962,44 +5715,23 @@ type CreateSshPamAccountResponse struct { HTTPResponse *http.Response JSON200 *struct { Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials CreateSshPamAccount_200_Account_Credentials `json:"credentials"` - Description *string `json:"description"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - Domain *struct { - DomainType string `json:"domainType"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - } `json:"domain"` - DomainId *openapi_types.UUID `json:"domainId"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata interface{} `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ParentType CreateSshPamAccount200AccountParentType `json:"parentType"` - PolicyId *openapi_types.UUID `json:"policyId"` - PolicyName *string `json:"policyName"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - RequireReason *bool `json:"requireReason,omitempty"` - Resource *struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId *openapi_types.UUID `json:"resourceId"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` + AccountType string `json:"accountType"` + ConnectionDetails map[string]interface{} `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId"` + FolderName string `json:"folderName"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId"` + SettingsOverrides interface{} `json:"settingsOverrides"` + TemplateId openapi_types.UUID `json:"templateId"` + TemplateName string `json:"templateName"` + UpdatedAt time.Time `json:"updatedAt"` } `json:"account"` + CorsProbeUrl *string `json:"corsProbeUrl"` } JSON400 *struct { Details interface{} `json:"details,omitempty"` @@ -6040,25 +5772,6 @@ type CreateSshPamAccountResponse struct { StatusCode CreateSshPamAccount500StatusCode `json:"statusCode"` } } -type CreateSshPamAccount200AccountCredentials0 struct { - AuthMethod CreateSshPamAccount200AccountCredentials0AuthMethod `json:"authMethod"` - Username string `json:"username"` -} -type CreateSshPamAccount200AccountCredentials0AuthMethod string -type CreateSshPamAccount200AccountCredentials1 struct { - AuthMethod CreateSshPamAccount200AccountCredentials1AuthMethod `json:"authMethod"` - Username string `json:"username"` -} -type CreateSshPamAccount200AccountCredentials1AuthMethod string -type CreateSshPamAccount200AccountCredentials2 struct { - AuthMethod CreateSshPamAccount200AccountCredentials2AuthMethod `json:"authMethod"` - Username string `json:"username"` -} -type CreateSshPamAccount200AccountCredentials2AuthMethod string -type CreateSshPamAccount_200_Account_Credentials struct { - union json.RawMessage -} -type CreateSshPamAccount200AccountParentType string type CreateSshPamAccount400StatusCode float32 type CreateSshPamAccount401StatusCode float32 type CreateSshPamAccount403StatusCode float32 @@ -6087,52 +5800,23 @@ type CreateWindowsPamAccountResponse struct { HTTPResponse *http.Response JSON200 *struct { Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials struct { - Username string `json:"username"` - } `json:"credentials"` - Description *string `json:"description"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - Domain *struct { - DomainType string `json:"domainType"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - } `json:"domain"` - DomainId *openapi_types.UUID `json:"domainId"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata struct { - AccountType CreateWindowsPamAccount200AccountInternalMetadataAccountType `json:"accountType"` - Enabled *bool `json:"enabled,omitempty"` - LastLogon *string `json:"lastLogon,omitempty"` - PasswordLastSet *string `json:"passwordLastSet,omitempty"` - Sid *string `json:"sid,omitempty"` - } `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ParentType CreateWindowsPamAccount200AccountParentType `json:"parentType"` - PolicyId *openapi_types.UUID `json:"policyId"` - PolicyName *string `json:"policyName"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - RequireReason *bool `json:"requireReason,omitempty"` - Resource *struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId *openapi_types.UUID `json:"resourceId"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` + AccountType string `json:"accountType"` + ConnectionDetails map[string]interface{} `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId"` + FolderName string `json:"folderName"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId"` + SettingsOverrides interface{} `json:"settingsOverrides"` + TemplateId openapi_types.UUID `json:"templateId"` + TemplateName string `json:"templateName"` + UpdatedAt time.Time `json:"updatedAt"` } `json:"account"` + CorsProbeUrl *string `json:"corsProbeUrl"` } JSON400 *struct { Details interface{} `json:"details,omitempty"` @@ -6173,8 +5857,6 @@ type CreateWindowsPamAccountResponse struct { StatusCode CreateWindowsPamAccount500StatusCode `json:"statusCode"` } } -type CreateWindowsPamAccount200AccountInternalMetadataAccountType string -type CreateWindowsPamAccount200AccountParentType string type CreateWindowsPamAccount400StatusCode float32 type CreateWindowsPamAccount401StatusCode float32 type CreateWindowsPamAccount403StatusCode float32 @@ -6198,524 +5880,66 @@ func (r CreateWindowsPamAccountResponse) StatusCode() int { return 0 } -type CreateKubernetesPamResourceResponse struct { +type CreatePamFolderResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Resource struct { - ConnectionDetails struct { - SslCertificate *string `json:"sslCertificate,omitempty"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - Url string `json:"url"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateKubernetesPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *CreateKubernetesPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreateKubernetesPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` + Folder struct { + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"folder"` } JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource500StatusCode `json:"statusCode"` - } -} -type CreateKubernetesPamResource200ResourceResourceType string -type CreateKubernetesPamResource200ResourceRotationAccountCredentials0 struct { - AuthMethod CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod `json:"authMethod"` -} -type CreateKubernetesPamResource200ResourceRotationAccountCredentials0AuthMethod string -type CreateKubernetesPamResource200ResourceRotationAccountCredentials1 struct { - AuthMethod CreateKubernetesPamResource200ResourceRotationAccountCredentials1AuthMethod `json:"authMethod"` - Namespace string `json:"namespace"` - ServiceAccountName string `json:"serviceAccountName"` -} -type CreateKubernetesPamResource200ResourceRotationAccountCredentials1AuthMethod string -type CreateKubernetesPamResource_200_Resource_RotationAccountCredentials struct { - union json.RawMessage -} -type CreateKubernetesPamResource200ResourceSessionSummaryConfigModel string -type CreateKubernetesPamResource400StatusCode float32 -type CreateKubernetesPamResource401StatusCode float32 -type CreateKubernetesPamResource403StatusCode float32 -type CreateKubernetesPamResource404StatusCode float32 -type CreateKubernetesPamResource422StatusCode float32 -type CreateKubernetesPamResource500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r CreateKubernetesPamResourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateKubernetesPamResourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreatePostgresPamResourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Resource struct { - ConnectionDetails struct { - Database string `json:"database"` - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreatePostgresPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username string `json:"username"` - } `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreatePostgresPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource500StatusCode `json:"statusCode"` - } -} -type CreatePostgresPamResource200ResourceResourceType string -type CreatePostgresPamResource200ResourceSessionSummaryConfigModel string -type CreatePostgresPamResource400StatusCode float32 -type CreatePostgresPamResource401StatusCode float32 -type CreatePostgresPamResource403StatusCode float32 -type CreatePostgresPamResource404StatusCode float32 -type CreatePostgresPamResource422StatusCode float32 -type CreatePostgresPamResource500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r CreatePostgresPamResourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePostgresPamResourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateRedisPamResourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Resource struct { - ConnectionDetails struct { - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateRedisPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username *string `json:"username,omitempty"` - } `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreateRedisPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource500StatusCode `json:"statusCode"` - } -} -type CreateRedisPamResource200ResourceResourceType string -type CreateRedisPamResource200ResourceSessionSummaryConfigModel string -type CreateRedisPamResource400StatusCode float32 -type CreateRedisPamResource401StatusCode float32 -type CreateRedisPamResource403StatusCode float32 -type CreateRedisPamResource404StatusCode float32 -type CreateRedisPamResource422StatusCode float32 -type CreateRedisPamResource500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r CreateRedisPamResourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateRedisPamResourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSshPamResourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Resource struct { - ConnectionDetails struct { - Host string `json:"host"` - Port float32 `json:"port"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateSshPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *CreateSshPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreateSshPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource400StatusCode `json:"statusCode"` - } - JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource401StatusCode `json:"statusCode"` - } - JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource403StatusCode `json:"statusCode"` - } - JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource404StatusCode `json:"statusCode"` - } - JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource422StatusCode `json:"statusCode"` - } - JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource500StatusCode `json:"statusCode"` - } -} -type CreateSshPamResource200ResourceResourceType string -type CreateSshPamResource200ResourceRotationAccountCredentials0 struct { - AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials0AuthMethod `json:"authMethod"` - Username string `json:"username"` -} -type CreateSshPamResource200ResourceRotationAccountCredentials0AuthMethod string -type CreateSshPamResource200ResourceRotationAccountCredentials1 struct { - AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials1AuthMethod `json:"authMethod"` - Username string `json:"username"` -} -type CreateSshPamResource200ResourceRotationAccountCredentials1AuthMethod string -type CreateSshPamResource200ResourceRotationAccountCredentials2 struct { - AuthMethod CreateSshPamResource200ResourceRotationAccountCredentials2AuthMethod `json:"authMethod"` - Username string `json:"username"` -} -type CreateSshPamResource200ResourceRotationAccountCredentials2AuthMethod string -type CreateSshPamResource_200_Resource_RotationAccountCredentials struct { - union json.RawMessage -} -type CreateSshPamResource200ResourceSessionSummaryConfigModel string -type CreateSshPamResource400StatusCode float32 -type CreateSshPamResource401StatusCode float32 -type CreateSshPamResource403StatusCode float32 -type CreateSshPamResource404StatusCode float32 -type CreateSshPamResource422StatusCode float32 -type CreateSshPamResource500StatusCode float32 - -// Status returns HTTPResponse.Status -func (r CreateSshPamResourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSshPamResourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateWindowsPamResourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Resource struct { - ConnectionDetails struct { - Hostname string `json:"hostname"` - Port int `json:"port"` - Protocol CreateWindowsPamResource200ResourceConnectionDetailsProtocol `json:"protocol"` - UseWinrmHttps bool `json:"useWinrmHttps"` - WinrmCaCert *string `json:"winrmCaCert,omitempty"` - WinrmPort int `json:"winrmPort"` - WinrmRejectUnauthorized bool `json:"winrmRejectUnauthorized"` - WinrmTlsServerName *string `json:"winrmTlsServerName,omitempty"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateWindowsPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username string `json:"username"` - } `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreateWindowsPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - JSON400 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder400StatusCode `json:"statusCode"` } JSON401 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder401StatusCode `json:"statusCode"` } JSON403 *struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder403StatusCode `json:"statusCode"` } JSON404 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder404StatusCode `json:"statusCode"` } JSON422 *struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder422StatusCode `json:"statusCode"` } JSON500 *struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder500StatusCode `json:"statusCode"` } } -type CreateWindowsPamResource200ResourceConnectionDetailsProtocol string -type CreateWindowsPamResource200ResourceResourceType string -type CreateWindowsPamResource200ResourceSessionSummaryConfigModel string -type CreateWindowsPamResource400StatusCode float32 -type CreateWindowsPamResource401StatusCode float32 -type CreateWindowsPamResource403StatusCode float32 -type CreateWindowsPamResource404StatusCode float32 -type CreateWindowsPamResource422StatusCode float32 -type CreateWindowsPamResource500StatusCode float32 +type CreatePamFolder400StatusCode float32 +type CreatePamFolder401StatusCode float32 +type CreatePamFolder403StatusCode float32 +type CreatePamFolder404StatusCode float32 +type CreatePamFolder422StatusCode float32 +type CreatePamFolder500StatusCode float32 // Status returns HTTPResponse.Status -func (r CreateWindowsPamResourceResponse) Status() string { +func (r CreatePamFolderResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6723,7 +5947,7 @@ func (r CreateWindowsPamResourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateWindowsPamResourceResponse) StatusCode() int { +func (r CreatePamFolderResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6735,13 +5959,21 @@ type CreateProjectResponse struct { HTTPResponse *http.Response JSON200 *struct { Project struct { - UnderscoreId string `json:"_id"` - AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` - AutoCapitalization *bool `json:"autoCapitalization"` - CreatedAt time.Time `json:"createdAt"` - DefaultProduct *string `json:"defaultProduct"` - Description *string `json:"description"` - EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata"` + UnderscoreId string `json:"_id"` + AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` + AutoCapitalization *bool `json:"autoCapitalization"` + CreatedAt time.Time `json:"createdAt"` + DefaultProduct *string `json:"defaultProduct"` + DeletedEnvironments []struct { + DeleteAfter time.Time `json:"deleteAfter"` + DeletedBy *CreateProject_200_Project_DeletedEnvironments_DeletedBy `json:"deletedBy"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + SoftDeletedAt time.Time `json:"softDeletedAt"` + } `json:"deletedEnvironments"` + Description *string `json:"description"` + EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata"` Environments []struct { Id string `json:"id"` Name string `json:"name"` @@ -6802,6 +6034,24 @@ type CreateProjectResponse struct { StatusCode CreateProject500StatusCode `json:"statusCode"` } } +type CreateProject200ProjectDeletedEnvironmentsDeletedBy0 struct { + Email *string `json:"email"` + FirstName *string `json:"firstName"` + Id string `json:"id"` + LastName *string `json:"lastName"` + Type CreateProject200ProjectDeletedEnvironmentsDeletedBy0Type `json:"type"` + Username *string `json:"username"` +} +type CreateProject200ProjectDeletedEnvironmentsDeletedBy0Type string +type CreateProject200ProjectDeletedEnvironmentsDeletedBy1 struct { + Id string `json:"id"` + Name string `json:"name"` + Type CreateProject200ProjectDeletedEnvironmentsDeletedBy1Type `json:"type"` +} +type CreateProject200ProjectDeletedEnvironmentsDeletedBy1Type string +type CreateProject_200_Project_DeletedEnvironments_DeletedBy struct { + union json.RawMessage +} type CreateProject400StatusCode float32 type CreateProject401StatusCode float32 type CreateProject403StatusCode float32 @@ -6837,6 +6087,7 @@ type GetRelaysResponse struct { IdentityId *openapi_types.UUID `json:"identityId"` Name string `json:"name"` OrgId *openapi_types.UUID `json:"orgId"` + TokenVersion *float32 `json:"tokenVersion,omitempty"` UpdatedAt time.Time `json:"updatedAt"` } JSON400 *struct { @@ -6905,18 +6156,19 @@ type ListGatewaysResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]struct { + Capabilities interface{} `json:"capabilities"` ConnectedResourcesCount float32 `json:"connectedResourcesCount"` CreatedAt time.Time `json:"createdAt"` Heartbeat *time.Time `json:"heartbeat"` + HeartbeatTTL *float32 `json:"heartbeatTTL"` Id openapi_types.UUID `json:"id"` Identity *struct { Id string `json:"id"` Name string `json:"name"` } `json:"identity"` - IdentityId *openapi_types.UUID `json:"identityId"` - LastHealthCheckStatus *string `json:"lastHealthCheckStatus"` - Name string `json:"name"` - UpdatedAt time.Time `json:"updatedAt"` + IdentityId *openapi_types.UUID `json:"identityId"` + Name string `json:"name"` + UpdatedAt time.Time `json:"updatedAt"` } JSON400 *struct { Details interface{} `json:"details,omitempty"` @@ -7078,6 +6330,7 @@ type ListSecretsV4Response struct { Key string `json:"key"` Value *string `json:"value,omitempty"` } `json:"secretMetadata,omitempty"` + SecretPath *string `json:"secretPath,omitempty"` SecretReminderNote *string `json:"secretReminderNote"` SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` SecretValue string `json:"secretValue"` @@ -7127,6 +6380,7 @@ type ListSecretsV4Response struct { Workspace string `json:"workspace"` } `json:"secrets"` } + JSON304 *interface{} JSON400 *struct { Details interface{} `json:"details,omitempty"` Error string `json:"error"` @@ -7265,6 +6519,7 @@ type DeleteSecretV42000 struct { type DeleteSecretV42001 struct { Approval struct { BypassReason *string `json:"bypassReason"` + CommitMessage *string `json:"commitMessage"` CommitterUserId *openapi_types.UUID `json:"committerUserId"` Conflicts interface{} `json:"conflicts"` CreatedAt time.Time `json:"createdAt"` @@ -7483,6 +6738,7 @@ type UpdateSecretV42000 struct { type UpdateSecretV42001 struct { Approval struct { BypassReason *string `json:"bypassReason"` + CommitMessage *string `json:"commitMessage"` CommitterUserId *openapi_types.UUID `json:"committerUserId"` Conflicts interface{} `json:"conflicts"` CreatedAt time.Time `json:"createdAt"` @@ -7595,6 +6851,7 @@ type CreateSecretV42000 struct { type CreateSecretV42001 struct { Approval struct { BypassReason *string `json:"bypassReason"` + CommitMessage *string `json:"commitMessage"` CommitterUserId *openapi_types.UUID `json:"committerUserId"` Conflicts interface{} `json:"conflicts"` CreatedAt time.Time `json:"createdAt"` @@ -7862,38 +7119,38 @@ func (c *ClientWithResponses) CreateMachineIdentityWithResponse(ctx context.Cont return ParseCreateMachineIdentityResponse(rsp) } -// CreatePostgresPamAccountWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamAccountResponse -func (c *ClientWithResponses) CreatePostgresPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { - rsp, err := c.CreatePostgresPamAccountWithBody(ctx, contentType, body, reqEditors...) +// CreatePamAccountTemplateWithBodyWithResponse request with arbitrary body returning *CreatePamAccountTemplateResponse +func (c *ClientWithResponses) CreatePamAccountTemplateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePamAccountTemplateResponse, error) { + rsp, err := c.CreatePamAccountTemplateWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePostgresPamAccountResponse(rsp) + return ParseCreatePamAccountTemplateResponse(rsp) } -func (c *ClientWithResponses) CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { - rsp, err := c.CreatePostgresPamAccount(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreatePamAccountTemplateWithResponse(ctx context.Context, body CreatePamAccountTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePamAccountTemplateResponse, error) { + rsp, err := c.CreatePamAccountTemplate(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePostgresPamAccountResponse(rsp) + return ParseCreatePamAccountTemplateResponse(rsp) } -// CreateRedisPamAccountWithBodyWithResponse request with arbitrary body returning *CreateRedisPamAccountResponse -func (c *ClientWithResponses) CreateRedisPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamAccountResponse, error) { - rsp, err := c.CreateRedisPamAccountWithBody(ctx, contentType, body, reqEditors...) +// CreatePostgresPamAccountWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamAccountResponse +func (c *ClientWithResponses) CreatePostgresPamAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { + rsp, err := c.CreatePostgresPamAccountWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateRedisPamAccountResponse(rsp) + return ParseCreatePostgresPamAccountResponse(rsp) } -func (c *ClientWithResponses) CreateRedisPamAccountWithResponse(ctx context.Context, body CreateRedisPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamAccountResponse, error) { - rsp, err := c.CreateRedisPamAccount(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreatePostgresPamAccountWithResponse(ctx context.Context, body CreatePostgresPamAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamAccountResponse, error) { + rsp, err := c.CreatePostgresPamAccount(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateRedisPamAccountResponse(rsp) + return ParseCreatePostgresPamAccountResponse(rsp) } // CreateSshPamAccountWithBodyWithResponse request with arbitrary body returning *CreateSshPamAccountResponse @@ -7930,115 +7187,47 @@ func (c *ClientWithResponses) CreateWindowsPamAccountWithResponse(ctx context.Co return ParseCreateWindowsPamAccountResponse(rsp) } -// CreateKubernetesPamResourceWithBodyWithResponse request with arbitrary body returning *CreateKubernetesPamResourceResponse -func (c *ClientWithResponses) CreateKubernetesPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { - rsp, err := c.CreateKubernetesPamResourceWithBody(ctx, contentType, body, reqEditors...) +// CreatePamFolderWithBodyWithResponse request with arbitrary body returning *CreatePamFolderResponse +func (c *ClientWithResponses) CreatePamFolderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePamFolderResponse, error) { + rsp, err := c.CreatePamFolderWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateKubernetesPamResourceResponse(rsp) + return ParseCreatePamFolderResponse(rsp) } -func (c *ClientWithResponses) CreateKubernetesPamResourceWithResponse(ctx context.Context, body CreateKubernetesPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKubernetesPamResourceResponse, error) { - rsp, err := c.CreateKubernetesPamResource(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreatePamFolderWithResponse(ctx context.Context, body CreatePamFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePamFolderResponse, error) { + rsp, err := c.CreatePamFolder(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateKubernetesPamResourceResponse(rsp) + return ParseCreatePamFolderResponse(rsp) } -// CreatePostgresPamResourceWithBodyWithResponse request with arbitrary body returning *CreatePostgresPamResourceResponse -func (c *ClientWithResponses) CreatePostgresPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) { - rsp, err := c.CreatePostgresPamResourceWithBody(ctx, contentType, body, reqEditors...) +// CreateProjectWithBodyWithResponse request with arbitrary body returning *CreateProjectResponse +func (c *ClientWithResponses) CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { + rsp, err := c.CreateProjectWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePostgresPamResourceResponse(rsp) + return ParseCreateProjectResponse(rsp) } -func (c *ClientWithResponses) CreatePostgresPamResourceWithResponse(ctx context.Context, body CreatePostgresPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePostgresPamResourceResponse, error) { - rsp, err := c.CreatePostgresPamResource(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { + rsp, err := c.CreateProject(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePostgresPamResourceResponse(rsp) + return ParseCreateProjectResponse(rsp) } -// CreateRedisPamResourceWithBodyWithResponse request with arbitrary body returning *CreateRedisPamResourceResponse -func (c *ClientWithResponses) CreateRedisPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { - rsp, err := c.CreateRedisPamResourceWithBody(ctx, contentType, body, reqEditors...) +// GetRelaysWithResponse request returning *GetRelaysResponse +func (c *ClientWithResponses) GetRelaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRelaysResponse, error) { + rsp, err := c.GetRelays(ctx, reqEditors...) if err != nil { return nil, err } - return ParseCreateRedisPamResourceResponse(rsp) -} - -func (c *ClientWithResponses) CreateRedisPamResourceWithResponse(ctx context.Context, body CreateRedisPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRedisPamResourceResponse, error) { - rsp, err := c.CreateRedisPamResource(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateRedisPamResourceResponse(rsp) -} - -// CreateSshPamResourceWithBodyWithResponse request with arbitrary body returning *CreateSshPamResourceResponse -func (c *ClientWithResponses) CreateSshPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) { - rsp, err := c.CreateSshPamResourceWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSshPamResourceResponse(rsp) -} - -func (c *ClientWithResponses) CreateSshPamResourceWithResponse(ctx context.Context, body CreateSshPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSshPamResourceResponse, error) { - rsp, err := c.CreateSshPamResource(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSshPamResourceResponse(rsp) -} - -// CreateWindowsPamResourceWithBodyWithResponse request with arbitrary body returning *CreateWindowsPamResourceResponse -func (c *ClientWithResponses) CreateWindowsPamResourceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWindowsPamResourceResponse, error) { - rsp, err := c.CreateWindowsPamResourceWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateWindowsPamResourceResponse(rsp) -} - -func (c *ClientWithResponses) CreateWindowsPamResourceWithResponse(ctx context.Context, body CreateWindowsPamResourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWindowsPamResourceResponse, error) { - rsp, err := c.CreateWindowsPamResource(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateWindowsPamResourceResponse(rsp) -} - -// CreateProjectWithBodyWithResponse request with arbitrary body returning *CreateProjectResponse -func (c *ClientWithResponses) CreateProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { - rsp, err := c.CreateProjectWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateProjectResponse(rsp) -} - -func (c *ClientWithResponses) CreateProjectWithResponse(ctx context.Context, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) { - rsp, err := c.CreateProject(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateProjectResponse(rsp) -} - -// GetRelaysWithResponse request returning *GetRelaysResponse -func (c *ClientWithResponses) GetRelaysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRelaysResponse, error) { - rsp, err := c.GetRelays(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetRelaysResponse(rsp) + return ParseGetRelaysResponse(rsp) } // ListGatewaysWithResponse request returning *ListGatewaysResponse @@ -8155,12 +7344,14 @@ func ParseAdminSignUpResponse(rsp *http.Response) (*AdminSignUpResponse, error) Message string `json:"message"` New string `json:"new"` Organization struct { + AllowCrossProjectSecretSharing *bool `json:"allowCrossProjectSecretSharing,omitempty"` AllowSecretSharingOutsideOrganization *bool `json:"allowSecretSharingOutsideOrganization"` AuthEnforced *bool `json:"authEnforced"` BlockDuplicateSecretSyncDestinations *bool `json:"blockDuplicateSecretSyncDestinations,omitempty"` BypassOrgAuthEnabled *bool `json:"bypassOrgAuthEnabled,omitempty"` CreatedAt time.Time `json:"createdAt"` CustomerId *string `json:"customerId"` + DefaultCertManagerProjectId *string `json:"defaultCertManagerProjectId"` DefaultMembershipRole *string `json:"defaultMembershipRole,omitempty"` EnforceMfa *bool `json:"enforceMfa,omitempty"` GoogleSsoAuthEnforced *bool `json:"googleSsoAuthEnforced,omitempty"` @@ -9097,16 +8288,12 @@ func ParseCreateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*CreateA // DnsResolver An optional custom DNS resolver IP address to use for verifying DNS propagation during ACME challenges. Must be a valid IP address (e.g. 8.8.8.8). When not set, the system default DNS resolver is used. DnsResolver *string `json:"dnsResolver,omitempty"` - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. EabKid *string `json:"eabKid,omitempty"` } `json:"configuration"` EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` Id openapi_types.UUID `json:"id"` Name string `json:"name"` - ProjectId string `json:"projectId"` Status CreateAcmeCertificateAuthorityV1200Status `json:"status"` Type CreateAcmeCertificateAuthorityV1200Type `json:"type"` } @@ -9230,16 +8417,12 @@ func ParseUpdateAcmeCertificateAuthorityV1Response(rsp *http.Response) (*UpdateA // DnsResolver An optional custom DNS resolver IP address to use for verifying DNS propagation during ACME challenges. Must be a valid IP address (e.g. 8.8.8.8). When not set, the system default DNS resolver is used. DnsResolver *string `json:"dnsResolver,omitempty"` - // EabHmacKey The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB. - EabHmacKey *string `json:"eabHmacKey,omitempty"` - // EabKid The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB. EabKid *string `json:"eabKid,omitempty"` } `json:"configuration"` EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` Id openapi_types.UUID `json:"id"` Name string `json:"name"` - ProjectId string `json:"projectId"` Status UpdateAcmeCertificateAuthorityV1200Status `json:"status"` Type UpdateAcmeCertificateAuthorityV1200Type `json:"type"` } @@ -9352,16 +8535,28 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre // Country The country name (C) for the CA. Country *string `json:"country,omitempty"` - // CrlDistributionPointUrls Additional CRL Distribution Point URLs (HTTP/HTTPS) embedded in every certificate issued by this CA. Up to 4 URLs; the Infisical-managed CRL endpoint is always included as the primary. + // CrlDistributionPointUrls Additional CRL Distribution Point URLs (HTTP/HTTPS) embedded in every certificate issued by this CA. Up to 4 URLs; the Infisical-managed CRL endpoint is included by default unless disabled. CrlDistributionPointUrls *[]string `json:"crlDistributionPointUrls,omitempty"` - Dn *string `json:"dn"` + + // DisableManagedCrlDistributionPointUrl When set to true, the Infisical-managed CRL endpoint URL will not be embedded in certificates issued by this CA. Only custom CRL Distribution Point URLs (if any) will be included. + DisableManagedCrlDistributionPointUrl *bool `json:"disableManagedCrlDistributionPointUrl,omitempty"` + Dn *string `json:"dn"` // FriendlyName A friendly name for the CA. FriendlyName *string `json:"friendlyName,omitempty"` + // HsmConnectorId The ID of the HSM Connector to generate and store the CA's signing key in. Required when keySource is 'hsm'. + HsmConnectorId *openapi_types.UUID `json:"hsmConnectorId,omitempty"` + + // HsmKeyLabel The label of the CA's signing key on the HSM. Not user-supplied: it is the HSM Connector's configured key name prefix followed by a per-CA label built from the CA name and a random 5-character suffix (ca--). + HsmKeyLabel *string `json:"hsmKeyLabel,omitempty"` + // KeyAlgorithm The type of public key algorithm and size, in bits, of the key pair for the CA; when you create an intermediate CA, you must use a key algorithm supported by the parent CA. KeyAlgorithm CreateInternalCertificateAuthorityV1200ConfigurationKeyAlgorithm `json:"keyAlgorithm"` + // KeySource Where the CA's signing key is generated and stored. 'infisical' keeps the key in Infisical's KMS; 'hsm' generates and stores the key in the HSM reached through the specified HSM Connector. + KeySource *CreateInternalCertificateAuthorityV1200ConfigurationKeySource `json:"keySource,omitempty"` + // Locality The locality name for the CA. Locality *string `json:"locality,omitempty"` @@ -9391,7 +8586,6 @@ func ParseCreateInternalCertificateAuthorityV1Response(rsp *http.Response) (*Cre EnableDirectIssuance *bool `json:"enableDirectIssuance,omitempty"` Id openapi_types.UUID `json:"id"` Name string `json:"name"` - ProjectId string `json:"projectId"` Status CreateInternalCertificateAuthorityV1200Status `json:"status"` Type CreateInternalCertificateAuthorityV1200Type `json:"type"` } @@ -9517,9 +8711,8 @@ func ParseCreateCertificatePolicyResponse(rsp *http.Response) (*CreateCertificat Denied *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesDenied `json:"denied,omitempty"` Required *[]CreateCertificatePolicy200CertificatePolicyKeyUsagesRequired `json:"required,omitempty"` } `json:"keyUsages,omitempty"` - Name string `json:"name"` - ProjectId openapi_types.UUID `json:"projectId"` - Sans *[]struct { + Name string `json:"name"` + Sans *[]struct { Allowed *[]string `json:"allowed,omitempty"` Denied *[]string `json:"denied,omitempty"` Required *[]string `json:"required,omitempty"` @@ -9650,6 +8843,7 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica } `json:"basicConstraints,omitempty"` CommonName *string `json:"commonName,omitempty"` Country *string `json:"country,omitempty"` + DomainComponents *[]string `json:"domainComponents,omitempty"` ExtendedKeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsExtendedKeyUsages `json:"extendedKeyUsages,omitempty"` KeyAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsKeyAlgorithm `json:"keyAlgorithm,omitempty"` KeyUsages *[]CreateCertificateProfile200CertificateProfileDefaultsKeyUsages `json:"keyUsages,omitempty"` @@ -9658,7 +8852,11 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica OrganizationalUnit *string `json:"organizationalUnit,omitempty"` SignatureAlgorithm *CreateCertificateProfile200CertificateProfileDefaultsSignatureAlgorithm `json:"signatureAlgorithm,omitempty"` State *string `json:"state,omitempty"` - TtlDays *float32 `json:"ttlDays,omitempty"` + SubjectAltNames *[]struct { + Type CreateCertificateProfile200CertificateProfileDefaultsSubjectAltNamesType `json:"type"` + Value string `json:"value"` + } `json:"subjectAltNames,omitempty"` + TtlDays *float32 `json:"ttlDays,omitempty"` } `json:"defaults"` Description *string `json:"description"` EnrollmentType string `json:"enrollmentType"` @@ -9666,7 +8864,6 @@ func ParseCreateCertificateProfileResponse(rsp *http.Response) (*CreateCertifica ExternalConfigs *CreateCertificateProfile_200_CertificateProfile_ExternalConfigs `json:"externalConfigs"` Id openapi_types.UUID `json:"id"` IssuerType *string `json:"issuerType,omitempty"` - ProjectId string `json:"projectId"` ScepConfigId *openapi_types.UUID `json:"scepConfigId"` Slug string `json:"slug"` UpdatedAt time.Time `json:"updatedAt"` @@ -9873,15 +9070,15 @@ func ParseCreateMachineIdentityResponse(rsp *http.Response) (*CreateMachineIdent return response, nil } -// ParseCreatePostgresPamAccountResponse parses an HTTP response from a CreatePostgresPamAccountWithResponse call -func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresPamAccountResponse, error) { +// ParseCreatePamAccountTemplateResponse parses an HTTP response from a CreatePamAccountTemplateWithResponse call +func ParseCreatePamAccountTemplateResponse(rsp *http.Response) (*CreatePamAccountTemplateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePostgresPamAccountResponse{ + response := &CreatePamAccountTemplateResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -9889,47 +9086,20 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials struct { - Username string `json:"username"` - } `json:"credentials"` - Description *string `json:"description"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - Domain *struct { - DomainType string `json:"domainType"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - } `json:"domain"` - DomainId *openapi_types.UUID `json:"domainId"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata interface{} `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ParentType CreatePostgresPamAccount200AccountParentType `json:"parentType"` - PolicyId *openapi_types.UUID `json:"policyId"` - PolicyName *string `json:"policyName"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - RequireReason *bool `json:"requireReason,omitempty"` - Resource *struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId *openapi_types.UUID `json:"resourceId"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"account"` + CorsProbeUrl *string `json:"corsProbeUrl"` + Template struct { + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + Policies interface{} `json:"policies"` + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId"` + Settings interface{} `json:"settings"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"template"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -9942,7 +9112,7 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount400StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -9954,7 +9124,7 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount401StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -9967,7 +9137,7 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount403StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -9979,7 +9149,7 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount404StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -9991,7 +9161,7 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP Error string `json:"error"` Message interface{} `json:"message,omitempty"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount422StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10003,7 +9173,7 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP Error string `json:"error"` Message string `json:"message"` ReqId string `json:"reqId"` - StatusCode CreatePostgresPamAccount500StatusCode `json:"statusCode"` + StatusCode CreatePamAccountTemplate500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10015,15 +9185,15 @@ func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresP return response, nil } -// ParseCreateRedisPamAccountResponse parses an HTTP response from a CreateRedisPamAccountWithResponse call -func ParseCreateRedisPamAccountResponse(rsp *http.Response) (*CreateRedisPamAccountResponse, error) { +// ParseCreatePostgresPamAccountResponse parses an HTTP response from a CreatePostgresPamAccountWithResponse call +func ParseCreatePostgresPamAccountResponse(rsp *http.Response) (*CreatePostgresPamAccountResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateRedisPamAccountResponse{ + response := &CreatePostgresPamAccountResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -10032,46 +9202,23 @@ func ParseCreateRedisPamAccountResponse(rsp *http.Response) (*CreateRedisPamAcco case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials struct { - Username *string `json:"username,omitempty"` - } `json:"credentials"` - Description *string `json:"description"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - Domain *struct { - DomainType string `json:"domainType"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - } `json:"domain"` - DomainId *openapi_types.UUID `json:"domainId"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata interface{} `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ParentType CreateRedisPamAccount200AccountParentType `json:"parentType"` - PolicyId *openapi_types.UUID `json:"policyId"` - PolicyName *string `json:"policyName"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - RequireReason *bool `json:"requireReason,omitempty"` - Resource *struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId *openapi_types.UUID `json:"resourceId"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` + AccountType string `json:"accountType"` + ConnectionDetails map[string]interface{} `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId"` + FolderName string `json:"folderName"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId"` + SettingsOverrides interface{} `json:"settingsOverrides"` + TemplateId openapi_types.UUID `json:"templateId"` + TemplateName string `json:"templateName"` + UpdatedAt time.Time `json:"updatedAt"` } `json:"account"` + CorsProbeUrl *string `json:"corsProbeUrl"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10080,11 +9227,11 @@ func ParseCreateRedisPamAccountResponse(rsp *http.Response) (*CreateRedisPamAcco case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10093,10 +9240,10 @@ func ParseCreateRedisPamAccountResponse(rsp *http.Response) (*CreateRedisPamAcco case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10105,11 +9252,11 @@ func ParseCreateRedisPamAccountResponse(rsp *http.Response) (*CreateRedisPamAcco case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10118,10 +9265,10 @@ func ParseCreateRedisPamAccountResponse(rsp *http.Response) (*CreateRedisPamAcco case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10130,10 +9277,10 @@ func ParseCreateRedisPamAccountResponse(rsp *http.Response) (*CreateRedisPamAcco case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10142,10 +9289,10 @@ func ParseCreateRedisPamAccountResponse(rsp *http.Response) (*CreateRedisPamAcco case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamAccount500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePostgresPamAccount500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10174,44 +9321,23 @@ func ParseCreateSshPamAccountResponse(rsp *http.Response) (*CreateSshPamAccountR case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials CreateSshPamAccount_200_Account_Credentials `json:"credentials"` - Description *string `json:"description"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - Domain *struct { - DomainType string `json:"domainType"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - } `json:"domain"` - DomainId *openapi_types.UUID `json:"domainId"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata interface{} `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ParentType CreateSshPamAccount200AccountParentType `json:"parentType"` - PolicyId *openapi_types.UUID `json:"policyId"` - PolicyName *string `json:"policyName"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - RequireReason *bool `json:"requireReason,omitempty"` - Resource *struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId *openapi_types.UUID `json:"resourceId"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` + AccountType string `json:"accountType"` + ConnectionDetails map[string]interface{} `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId"` + FolderName string `json:"folderName"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId"` + SettingsOverrides interface{} `json:"settingsOverrides"` + TemplateId openapi_types.UUID `json:"templateId"` + TemplateName string `json:"templateName"` + UpdatedAt time.Time `json:"updatedAt"` } `json:"account"` + CorsProbeUrl *string `json:"corsProbeUrl"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10314,52 +9440,23 @@ func ParseCreateWindowsPamAccountResponse(rsp *http.Response) (*CreateWindowsPam case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { Account struct { - CreatedAt time.Time `json:"createdAt"` - Credentials struct { - Username string `json:"username"` - } `json:"credentials"` - Description *string `json:"description"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - Domain *struct { - DomainType string `json:"domainType"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - } `json:"domain"` - DomainId *openapi_types.UUID `json:"domainId"` - EncryptedLastRotationMessage interface{} `json:"encryptedLastRotationMessage"` - FolderId *openapi_types.UUID `json:"folderId"` - Id openapi_types.UUID `json:"id"` - InternalMetadata struct { - AccountType CreateWindowsPamAccount200AccountInternalMetadataAccountType `json:"accountType"` - Enabled *bool `json:"enabled,omitempty"` - LastLogon *string `json:"lastLogon,omitempty"` - PasswordLastSet *string `json:"passwordLastSet,omitempty"` - Sid *string `json:"sid,omitempty"` - } `json:"internalMetadata"` - LastRotatedAt *time.Time `json:"lastRotatedAt"` - LastRotationMessage *string `json:"lastRotationMessage"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ParentType CreateWindowsPamAccount200AccountParentType `json:"parentType"` - PolicyId *openapi_types.UUID `json:"policyId"` - PolicyName *string `json:"policyName"` - ProjectId string `json:"projectId"` - RequireMfa *bool `json:"requireMfa"` - RequireReason *bool `json:"requireReason,omitempty"` - Resource *struct { - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` - ResourceType string `json:"resourceType"` - RotationCredentialsConfigured bool `json:"rotationCredentialsConfigured"` - } `json:"resource"` - ResourceId *openapi_types.UUID `json:"resourceId"` - RotationStatus *string `json:"rotationStatus"` - UpdatedAt time.Time `json:"updatedAt"` + AccountType string `json:"accountType"` + ConnectionDetails map[string]interface{} `json:"connectionDetails"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + FolderId *openapi_types.UUID `json:"folderId"` + FolderName string `json:"folderName"` + GatewayId *openapi_types.UUID `json:"gatewayId"` + GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + RecordingConnectionId *openapi_types.UUID `json:"recordingConnectionId"` + SettingsOverrides interface{} `json:"settingsOverrides"` + TemplateId openapi_types.UUID `json:"templateId"` + TemplateName string `json:"templateName"` + UpdatedAt time.Time `json:"updatedAt"` } `json:"account"` + CorsProbeUrl *string `json:"corsProbeUrl"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10445,15 +9542,15 @@ func ParseCreateWindowsPamAccountResponse(rsp *http.Response) (*CreateWindowsPam return response, nil } -// ParseCreateKubernetesPamResourceResponse parses an HTTP response from a CreateKubernetesPamResourceWithResponse call -func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubernetesPamResourceResponse, error) { +// ParseCreatePamFolderResponse parses an HTTP response from a CreatePamFolderWithResponse call +func ParseCreatePamFolderResponse(rsp *http.Response) (*CreatePamFolderResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateKubernetesPamResourceResponse{ + response := &CreatePamFolderResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -10461,34 +9558,13 @@ func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubern switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Resource struct { - ConnectionDetails struct { - SslCertificate *string `json:"sslCertificate,omitempty"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - Url string `json:"url"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateKubernetesPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *CreateKubernetesPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreateKubernetesPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` + Folder struct { + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"folder"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10497,542 +9573,11 @@ func ParseCreateKubernetesPamResourceResponse(rsp *http.Response) (*CreateKubern case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateKubernetesPamResource500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreatePostgresPamResourceResponse parses an HTTP response from a CreatePostgresPamResourceWithResponse call -func ParseCreatePostgresPamResourceResponse(rsp *http.Response) (*CreatePostgresPamResourceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreatePostgresPamResourceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Resource struct { - ConnectionDetails struct { - Database string `json:"database"` - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreatePostgresPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username string `json:"username"` - } `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreatePostgresPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreatePostgresPamResource500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateRedisPamResourceResponse parses an HTTP response from a CreateRedisPamResourceWithResponse call -func ParseCreateRedisPamResourceResponse(rsp *http.Response) (*CreateRedisPamResourceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateRedisPamResourceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Resource struct { - ConnectionDetails struct { - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateRedisPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username *string `json:"username,omitempty"` - } `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreateRedisPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateRedisPamResource500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateSshPamResourceResponse parses an HTTP response from a CreateSshPamResourceWithResponse call -func ParseCreateSshPamResourceResponse(rsp *http.Response) (*CreateSshPamResourceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateSshPamResourceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Resource struct { - ConnectionDetails struct { - Host string `json:"host"` - Port float32 `json:"port"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateSshPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *CreateSshPamResource_200_Resource_RotationAccountCredentials `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreateSshPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource400StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource401StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource403StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource404StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource422StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateSshPamResource500StatusCode `json:"statusCode"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateWindowsPamResourceResponse parses an HTTP response from a CreateWindowsPamResourceWithResponse call -func ParseCreateWindowsPamResourceResponse(rsp *http.Response) (*CreateWindowsPamResourceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateWindowsPamResourceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Resource struct { - ConnectionDetails struct { - Hostname string `json:"hostname"` - Port int `json:"port"` - Protocol CreateWindowsPamResource200ResourceConnectionDetailsProtocol `json:"protocol"` - UseWinrmHttps bool `json:"useWinrmHttps"` - WinrmCaCert *string `json:"winrmCaCert,omitempty"` - WinrmPort int `json:"winrmPort"` - WinrmRejectUnauthorized bool `json:"winrmRejectUnauthorized"` - WinrmTlsServerName *string `json:"winrmTlsServerName,omitempty"` - } `json:"connectionDetails"` - CreatedAt time.Time `json:"createdAt"` - DiscoveryFingerprint *string `json:"discoveryFingerprint"` - DomainId *openapi_types.UUID `json:"domainId"` - GatewayId *openapi_types.UUID `json:"gatewayId"` - GatewayPoolId *openapi_types.UUID `json:"gatewayPoolId"` - Id openapi_types.UUID `json:"id"` - Metadata *[]struct { - Id openapi_types.UUID `json:"id"` - Key string `json:"key"` - Value *string `json:"value"` - } `json:"metadata,omitempty"` - Name string `json:"name"` - ProjectId string `json:"projectId"` - ResourceType CreateWindowsPamResource200ResourceResourceType `json:"resourceType"` - RotationAccountCredentials *struct { - Username string `json:"username"` - } `json:"rotationAccountCredentials"` - SessionSummaryConfig *struct { - AiInsightsEnabled bool `json:"aiInsightsEnabled"` - ConnectionId openapi_types.UUID `json:"connectionId"` - Model CreateWindowsPamResource200ResourceSessionSummaryConfigModel `json:"model"` - } `json:"sessionSummaryConfig"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"resource"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource400StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder400StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -11041,10 +9586,10 @@ func ParseCreateWindowsPamResourceResponse(rsp *http.Response) (*CreateWindowsPa case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource401StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder401StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -11053,11 +9598,11 @@ func ParseCreateWindowsPamResourceResponse(rsp *http.Response) (*CreateWindowsPa case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest struct { - Details interface{} `json:"details,omitempty"` - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource403StatusCode `json:"statusCode"` + Details interface{} `json:"details,omitempty"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder403StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -11066,10 +9611,10 @@ func ParseCreateWindowsPamResourceResponse(rsp *http.Response) (*CreateWindowsPa case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource404StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder404StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -11078,10 +9623,10 @@ func ParseCreateWindowsPamResourceResponse(rsp *http.Response) (*CreateWindowsPa case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest struct { - Error string `json:"error"` - Message interface{} `json:"message,omitempty"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource422StatusCode `json:"statusCode"` + Error string `json:"error"` + Message interface{} `json:"message,omitempty"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder422StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -11090,10 +9635,10 @@ func ParseCreateWindowsPamResourceResponse(rsp *http.Response) (*CreateWindowsPa case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest struct { - Error string `json:"error"` - Message string `json:"message"` - ReqId string `json:"reqId"` - StatusCode CreateWindowsPamResource500StatusCode `json:"statusCode"` + Error string `json:"error"` + Message string `json:"message"` + ReqId string `json:"reqId"` + StatusCode CreatePamFolder500StatusCode `json:"statusCode"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -11122,13 +9667,21 @@ func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, err case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { Project struct { - UnderscoreId string `json:"_id"` - AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` - AutoCapitalization *bool `json:"autoCapitalization"` - CreatedAt time.Time `json:"createdAt"` - DefaultProduct *string `json:"defaultProduct"` - Description *string `json:"description"` - EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata"` + UnderscoreId string `json:"_id"` + AuditLogsRetentionDays *float32 `json:"auditLogsRetentionDays"` + AutoCapitalization *bool `json:"autoCapitalization"` + CreatedAt time.Time `json:"createdAt"` + DefaultProduct *string `json:"defaultProduct"` + DeletedEnvironments []struct { + DeleteAfter time.Time `json:"deleteAfter"` + DeletedBy *CreateProject_200_Project_DeletedEnvironments_DeletedBy `json:"deletedBy"` + Id string `json:"id"` + Name string `json:"name"` + Slug string `json:"slug"` + SoftDeletedAt time.Time `json:"softDeletedAt"` + } `json:"deletedEnvironments"` + Description *string `json:"description"` + EnforceEncryptedSecretManagerSecretMetadata *bool `json:"enforceEncryptedSecretManagerSecretMetadata"` Environments []struct { Id string `json:"id"` Name string `json:"name"` @@ -11258,6 +9811,7 @@ func ParseGetRelaysResponse(rsp *http.Response) (*GetRelaysResponse, error) { IdentityId *openapi_types.UUID `json:"identityId"` Name string `json:"name"` OrgId *openapi_types.UUID `json:"orgId"` + TokenVersion *float32 `json:"tokenVersion,omitempty"` UpdatedAt time.Time `json:"updatedAt"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11360,18 +9914,19 @@ func ParseListGatewaysResponse(rsp *http.Response) (*ListGatewaysResponse, error switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest []struct { + Capabilities interface{} `json:"capabilities"` ConnectedResourcesCount float32 `json:"connectedResourcesCount"` CreatedAt time.Time `json:"createdAt"` Heartbeat *time.Time `json:"heartbeat"` + HeartbeatTTL *float32 `json:"heartbeatTTL"` Id openapi_types.UUID `json:"id"` Identity *struct { Id string `json:"id"` Name string `json:"name"` } `json:"identity"` - IdentityId *openapi_types.UUID `json:"identityId"` - LastHealthCheckStatus *string `json:"lastHealthCheckStatus"` - Name string `json:"name"` - UpdatedAt time.Time `json:"updatedAt"` + IdentityId *openapi_types.UUID `json:"identityId"` + Name string `json:"name"` + UpdatedAt time.Time `json:"updatedAt"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -11601,6 +10156,7 @@ func ParseListSecretsV4Response(rsp *http.Response) (*ListSecretsV4Response, err Key string `json:"key"` Value *string `json:"value,omitempty"` } `json:"secretMetadata,omitempty"` + SecretPath *string `json:"secretPath,omitempty"` SecretReminderNote *string `json:"secretReminderNote"` SecretReminderRepeatDays *float32 `json:"secretReminderRepeatDays"` SecretValue string `json:"secretValue"` @@ -11655,6 +10211,13 @@ func ParseListSecretsV4Response(rsp *http.Response) (*ListSecretsV4Response, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 304: + var dest interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON304 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { Details interface{} `json:"details,omitempty"` diff --git a/e2e/pam/pam_helpers.go b/e2e/pam/pam_helpers.go index 4cbc2e7c..561bae8b 100644 --- a/e2e/pam/pam_helpers.go +++ b/e2e/pam/pam_helpers.go @@ -181,6 +181,32 @@ func SetupPAMInfra(t *testing.T, ctx context.Context, opts ...SetupPAMOption) *P } } +// CreatePamFolder creates a PAM folder in the project and returns its ID. +func CreatePamFolder(t *testing.T, ctx context.Context, infra *PAMTestInfra, name string) openapitypes.UUID { + resp, err := infra.ApiClient.CreatePamFolderWithResponse(ctx, client.CreatePamFolderJSONRequestBody{ + Name: name, + }) + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode(), "create folder: %s", string(resp.Body)) + slog.Info("Created PAM folder", "folderId", resp.JSON200.Folder.Id, "name", name) + return resp.JSON200.Folder.Id +} + +// CreatePamTemplate creates an account template of the given type, attached to the infra gateway, +// and returns its ID. Accounts created from it inherit the gateway. +func CreatePamTemplate(t *testing.T, ctx context.Context, infra *PAMTestInfra, name string, accountType client.CreatePamAccountTemplateJSONBodyType) openapitypes.UUID { + gatewayId := infra.GatewayId + resp, err := infra.ApiClient.CreatePamAccountTemplateWithResponse(ctx, client.CreatePamAccountTemplateJSONRequestBody{ + Name: name, + Type: accountType, + GatewayId: &gatewayId, + }) + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode(), "create template: %s", string(resp.Body)) + slog.Info("Created PAM template", "templateId", resp.JSON200.Template.Id, "name", name, "type", accountType) + return resp.JSON200.Template.Id +} + func LoginUser(t *testing.T, ctx context.Context, infra *PAMTestInfra) { loginCmd := helpers.Command{ Test: t, diff --git a/e2e/pam/postgres_test.go b/e2e/pam/postgres_test.go index 99c0bbed..539a1da8 100644 --- a/e2e/pam/postgres_test.go +++ b/e2e/pam/postgres_test.go @@ -9,7 +9,6 @@ import ( "testing" "time" - "github.com/google/uuid" "github.com/infisical/cli/e2e-tests/packages/client" helpers "github.com/infisical/cli/e2e-tests/util" "github.com/jackc/pgx/v5" @@ -18,10 +17,6 @@ import ( ) func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { - // TODO: Re-enable once the PAM revamp's e2e tests are updated. Temporarily - // skipped so it stops blocking production. - t.Skip("Temporarily disabled pending PAM revamp test updates") - ctx, cancel := context.WithCancel(context.Background()) t.Cleanup(cancel) @@ -59,20 +54,27 @@ func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { directConn.Close(ctx) slog.Info("Verified PAM Postgres is accessible directly") - // Get host/port for PAM resource creation + // Get host/port for the PAM account pgHost, err := pgContainer.Host(ctx) require.NoError(t, err) pgPort, err := pgContainer.MappedPort(ctx, "5432") require.NoError(t, err) - // Create Postgres PAM resource via API - resourceName := "pg-resource" - pgResResp, err := infra.ApiClient.CreatePostgresPamResourceWithResponse( + // Create folder + template + account (new PAM model) + folderName := "pg-folder" + accountName := "pg-account" + folderId := CreatePamFolder(t, ctx, infra, folderName) + templateId := CreatePamTemplate(t, ctx, infra, "pg-template", client.CreatePamAccountTemplateJSONBodyTypePostgres) + + gatewayId := infra.GatewayId + password := pgPassword + acctResp, err := infra.ApiClient.CreatePostgresPamAccountWithResponse( ctx, - client.CreatePostgresPamResourceJSONRequestBody{ - ProjectId: uuid.MustParse(infra.ProjectId), - GatewayId: &infra.GatewayId, - Name: resourceName, + client.CreatePostgresPamAccountJSONRequestBody{ + FolderId: folderId, + TemplateId: templateId, + GatewayId: &gatewayId, + Name: accountName, ConnectionDetails: struct { Database string `json:"database"` Host string `json:"host"` @@ -87,47 +89,30 @@ func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { SslEnabled: false, SslRejectUnauthorized: false, }, - }, - ) - require.NoError(t, err) - require.Equal(t, http.StatusOK, pgResResp.StatusCode()) - resourceId := pgResResp.JSON200.Resource.Id - slog.Info("Created Postgres PAM resource", "resourceId", resourceId) - - // Create Postgres PAM account via API - accountName := "pg-account" - pgAcctResp, err := infra.ApiClient.CreatePostgresPamAccountWithResponse( - ctx, - client.CreatePostgresPamAccountJSONRequestBody{ - ResourceId: resourceId, - Name: accountName, Credentials: struct { - Password string `json:"password"` - Username string `json:"username"` + Password *string `json:"password,omitempty"` + Username string `json:"username"` }{ Username: pgUser, - Password: pgPassword, + Password: &password, }, }, ) require.NoError(t, err) - require.Equal(t, http.StatusOK, pgAcctResp.StatusCode()) + require.Equal(t, http.StatusOK, acctResp.StatusCode(), "create account: %s", string(acctResp.Body)) slog.Info("Created Postgres PAM account") // Login with provisioned admin user LoginUser(t, ctx, infra) - // Run pam db access + // Run pam access / freePort := helpers.GetFreePort() pamCmd := helpers.Command{ Test: t, RunMethod: helpers.RunMethodSubprocess, DisableTempHomeDir: true, Args: []string{ - "pam", "db", "access", - "--resource", resourceName, - "--account", accountName, - "--project-id", infra.ProjectId, + "pam", "access", fmt.Sprintf("%s/%s", folderName, accountName), "--duration", "5m", "--port", fmt.Sprintf("%d", freePort), }, @@ -143,16 +128,19 @@ func TestPAM_Postgres_ConnectToDatabase(t *testing.T) { result := helpers.WaitFor(t, helpers.WaitForOptions{ EnsureCmdRunning: &pamCmd, Condition: func() helpers.ConditionResult { - if strings.Contains(pamCmd.Stdout(), "Database Proxy Session Started") { + if strings.Contains(pamCmd.Stdout(), "Proxy Session Started") { return helpers.ConditionSuccess } return helpers.ConditionWait }, }) + if result != helpers.WaitSuccess { + pamCmd.DumpOutput() + } require.Equal(t, helpers.WaitSuccess, result, "Database proxy should start successfully") // Connect via pgx to the proxy and run SELECT 1 - proxyConnStr := fmt.Sprintf("postgres://%s@localhost:%d/%s?sslmode=disable", pgUser, freePort, pgDatabase) + proxyConnStr := fmt.Sprintf("postgres://%s@127.0.0.1:%d/%s?sslmode=disable", pgUser, freePort, pgDatabase) var proxyConn *pgx.Conn connectResult := helpers.WaitFor(t, helpers.WaitForOptions{ EnsureCmdRunning: &pamCmd, diff --git a/e2e/pam/rdp_test.go b/e2e/pam/rdp_test.go index c960ea9e..ba65ad77 100644 --- a/e2e/pam/rdp_test.go +++ b/e2e/pam/rdp_test.go @@ -3,7 +3,6 @@ package pam import ( "bytes" "context" - "encoding/json" "fmt" "log/slog" "net/http" @@ -15,11 +14,9 @@ import ( "time" "github.com/docker/docker/api/types/container" - "github.com/docker/go-connections/nat" - "github.com/google/uuid" "github.com/infisical/cli/e2e-tests/packages/client" helpers "github.com/infisical/cli/e2e-tests/util" - "github.com/jackc/pgx/v5" + openapitypes "github.com/oapi-codegen/runtime/types" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" @@ -30,6 +27,8 @@ const ( rdpPassword = "testpass" ) +func intPtr(i int) *int { return &i } + func startRDPContainer(t *testing.T, ctx context.Context) (testcontainers.Container, string, int) { ctr, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ ContainerRequest: testcontainers.ContainerRequest{ @@ -59,138 +58,15 @@ func startRDPContainer(t *testing.T, ctx context.Context) (testcontainers.Contai return ctr, host, port.Int() } -// Inserts recording config directly into Postgres. The API route validates -// the bucket via S3 HeadBucket using virtual-hosted-style addressing, which -// fails in Docker because "bucket.localstack" doesn't resolve. -func setupRecordingConfig(t *testing.T, ctx context.Context, infra *PAMTestInfra) { - connectionID := createAwsAppConnection(t, ctx, infra) - - dbContainer, err := infra.Infisical.Compose().ServiceContainer(ctx, "db") - require.NoError(t, err) - dbPort, err := dbContainer.MappedPort(ctx, nat.Port("5432")) - require.NoError(t, err) - - conn, err := pgx.Connect(ctx, fmt.Sprintf("postgres://infisical:infisical@localhost:%s/infisical", dbPort.Port())) - require.NoError(t, err) - defer conn.Close(ctx) - - _, err = conn.Exec(ctx, ` - INSERT INTO pam_project_recording_configs (id, "projectId", "storageBackend", "connectionId", bucket, region) - VALUES ($1, $2, 'aws-s3', $3, 'e2e-unused', 'us-east-1') - ON CONFLICT ("projectId") DO NOTHING`, - uuid.New().String(), infra.ProjectId, connectionID, - ) - require.NoError(t, err) - slog.Info("Inserted recording config", "projectId", infra.ProjectId) -} - -func createAwsAppConnection(t *testing.T, ctx context.Context, infra *PAMTestInfra) string { - body, err := json.Marshal(map[string]interface{}{ - "name": "e2e-localstack-aws", - "method": "access-key", - "credentials": map[string]string{ - "accessKeyId": "test", - "secretAccessKey": "test", - }, - }) - require.NoError(t, err) - - resp, err := infra.ApiClient.CreateAwsAppConnectionWithBodyWithResponse(ctx, "application/json", bytes.NewReader(body)) - require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode(), "create AWS app connection: %s", string(resp.Body)) - - var result struct { - AppConnection struct { - ID string `json:"id"` - } `json:"appConnection"` - } - require.NoError(t, json.Unmarshal(resp.Body, &result)) - slog.Info("Created AWS app connection", "id", result.AppConnection.ID) - return result.AppConnection.ID -} - -func createRDPPamResource(t *testing.T, ctx context.Context, infra *PAMTestInfra, name, host string, port int) uuid.UUID { - gatewayId := infra.GatewayId - resp, err := infra.ApiClient.CreateWindowsPamResourceWithResponse( - ctx, - client.CreateWindowsPamResourceJSONRequestBody{ - ProjectId: uuid.MustParse(infra.ProjectId), - GatewayId: &gatewayId, - Name: name, - ConnectionDetails: struct { - Hostname string `json:"hostname"` - Port int `json:"port"` - Protocol client.CreateWindowsPamResourceJSONBodyConnectionDetailsProtocol `json:"protocol"` - UseWinrmHttps bool `json:"useWinrmHttps"` - WinrmCaCert *string `json:"winrmCaCert,omitempty"` - WinrmPort int `json:"winrmPort"` - WinrmRejectUnauthorized bool `json:"winrmRejectUnauthorized"` - WinrmTlsServerName *string `json:"winrmTlsServerName,omitempty"` - }{ - Hostname: host, - Port: port, - Protocol: client.Rdp, - WinrmPort: 5985, - UseWinrmHttps: false, - WinrmRejectUnauthorized: false, - }, - }, - ) - require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode(), "create Windows resource: %s", string(resp.Body)) - slog.Info("Created Windows PAM resource", "resourceId", resp.JSON200.Resource.Id, "name", name) - return resp.JSON200.Resource.Id -} - -func createRDPPamAccount(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceId uuid.UUID, name, username, password string) { - body, err := json.Marshal(map[string]interface{}{ - "resourceId": resourceId.String(), - "name": name, - "credentials": map[string]interface{}{ - "username": username, - "password": password, - }, - "internalMetadata": map[string]interface{}{ - "accountType": "user", - }, - }) - require.NoError(t, err) - - result := helpers.WaitFor(t, helpers.WaitForOptions{ - Timeout: 90 * time.Second, - Interval: 3 * time.Second, - Condition: func() helpers.ConditionResult { - resp, callErr := infra.ApiClient.CreateWindowsPamAccountWithBodyWithResponse( - ctx, "application/json", bytes.NewReader(append([]byte(nil), body...)), - ) - if callErr != nil { - slog.Warn("Windows PAM account creation attempt failed, retrying...", "error", callErr) - return helpers.ConditionWait - } - if resp.StatusCode() != http.StatusOK { - slog.Warn("Windows PAM account creation returned non-200, retrying...", "status", resp.StatusCode(), "body", string(resp.Body)) - return helpers.ConditionWait - } - return helpers.ConditionSuccess - }, - }) - require.Equal(t, helpers.WaitSuccess, result, "Windows PAM account creation should succeed for %s", name) - slog.Info("Created Windows PAM account", "name", name) -} - -func startRDPProxy(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceName, accountName, duration string, port int) (int, *helpers.Command) { +func startRDPProxy(t *testing.T, ctx context.Context, infra *PAMTestInfra, folderName, accountName, duration string, port int) (int, *helpers.Command) { pamCmd := helpers.Command{ Test: t, RunMethod: helpers.RunMethodSubprocess, DisableTempHomeDir: true, Args: []string{ - "pam", "rdp", "access", - "--resource", resourceName, - "--account", accountName, - "--project-id", infra.ProjectId, + "pam", "access", fmt.Sprintf("%s/%s", folderName, accountName), "--duration", duration, "--port", fmt.Sprintf("%d", port), - "--no-launch", }, Env: map[string]string{ "HOME": infra.SharedHomeDir, @@ -308,16 +184,21 @@ func expectFreeRDPFailure(t *testing.T, ctx context.Context, binary string, host } func TestPAM_RDP(t *testing.T) { - // TODO: Re-enable once the PAM revamp's e2e tests are updated. Temporarily - // skipped so it stops blocking production. - t.Skip("Temporarily disabled pending PAM revamp test updates") + // Ported to the new folder/template/account model, but not yet runnable here: Windows sessions + // require S3 recording configured on the template, whose validation can't run against the + // containerized backend, and the client checks need a freerdp-capable runner. Re-enable once + // recording config is wired into the harness. + t.Skip("RDP e2e pending recording-config wiring for the new PAM model") ctx, cancel := context.WithCancel(context.Background()) t.Cleanup(cancel) - infra := SetupPAMInfra(t, ctx, WithLocalStack()) + infra := SetupPAMInfra(t, ctx) LoginUser(t, ctx, infra) - setupRecordingConfig(t, ctx, infra) + + folderName := "rdp-folder" + folderId := CreatePamFolder(t, ctx, infra, folderName) + templateId := CreatePamTemplate(t, ctx, infra, "rdp-template", client.CreatePamAccountTemplateJSONBodyTypeWindows) rdpBinary := findFreeRDPBinary(t) @@ -325,12 +206,11 @@ func TestPAM_RDP(t *testing.T) { _, resourceHost, rdpPort := startRDPContainer(t, ctx) slog.Info("RDP container started", "host", resourceHost, "port", rdpPort) - resourceName := "rdp-connection-resource" - resourceId := createRDPPamResource(t, ctx, infra, resourceName, resourceHost, rdpPort) - createRDPPamAccount(t, ctx, infra, resourceId, "rdp-connection-account", rdpUser, rdpPassword) + accountName := "rdp-connection-account" + createRDPPamAccountAt(t, ctx, infra, folderId, templateId, accountName, resourceHost, rdpPort, rdpUser, rdpPassword) proxyPort := helpers.GetFreePort() - startRDPProxy(t, ctx, infra, resourceName, "rdp-connection-account", "5m", proxyPort) + startRDPProxy(t, ctx, infra, folderName, accountName, "5m", proxyPort) err := connectFreeRDP(t, ctx, rdpBinary, "127.0.0.1", proxyPort, "testuser", "", 10*time.Second) require.NoError(t, err, "xfreerdp should connect through proxy") @@ -340,12 +220,11 @@ func TestPAM_RDP(t *testing.T) { t.Run("bad-credentials", func(t *testing.T) { _, resourceHost, rdpPort := startRDPContainer(t, ctx) - resourceName := "rdp-badcreds-resource" - resourceId := createRDPPamResource(t, ctx, infra, resourceName, resourceHost, rdpPort) - createRDPPamAccount(t, ctx, infra, resourceId, "rdp-badcreds-account", rdpUser, "wrong-password") + accountName := "rdp-badcreds-account" + createRDPPamAccountAt(t, ctx, infra, folderId, templateId, accountName, resourceHost, rdpPort, rdpUser, "wrong-password") proxyPort := helpers.GetFreePort() - startRDPProxy(t, ctx, infra, resourceName, "rdp-badcreds-account", "5m", proxyPort) + startRDPProxy(t, ctx, infra, folderName, accountName, "5m", proxyPort) err := expectFreeRDPFailure(t, ctx, rdpBinary, "127.0.0.1", proxyPort, "testuser", "", 60*time.Second) require.Error(t, err, "xfreerdp should fail with bad credentials") @@ -355,14 +234,13 @@ func TestPAM_RDP(t *testing.T) { t.Run("unreachable-target", func(t *testing.T) { ctr, resourceHost, rdpPort := startRDPContainer(t, ctx) - resourceName := "rdp-unreachable-resource" - resourceId := createRDPPamResource(t, ctx, infra, resourceName, resourceHost, rdpPort) - createRDPPamAccount(t, ctx, infra, resourceId, "rdp-unreachable-account", rdpUser, rdpPassword) + accountName := "rdp-unreachable-account" + createRDPPamAccountAt(t, ctx, infra, folderId, templateId, accountName, resourceHost, rdpPort, rdpUser, rdpPassword) require.NoError(t, ctr.Terminate(ctx)) proxyPort := helpers.GetFreePort() - startRDPProxy(t, ctx, infra, resourceName, "rdp-unreachable-account", "5m", proxyPort) + startRDPProxy(t, ctx, infra, folderName, accountName, "5m", proxyPort) err := expectFreeRDPFailure(t, ctx, rdpBinary, "127.0.0.1", proxyPort, "testuser", "", 60*time.Second) require.Error(t, err, "xfreerdp should fail when target is down") @@ -372,9 +250,8 @@ func TestPAM_RDP(t *testing.T) { t.Run("concurrent-connections", func(t *testing.T) { _, resourceHost, rdpPort := startRDPContainer(t, ctx) - resourceName := "rdp-concurrent-resource" - resourceId := createRDPPamResource(t, ctx, infra, resourceName, resourceHost, rdpPort) - createRDPPamAccount(t, ctx, infra, resourceId, "rdp-concurrent-account", rdpUser, rdpPassword) + accountName := "rdp-concurrent-account" + createRDPPamAccountAt(t, ctx, infra, folderId, templateId, accountName, resourceHost, rdpPort, rdpUser, rdpPassword) const numClients = 3 var wg sync.WaitGroup @@ -387,7 +264,7 @@ func TestPAM_RDP(t *testing.T) { proxies := make([]proxyInfo, numClients) for i := 0; i < numClients; i++ { port := helpers.GetFreePort() - startRDPProxy(t, ctx, infra, resourceName, "rdp-concurrent-account", "5m", port) + startRDPProxy(t, ctx, infra, folderName, accountName, "5m", port) proxies[i] = proxyInfo{port: port, args: buildFreeRDPArgs(t, rdpBinary, "127.0.0.1", port, "testuser", "")} } @@ -406,3 +283,54 @@ func TestPAM_RDP(t *testing.T) { slog.Info("All concurrent RDP connections succeeded", "numClients", numClients) }) } + +// createRDPPamAccountAt creates a Windows account with the given host/port. +func createRDPPamAccountAt(t *testing.T, ctx context.Context, infra *PAMTestInfra, folderId, templateId openapitypes.UUID, name, host string, port int, username, password string) { + gatewayId := infra.GatewayId + pw := password + winrmPort := 5985 + body := client.CreateWindowsPamAccountJSONRequestBody{ + FolderId: folderId, + TemplateId: templateId, + GatewayId: &gatewayId, + Name: name, + ConnectionDetails: struct { + Host string `json:"host"` + Port int `json:"port"` + UseWinrmHttps *bool `json:"useWinrmHttps,omitempty"` + WinrmCaCert *string `json:"winrmCaCert,omitempty"` + WinrmPort *int `json:"winrmPort,omitempty"` + WinrmRejectUnauthorized *bool `json:"winrmRejectUnauthorized,omitempty"` + }{ + Host: host, + Port: port, + WinrmPort: &winrmPort, + }, + Credentials: struct { + Password *string `json:"password,omitempty"` + Username string `json:"username"` + }{ + Username: username, + Password: &pw, + }, + } + + result := helpers.WaitFor(t, helpers.WaitForOptions{ + Timeout: 90 * time.Second, + Interval: 3 * time.Second, + Condition: func() helpers.ConditionResult { + resp, callErr := infra.ApiClient.CreateWindowsPamAccountWithResponse(ctx, body) + if callErr != nil { + slog.Warn("Windows PAM account creation attempt failed, retrying...", "error", callErr) + return helpers.ConditionWait + } + if resp.StatusCode() != http.StatusOK { + slog.Warn("Windows PAM account creation returned non-200, retrying...", "status", resp.StatusCode(), "body", string(resp.Body)) + return helpers.ConditionWait + } + return helpers.ConditionSuccess + }, + }) + require.Equal(t, helpers.WaitSuccess, result, "Windows PAM account creation should succeed for %s", name) + slog.Info("Created Windows PAM account", "name", name) +} diff --git a/e2e/pam/redis_test.go b/e2e/pam/redis_test.go index 9a3a816f..e3215445 100644 --- a/e2e/pam/redis_test.go +++ b/e2e/pam/redis_test.go @@ -1,6 +1,7 @@ package pam import ( + "bytes" "context" "crypto/ecdsa" "crypto/elliptic" @@ -8,6 +9,7 @@ import ( "crypto/tls" "crypto/x509" "crypto/x509/pkix" + "encoding/json" "encoding/pem" "fmt" "log/slog" @@ -20,9 +22,9 @@ import ( "testing" "time" - "github.com/google/uuid" "github.com/infisical/cli/e2e-tests/packages/client" helpers "github.com/infisical/cli/e2e-tests/util" + openapitypes "github.com/oapi-codegen/runtime/types" "github.com/redis/go-redis/v9" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" @@ -40,65 +42,80 @@ func startRedisContainer(t *testing.T, ctx context.Context, opts ...testcontaine return container } -func createRedisPamResource(t *testing.T, ctx context.Context, infra *PAMTestInfra, name, host string, port int, sslEnabled bool, sslCertificate *string) uuid.UUID { - resp, err := infra.ApiClient.CreateRedisPamResourceWithResponse( - ctx, - client.CreateRedisPamResourceJSONRequestBody{ - ProjectId: uuid.MustParse(infra.ProjectId), - GatewayId: &infra.GatewayId, - Name: name, - ConnectionDetails: struct { - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - }{ - Host: host, - Port: float32(port), - SslEnabled: sslEnabled, - SslCertificate: sslCertificate, - SslRejectUnauthorized: false, - }, - }, - ) +// createRedisPamAccount creates a Redis account in the given folder/template. There is no generated +// client method for Redis on this branch (the account type isn't wired into the backend yet), so the +// request is a raw authenticated POST. Account creation runs a connection test through the gateway, +// so it is retried while things settle. +func createRedisPamAccount(t *testing.T, ctx context.Context, infra *PAMTestInfra, folderId, templateId openapitypes.UUID, name, host string, port int, sslEnabled bool, sslCertificate, username, password *string) { + gatewayId := infra.GatewayId + + connectionDetails := map[string]interface{}{ + "host": host, + "port": port, + "sslEnabled": sslEnabled, + "sslRejectUnauthorized": false, + } + if sslCertificate != nil { + connectionDetails["sslCertificate"] = *sslCertificate + } + credentials := map[string]interface{}{} + if username != nil { + credentials["username"] = *username + } + if password != nil { + credentials["password"] = *password + } + + body, err := json.Marshal(map[string]interface{}{ + "folderId": folderId.String(), + "templateId": templateId.String(), + "gatewayId": gatewayId.String(), + "name": name, + "connectionDetails": connectionDetails, + "credentials": credentials, + }) require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode()) - slog.Info("Created Redis PAM resource", "resourceId", resp.JSON200.Resource.Id, "name", name) - return resp.JSON200.Resource.Id -} -func createRedisPamAccount(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceId uuid.UUID, name string, username, password *string) { - resp, err := infra.ApiClient.CreateRedisPamAccountWithResponse( - ctx, - client.CreateRedisPamAccountJSONRequestBody{ - ResourceId: resourceId, - Name: name, - Credentials: struct { - Password *string `json:"password,omitempty"` - Username *string `json:"username,omitempty"` - }{ - Username: username, - Password: password, - }, + url := fmt.Sprintf("%s/api/v1/pam/accounts/redis", infra.Infisical.ApiUrl(t)) + result := helpers.WaitFor(t, helpers.WaitForOptions{ + Timeout: 90 * time.Second, + Interval: 3 * time.Second, + Condition: func() helpers.ConditionResult { + req, reqErr := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(body)) + if reqErr != nil { + slog.Warn("Redis PAM account request build failed, retrying...", "error", reqErr) + return helpers.ConditionWait + } + req.Header.Set("Authorization", "Bearer "+infra.ProvisionResult.Token) + req.Header.Set("Content-Type", "application/json") + + resp, callErr := http.DefaultClient.Do(req) + if callErr != nil { + slog.Warn("Redis PAM account creation attempt failed, retrying...", "error", callErr) + return helpers.ConditionWait + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + buf := new(bytes.Buffer) + _, _ = buf.ReadFrom(resp.Body) + slog.Warn("Redis PAM account creation returned non-200, retrying...", "status", resp.StatusCode, "body", buf.String()) + return helpers.ConditionWait + } + return helpers.ConditionSuccess }, - ) - require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode()) + }) + require.Equal(t, helpers.WaitSuccess, result, "Redis PAM account creation should succeed for %s", name) slog.Info("Created Redis PAM account", "name", name) } -func startRedisProxy(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceName, accountName string) (int, *helpers.Command) { +func startRedisProxy(t *testing.T, ctx context.Context, infra *PAMTestInfra, folderName, accountName string) (int, *helpers.Command) { freePort := helpers.GetFreePort() pamCmd := helpers.Command{ Test: t, RunMethod: helpers.RunMethodSubprocess, DisableTempHomeDir: true, Args: []string{ - "pam", "redis", "access", - "--resource", resourceName, - "--account", accountName, - "--project-id", infra.ProjectId, + "pam", "access", fmt.Sprintf("%s/%s", folderName, accountName), "--duration", "5m", "--port", fmt.Sprintf("%d", freePort), }, @@ -110,7 +127,7 @@ func startRedisProxy(t *testing.T, ctx context.Context, infra *PAMTestInfra, res pamCmd.Start(ctx) t.Cleanup(pamCmd.Stop) - // Redis proxy prints the banner to stderr (unlike the Postgres proxy which uses stdout). + // The Redis proxy prints its banner to stderr. result := helpers.WaitFor(t, helpers.WaitForOptions{ EnsureCmdRunning: &pamCmd, Condition: func() helpers.ConditionResult { @@ -210,9 +227,10 @@ func generateSelfSignedCert(t *testing.T, host, certDir string) (caPEM string) { } func TestPAM_Redis(t *testing.T) { - // TODO: Re-enable once the PAM revamp's e2e tests are updated. Temporarily - // skipped so it stops blocking production. - t.Skip("Temporarily disabled pending PAM revamp test updates") + // Redis PAM support is not wired into the backend on this branch (no Redis account type), so there + // is no create-account endpoint yet. This test is written against the new folder/template/account + // model as if Redis were available; remove the skip once the Redis feature lands. + t.Skip("Redis PAM not available on this branch; remove skip once the Redis feature lands") ctx, cancel := context.WithCancel(context.Background()) t.Cleanup(cancel) @@ -220,6 +238,12 @@ func TestPAM_Redis(t *testing.T) { infra := SetupPAMInfra(t, ctx) LoginUser(t, ctx, infra) + folderName := "redis-folder" + folderId := CreatePamFolder(t, ctx, infra, folderName) + templateId := CreatePamTemplate(t, ctx, infra, "redis-template", client.CreatePamAccountTemplateJSONBodyTypeRedis) + + defaultUser := "default" + t.Run("no-auth", func(t *testing.T) { container := startRedisContainer(t, ctx) @@ -227,27 +251,19 @@ func TestPAM_Redis(t *testing.T) { require.NoError(t, err) redisPort, err := container.MappedPort(ctx, "6379") require.NoError(t, err) - directAddr := fmt.Sprintf("%s:%d", redisHost, redisPort.Int()) // Verify Redis is accessible directly. - rdb := redis.NewClient(&redis.Options{Addr: directAddr}) + rdb := redis.NewClient(&redis.Options{Addr: fmt.Sprintf("%s:%d", redisHost, redisPort.Int())}) pong, err := rdb.Ping(ctx).Result() require.NoError(t, err) require.Equal(t, "PONG", pong) rdb.Close() - slog.Info("Verified Redis is accessible directly") - - resourceName := "redis-noauth-resource" - resourceId := createRedisPamResource(t, ctx, infra, resourceName, redisHost, redisPort.Int(), false, nil) - createRedisPamAccount(t, ctx, infra, resourceId, "redis-noauth-account", nil, nil) - - proxyPort, pamCmd := startRedisProxy(t, ctx, infra, resourceName, "redis-noauth-account") - proxyAddr := fmt.Sprintf("localhost:%d", proxyPort) - testKey := "e2e-noauth-key" - testValue := "e2e-noauth-value" + accountName := "redis-noauth-account" + createRedisPamAccount(t, ctx, infra, folderId, templateId, accountName, redisHost, redisPort.Int(), false, nil, &defaultUser, nil) - verifyRedisThroughProxy(t, ctx, pamCmd, proxyAddr, testKey, testValue) + proxyPort, pamCmd := startRedisProxy(t, ctx, infra, folderName, accountName) + verifyRedisThroughProxy(t, ctx, pamCmd, fmt.Sprintf("localhost:%d", proxyPort), "e2e-noauth-key", "e2e-noauth-value") }) t.Run("acl-user-password", func(t *testing.T) { @@ -269,11 +285,10 @@ user %s on >%s ~* +@all -@dangerous require.NoError(t, err) redisPort, err := container.MappedPort(ctx, "6379") require.NoError(t, err) - directAddr := fmt.Sprintf("%s:%d", redisHost, redisPort.Int()) // Verify Redis is accessible with ACL credentials directly. rdb := redis.NewClient(&redis.Options{ - Addr: directAddr, + Addr: fmt.Sprintf("%s:%d", redisHost, redisPort.Int()), Username: aclUser, Password: aclPass, }) @@ -281,24 +296,17 @@ user %s on >%s ~* +@all -@dangerous require.NoError(t, err) require.Equal(t, "PONG", pong) rdb.Close() - slog.Info("Verified Redis is accessible directly with ACL credentials") - resourceName := "redis-acl-resource" - resourceId := createRedisPamResource(t, ctx, infra, resourceName, redisHost, redisPort.Int(), false, nil) + accountName := "redis-acl-account" username := aclUser password := aclPass - createRedisPamAccount(t, ctx, infra, resourceId, "redis-acl-account", &username, &password) + createRedisPamAccount(t, ctx, infra, folderId, templateId, accountName, redisHost, redisPort.Int(), false, nil, &username, &password) - proxyPort, pamCmd := startRedisProxy(t, ctx, infra, resourceName, "redis-acl-account") + proxyPort, pamCmd := startRedisProxy(t, ctx, infra, folderName, accountName) proxyAddr := fmt.Sprintf("localhost:%d", proxyPort) + verifyRedisThroughProxy(t, ctx, pamCmd, proxyAddr, "e2e-acl-key", "e2e-acl-value") - testKey := "e2e-acl-key" - testValue := "e2e-acl-value" - - verifyRedisThroughProxy(t, ctx, pamCmd, proxyAddr, testKey, testValue) - - // Verify ACL permissions are enforced: FLUSHALL should be denied - // because the ACL user does not have @dangerous commands. + // ACL permissions are enforced: FLUSHALL is @dangerous and must be denied. proxyClient := redis.NewClient(&redis.Options{Addr: proxyAddr}) t.Cleanup(func() { proxyClient.Close() }) err = proxyClient.FlushAll(ctx).Err() @@ -312,11 +320,9 @@ user %s on >%s ~* +@all -@dangerous aclPass = "pampassword" ) - // Generate self-signed certs at test time. certDir := t.TempDir() caPEM := generateSelfSignedCert(t, "localhost", certDir) - // Write a Redis config that enables TLS and sets up the ACL user. redisConf := fmt.Sprintf(`tls-port 6379 port 0 tls-cert-file /tls/server.crt @@ -330,7 +336,6 @@ user %s on >%s ~* +@all -@dangerous confPath := filepath.Join(certDir, "redis-ssl.conf") require.NoError(t, os.WriteFile(confPath, []byte(redisConf), 0644)) - // Start Redis with TLS config and mounted certs. container := startRedisContainer(t, ctx, tcredis.WithConfigFile(confPath), testcontainers.WithFiles(testcontainers.ContainerFile{ @@ -354,36 +359,26 @@ user %s on >%s ~* +@all -@dangerous require.NoError(t, err) redisPort, err := container.MappedPort(ctx, "6379") require.NoError(t, err) - directAddr := fmt.Sprintf("%s:%d", redisHost, redisPort.Int()) // Verify Redis is accessible directly with TLS + ACL. rdb := redis.NewClient(&redis.Options{ - Addr: directAddr, - Username: aclUser, - Password: aclPass, - TLSConfig: &tls.Config{ - InsecureSkipVerify: true, - }, + Addr: fmt.Sprintf("%s:%d", redisHost, redisPort.Int()), + Username: aclUser, + Password: aclPass, + TLSConfig: &tls.Config{InsecureSkipVerify: true}, }) pong, err := rdb.Ping(ctx).Result() require.NoError(t, err) require.Equal(t, "PONG", pong) rdb.Close() - slog.Info("Verified Redis is accessible directly with TLS + ACL") - resourceName := "redis-ssl-resource" - resourceId := createRedisPamResource(t, ctx, infra, resourceName, redisHost, redisPort.Int(), true, &caPEM) + accountName := "redis-ssl-account" username := aclUser password := aclPass - createRedisPamAccount(t, ctx, infra, resourceId, "redis-ssl-account", &username, &password) + createRedisPamAccount(t, ctx, infra, folderId, templateId, accountName, redisHost, redisPort.Int(), true, &caPEM, &username, &password) - proxyPort, pamCmd := startRedisProxy(t, ctx, infra, resourceName, "redis-ssl-account") - proxyAddr := fmt.Sprintf("localhost:%d", proxyPort) - - testKey := "e2e-ssl-key" - testValue := "e2e-ssl-value" - - verifyRedisThroughProxy(t, ctx, pamCmd, proxyAddr, testKey, testValue) + proxyPort, pamCmd := startRedisProxy(t, ctx, infra, folderName, accountName) + verifyRedisThroughProxy(t, ctx, pamCmd, fmt.Sprintf("localhost:%d", proxyPort), "e2e-ssl-key", "e2e-ssl-value") }) t.Run("multiple-concurrent-connections", func(t *testing.T) { @@ -393,21 +388,11 @@ user %s on >%s ~* +@all -@dangerous require.NoError(t, err) redisPort, err := container.MappedPort(ctx, "6379") require.NoError(t, err) - directAddr := fmt.Sprintf("%s:%d", redisHost, redisPort.Int()) - - // Verify Redis is accessible directly. - rdb := redis.NewClient(&redis.Options{Addr: directAddr}) - pong, err := rdb.Ping(ctx).Result() - require.NoError(t, err) - require.Equal(t, "PONG", pong) - rdb.Close() - slog.Info("Verified Redis is accessible directly") - resourceName := "redis-concurrent-resource" - resourceId := createRedisPamResource(t, ctx, infra, resourceName, redisHost, redisPort.Int(), false, nil) - createRedisPamAccount(t, ctx, infra, resourceId, "redis-concurrent-account", nil, nil) + accountName := "redis-concurrent-account" + createRedisPamAccount(t, ctx, infra, folderId, templateId, accountName, redisHost, redisPort.Int(), false, nil, &defaultUser, nil) - proxyPort, _ := startRedisProxy(t, ctx, infra, resourceName, "redis-concurrent-account") + proxyPort, _ := startRedisProxy(t, ctx, infra, folderName, accountName) proxyAddr := fmt.Sprintf("localhost:%d", proxyPort) const numClients = 5 diff --git a/e2e/pam/ssh_test.go b/e2e/pam/ssh_test.go index f08120c9..5f612e07 100644 --- a/e2e/pam/ssh_test.go +++ b/e2e/pam/ssh_test.go @@ -8,18 +8,16 @@ import ( "encoding/json" "encoding/pem" "fmt" - "io" "log/slog" "net/http" - "os" "strings" "testing" "time" "github.com/docker/docker/api/types/container" - "github.com/google/uuid" "github.com/infisical/cli/e2e-tests/packages/client" helpers "github.com/infisical/cli/e2e-tests/util" + openapitypes "github.com/oapi-codegen/runtime/types" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" @@ -65,37 +63,25 @@ func startSSHContainer(t *testing.T, ctx context.Context, env map[string]string) return ctr, host, port.Int() } -func createSSHPamResource(t *testing.T, ctx context.Context, infra *PAMTestInfra, name, host string, port int) uuid.UUID { - resp, err := infra.ApiClient.CreateSshPamResourceWithResponse( - ctx, - client.CreateSshPamResourceJSONRequestBody{ - ProjectId: uuid.MustParse(infra.ProjectId), - GatewayId: &infra.GatewayId, - Name: name, - ConnectionDetails: struct { - Host string `json:"host"` - Port float32 `json:"port"` - }{ - Host: host, - Port: float32(port), - }, - }, - ) - require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode()) - slog.Info("Created SSH PAM resource", "resourceId", resp.JSON200.Resource.Id, "name", name) - return resp.JSON200.Resource.Id -} - -func createSSHPamAccount(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceId uuid.UUID, name string, credentials map[string]interface{}) { +// createSSHPamAccount creates an SSH account in the given folder/template and returns its ID. The +// credentials are a discriminated union (authMethod), so the body is built as raw JSON. Account +// creation runs a connection test through the gateway, so it is retried while things settle. +func createSSHPamAccount(t *testing.T, ctx context.Context, infra *PAMTestInfra, folderId, templateId openapitypes.UUID, name, host string, port int, credentials map[string]interface{}) openapitypes.UUID { + gatewayId := infra.GatewayId body, err := json.Marshal(map[string]interface{}{ - "resourceId": resourceId.String(), - "name": name, - "rotationEnabled": false, - "credentials": credentials, + "folderId": folderId.String(), + "templateId": templateId.String(), + "gatewayId": gatewayId.String(), + "name": name, + "connectionDetails": map[string]interface{}{ + "host": host, + "port": port, + }, + "credentials": credentials, }) require.NoError(t, err) + var accountId openapitypes.UUID result := helpers.WaitFor(t, helpers.WaitForOptions{ Timeout: 90 * time.Second, Interval: 3 * time.Second, @@ -111,103 +97,112 @@ func createSSHPamAccount(t *testing.T, ctx context.Context, infra *PAMTestInfra, slog.Warn("SSH PAM account creation returned non-200, retrying...", "status", resp.StatusCode(), "body", string(resp.Body)) return helpers.ConditionWait } + accountId = resp.JSON200.Account.Id return helpers.ConditionSuccess }, }) require.Equal(t, helpers.WaitSuccess, result, "SSH PAM account creation should succeed for %s", name) - slog.Info("Created SSH PAM account", "name", name) + slog.Info("Created SSH PAM account", "name", name, "accountId", accountId) + return accountId } -func runSSHSessionAndVerify(t *testing.T, ctx context.Context, infra *PAMTestInfra, resourceName, accountName, command, expectedOutput string) { - stdinReader, stdinWriter := io.Pipe() - +// runSSHSessionAndVerify starts the SSH proxy (`pam access /`), connects an SSH +// client to the local port (the gateway injects credentials, so the client uses no auth), runs a +// command, and verifies the output. +func runSSHSessionAndVerify(t *testing.T, ctx context.Context, infra *PAMTestInfra, folderName, accountName, command, expectedOutput string) { + freePort := helpers.GetFreePort() pamCmd := helpers.Command{ Test: t, RunMethod: helpers.RunMethodSubprocess, DisableTempHomeDir: true, - Stdin: stdinReader, Args: []string{ - "pam", "ssh", "access", - "--resource", resourceName, - "--account", accountName, - "--project-id", infra.ProjectId, + "pam", "access", fmt.Sprintf("%s/%s", folderName, accountName), "--duration", "5m", + "--port", fmt.Sprintf("%d", freePort), }, Env: map[string]string{ "HOME": infra.SharedHomeDir, "INFISICAL_API_URL": infra.Infisical.ApiUrl(t), - "PATH": os.Getenv("PATH"), }, } pamCmd.Start(ctx) t.Cleanup(pamCmd.Stop) - go func() { - fmt.Fprintln(stdinWriter, command) - }() - - echoResult := helpers.WaitFor(t, helpers.WaitForOptions{ + startResult := helpers.WaitFor(t, helpers.WaitForOptions{ EnsureCmdRunning: &pamCmd, - Timeout: 60 * time.Second, - Interval: 1 * time.Second, Condition: func() helpers.ConditionResult { - if strings.Contains(pamCmd.Stdout(), expectedOutput) { + if strings.Contains(pamCmd.Stdout(), "SSH Proxy Session Started") { return helpers.ConditionSuccess } return helpers.ConditionWait }, }) - if echoResult != helpers.WaitSuccess { + if startResult != helpers.WaitSuccess { pamCmd.DumpOutput() } - require.Equal(t, helpers.WaitSuccess, echoResult, "Should see expected output %q", expectedOutput) - - stdinWriter.Close() + require.Equal(t, helpers.WaitSuccess, startResult, "SSH proxy should start successfully") - exitResult := helpers.WaitFor(t, helpers.WaitForOptions{ - Timeout: 30 * time.Second, - Interval: 2 * time.Second, + var output string + echoResult := helpers.WaitFor(t, helpers.WaitForOptions{ + EnsureCmdRunning: &pamCmd, + Timeout: 60 * time.Second, + Interval: 2 * time.Second, Condition: func() helpers.ConditionResult { - if !pamCmd.IsRunning() { - if pamCmd.ExitCode() == 0 { - slog.Info("PAM SSH access completed successfully") - return helpers.ConditionSuccess - } - pamCmd.DumpOutput() - return helpers.ConditionBreakEarly + sshClient, err := ssh.Dial("tcp", fmt.Sprintf("localhost:%d", freePort), &ssh.ClientConfig{ + User: sshUser, + HostKeyCallback: ssh.InsecureIgnoreHostKey(), + Timeout: 5 * time.Second, + }) + if err != nil { + slog.Warn("SSH proxy connection attempt failed, retrying...", "error", err) + return helpers.ConditionWait } - return helpers.ConditionWait + defer sshClient.Close() + + session, err := sshClient.NewSession() + if err != nil { + slog.Warn("SSH session open failed, retrying...", "error", err) + return helpers.ConditionWait + } + defer session.Close() + + out, err := session.CombinedOutput(command) + if err != nil { + slog.Warn("SSH command failed, retrying...", "error", err) + return helpers.ConditionWait + } + output = string(out) + return helpers.ConditionSuccess }, }) - require.Equal(t, helpers.WaitSuccess, exitResult, "pam ssh access should complete successfully") + if echoResult != helpers.WaitSuccess { + pamCmd.DumpOutput() + } + require.Equal(t, helpers.WaitSuccess, echoResult, "should run a command over the SSH proxy") + require.Contains(t, output, expectedOutput, "command output should contain %q", expectedOutput) } -// configureCertAuth replicates the real user flow for certificate auth setup: -// the frontend shows a `curl | sudo bash` command that the user -// runs on their SSH server. We do the same inside the container. -// The setup script configures /etc/ssh but can't restart sshd (no systemctl in alpine), -// so we send SIGHUP to reload the config afterward. -func configureCertAuth(t *testing.T, ctx context.Context, infra *PAMTestInfra, container testcontainers.Container, sshPort int, resourceId uuid.UUID) { +// configureCertAuth replicates the real user flow for certificate auth setup: the dashboard shows a +// `curl | bash` command the user runs on their SSH server. We do the same inside the +// container. The endpoint is now per-account (accountId). +func configureCertAuth(t *testing.T, ctx context.Context, infra *PAMTestInfra, sshContainer testcontainers.Container, sshPort int, accountId openapitypes.UUID) { // ApiUrl returns a localhost URL which isn't reachable from inside the container. // Use host.docker.internal (configured via ExtraHosts in startSSHContainer) instead. apiURL := strings.Replace(infra.Infisical.ApiUrl(t), "localhost", "host.docker.internal", 1) - setupURL := fmt.Sprintf("%s/api/v1/pam/resources/ssh/%s/ssh-ca-setup", apiURL, resourceId) + setupURL := fmt.Sprintf("%s/api/v1/pam/accounts/ssh/%s/ssh-ca-setup", apiURL, accountId) curlCmd := fmt.Sprintf(`curl -sf -H "Authorization: Bearer %s" "%s" | bash`, infra.ProvisionResult.Token, setupURL) - exitCode, _, err := container.Exec(ctx, []string{"bash", "-c", curlCmd}) + exitCode, _, err := sshContainer.Exec(ctx, []string{"bash", "-c", curlCmd}) require.NoError(t, err) require.Equal(t, 0, exitCode, "ssh-ca-setup script should succeed") // The setup script can't restart sshd in alpine (no systemctl/service). // Reload config by sending SIGHUP to sshd (PID 1). - exitCode, _, err = container.Exec(ctx, []string{"kill", "-HUP", "1"}) + exitCode, _, err = sshContainer.Exec(ctx, []string{"kill", "-HUP", "1"}) require.NoError(t, err) require.Equal(t, 0, exitCode, "sshd reload should succeed") - // Wait for sshd to be fully responsive after config reload. - // A TCP dial is not enough — sshd never closes the listen socket during - // SIGHUP, so the port is always reachable. Instead, do an actual SSH - // handshake to confirm sshd is serving connections after the reload. + // Confirm sshd is serving connections again after the reload with a real handshake. result := helpers.WaitFor(t, helpers.WaitForOptions{ Timeout: 10 * time.Second, Interval: 500 * time.Millisecond, @@ -228,12 +223,11 @@ func configureCertAuth(t *testing.T, ctx context.Context, infra *PAMTestInfra, c require.Equal(t, helpers.WaitSuccess, result, "sshd should be responsive after cert auth config reload") } -// runSSHAuthTest handles all auth-method-specific setup and runs the SSH session test. -// Each auth method configures the container and PAM account differently: -// - password: uses hardcoded testuser/testpass from entrypoint; account gets username + password -// - public-key: container gets SSH_AUTHORIZED_KEY (generated ed25519); account gets username + privateKey -// - certificate: container configured via curl | bash (ssh-ca-setup endpoint); account gets just username -func runSSHAuthTest(t *testing.T, ctx context.Context, infra *PAMTestInfra, method string) { +// runSSHAuthTest configures the container + PAM account for one auth method and runs the session: +// - password: hardcoded testuser/testpass; account gets username + password +// - public-key: container gets SSH_AUTHORIZED_KEY; account gets username + privateKey +// - certificate: container configured via curl | bash (per-account ssh-ca-setup); account gets username +func runSSHAuthTest(t *testing.T, ctx context.Context, infra *PAMTestInfra, folderName string, folderId, templateId openapitypes.UUID, method string) { containerEnv := map[string]string{} accountCreds := map[string]interface{}{ "authMethod": method, @@ -257,42 +251,38 @@ func runSSHAuthTest(t *testing.T, ctx context.Context, infra *PAMTestInfra, meth accountCreds["privateKey"] = string(pem.EncodeToMemory(privKeyPEM)) case "certificate": - // No extra container config needed. - // Cert auth is configured after resource creation via curl | bash. + // No extra container config; cert auth is configured after account creation. } - container, sshHost, sshPort := startSSHContainer(t, ctx, containerEnv) + sshContainer, sshHost, sshPort := startSSHContainer(t, ctx, containerEnv) slog.Info("SSH container started", "method", method, "host", sshHost, "port", sshPort) - resourceName := fmt.Sprintf("ssh-%s-resource", method) - resourceId := createSSHPamResource(t, ctx, infra, resourceName, sshHost, sshPort) + accountName := fmt.Sprintf("ssh-%s-account", method) + accountId := createSSHPamAccount(t, ctx, infra, folderId, templateId, accountName, sshHost, sshPort, accountCreds) if method == "certificate" { - configureCertAuth(t, ctx, infra, container, sshPort, resourceId) + configureCertAuth(t, ctx, infra, sshContainer, sshPort, accountId) } - accountName := fmt.Sprintf("ssh-%s-account", method) - createSSHPamAccount(t, ctx, infra, resourceId, accountName, accountCreds) - marker := fmt.Sprintf("hello-%s", method) - runSSHSessionAndVerify(t, ctx, infra, resourceName, accountName, "echo "+marker, marker) + runSSHSessionAndVerify(t, ctx, infra, folderName, accountName, "echo "+marker, marker) } func TestPAM_SSH(t *testing.T) { - // TODO: Re-enable once the PAM revamp's e2e tests are updated. Temporarily - // skipped so it stops blocking production. - t.Skip("Temporarily disabled pending PAM revamp test updates") - ctx, cancel := context.WithCancel(context.Background()) t.Cleanup(cancel) infra := SetupPAMInfra(t, ctx) LoginUser(t, ctx, infra) + folderName := "ssh-folder" + folderId := CreatePamFolder(t, ctx, infra, folderName) + templateId := CreatePamTemplate(t, ctx, infra, "ssh-template", client.CreatePamAccountTemplateJSONBodyTypeSsh) + methods := []string{"password", "public-key", "certificate"} for _, method := range methods { t.Run(method, func(t *testing.T) { - runSSHAuthTest(t, ctx, infra, method) + runSSHAuthTest(t, ctx, infra, folderName, folderId, templateId, method) }) } } diff --git a/e2e/relay/gateway_test.go b/e2e/relay/gateway_test.go index b55d6cc0..78edbe5c 100644 --- a/e2e/relay/gateway_test.go +++ b/e2e/relay/gateway_test.go @@ -1,6 +1,7 @@ package relay_test import ( + "bytes" "context" "encoding/json" "fmt" @@ -14,7 +15,6 @@ import ( "time" "github.com/compose-spec/compose-go/v2/types" - "github.com/google/uuid" "github.com/infisical/cli/e2e-tests/packages/client" helpers "github.com/infisical/cli/e2e-tests/util" openapitypes "github.com/oapi-codegen/runtime/types" @@ -24,6 +24,26 @@ import ( tcredis "github.com/testcontainers/testcontainers-go/modules/redis" ) +// createPamFolder and createPamTemplate mirror the helpers in the pam package for use in the relay +// test (folder + gateway-attached template are prerequisites for creating accounts in the new model). +func createPamFolder(t *testing.T, ctx context.Context, c client.ClientWithResponsesInterface, name string) openapitypes.UUID { + resp, err := c.CreatePamFolderWithResponse(ctx, client.CreatePamFolderJSONRequestBody{Name: name}) + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode(), "create folder: %s", string(resp.Body)) + return resp.JSON200.Folder.Id +} + +func createPamTemplate(t *testing.T, ctx context.Context, c client.ClientWithResponsesInterface, name string, accountType client.CreatePamAccountTemplateJSONBodyType, gatewayId *openapitypes.UUID) openapitypes.UUID { + resp, err := c.CreatePamAccountTemplateWithResponse(ctx, client.CreatePamAccountTemplateJSONRequestBody{ + Name: name, + Type: accountType, + GatewayId: gatewayId, + }) + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode(), "create template: %s", string(resp.Body)) + return resp.JSON200.Template.Id +} + func TestGateway_RegistersAGateway(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) t.Cleanup(cancel) @@ -210,7 +230,6 @@ func TestGateway_RelayGatewayConnectivity(t *testing.T) { }) require.NoError(t, err) require.Equal(t, projectResp.StatusCode(), http.StatusOK) - projectId := projectResp.JSON200.Project.Id t.Run("kubernetes", func(t *testing.T) { t.Parallel() @@ -264,23 +283,32 @@ func TestGateway_RelayGatewayConnectivity(t *testing.T) { serverURL := fmt.Sprintf("http://%s", listener.Addr().String()) slog.Info("Mock HTTP server started", "url", serverURL) - k8sPamResResp, err := c.CreateKubernetesPamResourceWithResponse( - ctx, - client.CreateKubernetesPamResourceJSONRequestBody{ - ProjectId: uuid.MustParse(projectId), - GatewayId: &gatewayId, - Name: "k8s-resource", - ConnectionDetails: struct { - SslCertificate *string `json:"sslCertificate,omitempty"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - Url string `json:"url"` - }{ - Url: serverURL, - SslRejectUnauthorized: false, - }, - }) + folderId := createPamFolder(t, ctx, c, "k8s-folder") + templateId := createPamTemplate(t, ctx, c, "k8s-template", client.CreatePamAccountTemplateJSONBodyTypeKubernetes, &gatewayId) + k8sBody, err := json.Marshal(map[string]interface{}{ + "folderId": folderId.String(), + "templateId": templateId.String(), + "gatewayId": gatewayId.String(), + "name": "k8s-account", + "connectionDetails": map[string]interface{}{ + "url": serverURL, + "sslRejectUnauthorized": false, + }, + "credentials": map[string]interface{}{ + "authMethod": "service-account-token", + "serviceAccountToken": "dummy-token", + }, + }) + require.NoError(t, err) + k8sURL := fmt.Sprintf("%s/api/v1/pam/accounts/kubernetes", infisical.ApiUrl(t)) + k8sReq, err := http.NewRequestWithContext(ctx, http.MethodPost, k8sURL, bytes.NewReader(k8sBody)) + require.NoError(t, err) + k8sReq.Header.Set("Authorization", "Bearer "+infisical.ProvisionResult().Token) + k8sReq.Header.Set("Content-Type", "application/json") + k8sResp, err := http.DefaultClient.Do(k8sReq) require.NoError(t, err) - require.Equal(t, k8sPamResResp.StatusCode(), http.StatusOK) + defer k8sResp.Body.Close() + require.Equal(t, http.StatusOK, k8sResp.StatusCode) require.True(t, versionEndpointHit) }) @@ -320,29 +348,32 @@ func TestGateway_RelayGatewayConnectivity(t *testing.T) { require.Equal(t, "PONG", pong) slog.Info("Verified Redis is accessible", "addr", connectionString) - // Create Redis PAM resource - redisPortFloat := float32(redisPort.Int()) - redisPamResResp, err := c.CreateRedisPamResourceWithResponse( - ctx, - client.CreateRedisPamResourceJSONRequestBody{ - ProjectId: uuid.MustParse(projectId), - GatewayId: &gatewayId, - Name: "redis-resource", - ConnectionDetails: struct { - Host string `json:"host"` - Port float32 `json:"port"` - SslCertificate *string `json:"sslCertificate,omitempty"` - SslEnabled bool `json:"sslEnabled"` - SslRejectUnauthorized bool `json:"sslRejectUnauthorized"` - }{ - Host: redisHost, - Port: redisPortFloat, - SslEnabled: false, - SslRejectUnauthorized: false, - }, - }) + // Create Redis PAM account (no generated client method on this branch; use a raw POST). + folderId := createPamFolder(t, ctx, c, "redis-folder") + templateId := createPamTemplate(t, ctx, c, "redis-template", client.CreatePamAccountTemplateJSONBodyTypeRedis, &gatewayId) + redisBody, err := json.Marshal(map[string]interface{}{ + "folderId": folderId.String(), + "templateId": templateId.String(), + "gatewayId": gatewayId.String(), + "name": "redis-account", + "connectionDetails": map[string]interface{}{ + "host": redisHost, + "port": redisPort.Int(), + "sslEnabled": false, + "sslRejectUnauthorized": false, + }, + "credentials": map[string]interface{}{"username": "default"}, + }) + require.NoError(t, err) + accURL := fmt.Sprintf("%s/api/v1/pam/accounts/redis", infisical.ApiUrl(t)) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, accURL, bytes.NewReader(redisBody)) + require.NoError(t, err) + req.Header.Set("Authorization", "Bearer "+infisical.ProvisionResult().Token) + req.Header.Set("Content-Type", "application/json") + redisResp, err := http.DefaultClient.Do(req) require.NoError(t, err) - require.Equal(t, redisPamResResp.StatusCode(), http.StatusOK) - slog.Info("Redis PAM resource created successfully") + defer redisResp.Body.Close() + require.Equal(t, http.StatusOK, redisResp.StatusCode) + slog.Info("Redis PAM account created successfully") }) }