Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Merge remote-tracking branch 'origin/main' into feat/pam-rdp-ad-support
bernie-g5ca5568879f3
diff --cc backend/src/ee/services/pam-account/pam-account-service.tsindex 04067e2ee2,5d3b8d6470..7392704717--- a/backend/src/ee/services/pam-account/pam-account-service.ts+++ b/backend/src/ee/services/pam-account/pam-account-service.ts@@@ -1390,30 -1381,8 +1404,24 @@@ export const pamAccountServiceFactory}}- // Windows connection details store the target as `hostname`; every other- // resource type (and the gateway's handler code) reads `host`. Remap- // before returning so the gateway never has to special-case it.if (decryptedResource.resourceType === PamResource.Windows) {- const { hostname, ...rest } = decryptedResource.connectionDetails as {- hostname: string;- [key: string]: unknown;- };+ const { hostname, ...rest } = decryptedResource.connectionDetails;++ // The bridge forwards `domain` to IronRDP for NTLM CredSSP against AD.+ let domainName: string | undefined;+ if (account.domainId) {+ const domain = await pamDomainDAL.findById(account.domainId);+ if (!domain) {+ throw new NotFoundError({ message: `Domain with ID '${account.domainId}' not found` });+ }+ const domainConnectionDetails = (await decryptDomainConnectionDetails({+ projectId: session.projectId,+ encryptedConnectionDetails: domain.encryptedConnectionDetails,+ kmsService+ })) as { domain: string };+ domainName = domainConnectionDetails.domain;+ }+return {credentials: {...rest,diff --cc backend/src/ee/services/pam-resource/windows-server/windows-server-resource-schemas.tsindex e2c44f1f49,643e16cb09..f3dd310733--- a/backend/src/ee/services/pam-resource/windows-server/windows-server-resource-schemas.ts+++ b/backend/src/ee/services/pam-resource/windows-server/windows-server-resource-schemas.ts@@@ -121,21 -121,8 +121,8 @@@ export const SanitizedWindowsAccountWit});// Sessions- // Note the `host` field here: resource-facing schemas use `hostname` (matches- // Windows / AD terminology), but the session-credentials endpoint remaps it to- // `host` before responding so the gateway's handler dispatch can share one- // code path across every resource type (all other resource types already- // return `host`). See getSessionCredentials in pam-account-service.- export const WindowsSessionCredentialsSchema = z- .object({- protocol: z.literal(WindowsProtocol.RDP),- host: z.string().trim().min(1).max(255),- port: z.coerce.number().int().min(1).max(65535),- winrmPort: z.coerce.number().int().min(1).max(65535),- useWinrmHttps: z.boolean(),- winrmRejectUnauthorized: z.boolean(),- winrmCaCert: z.string().optional(),- winrmTlsServerName: z.string().optional(),- domain: z.string().optional()- })+ // Renames `hostname` to `host` so the gateway can dispatch all resource types-// uniformly on a `host` field.++// uniformly on a `host` field. `domain` is set on AD-account sessions for NTLM.+ export const WindowsSessionCredentialsSchema = WindowsResourceConnectionDetailsSchema.omit({ hostname: true })- .extend({ host: z.string().trim().min(1).max(255) })++ .extend({ host: z.string().trim().min(1).max(255), domain: z.string().optional() }).and(WindowsAccountCredentialsSchema);