Skip to content

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

rename resourceType to accountType

x032205b4abc9461e15
diff --git a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts b/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
index 4120639d3e..45c23622a9 100644
--- a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
+++ b/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
@@ -488,14 +488,14 @@ export const gatewayV2ServiceFactory = ({
gatewayId,
sessionId,
duration,
- resourceType,
+ accountType,
host,
port,
actorMetadata
}: {
gatewayId: string;
sessionId: string;
- resourceType: PamAccountType;
+ accountType: PamAccountType;
duration?: number;
host: string;
port?: number;
@@ -582,7 +582,7 @@ export const gatewayV2ServiceFactory = ({
Buffer.from(
JSON.stringify({
sessionId,
- resourceType
+ accountType
})
)
);
diff --git a/backend/src/ee/services/pam-web-access/pam-session-handler-registry.ts b/backend/src/ee/services/pam-web-access/pam-session-handler-registry.ts
index 9d25e52efb..3fc32a3002 100644
--- a/backend/src/ee/services/pam-web-access/pam-session-handler-registry.ts
+++ b/backend/src/ee/services/pam-web-access/pam-session-handler-registry.ts
@@ -8,7 +8,7 @@ export type TWebAccessHandler = (
) => Promise<TSessionHandlerResult>;
type TSessionHandlerEntry = {
- gatewayResourceType: PamAccountType;
+ gatewayAccountType: PamAccountType;
handler: TWebAccessHandler;
};
diff --git a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
index 1af0a8f726..7e75baf929 100644
--- a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
+++ b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
@@ -435,7 +435,7 @@ export const pamWebAccessServiceFactory = ({
const certs = await gatewayV2Service.getPAMConnectionDetails({
gatewayId: effectiveGatewayId,
sessionId: session.id,
- resourceType: handlerEntry.gatewayResourceType,
+ accountType: handlerEntry.gatewayAccountType,
host: connectionDetails.host,
port: connectionDetails.port,
duration: sessionDurationMs,
diff --git a/backend/src/ee/services/pam-web-access/postgres/pam-postgres-session-handler.ts b/backend/src/ee/services/pam-web-access/postgres/pam-postgres-session-handler.ts
index 753dc1a996..c0696366cc 100644
--- a/backend/src/ee/services/pam-web-access/postgres/pam-postgres-session-handler.ts
+++ b/backend/src/ee/services/pam-web-access/postgres/pam-postgres-session-handler.ts
@@ -3,6 +3,14 @@ import crypto from "crypto";
import { PamAccountType } from "@app/ee/services/pam/pam-enums";
import { logger } from "@app/lib/logger";
+import { registerSessionHandler } from "../pam-session-handler-registry";
+import { parseClientMessage } from "../pam-web-access-fns";
+import {
+ SessionEndReason,
+ TerminalServerMessageType,
+ TSessionContext,
+ TSessionHandlerResult
+} from "../pam-web-access-types";
import {
createPostgresConnectionController,
type TPostgresConnectionController
@@ -14,14 +22,6 @@ import {
PostgresServerMessageType,
type TPostgresCorrelatedServerMessage
} from "./pam-postgres-ws-types";
-import { registerSessionHandler } from "../pam-session-handler-registry";
-import { parseClientMessage } from "../pam-web-access-fns";
-import {
- SessionEndReason,
- TerminalServerMessageType,
- TSessionContext,
- TSessionHandlerResult
-} from "../pam-web-access-types";
const MAX_CONNECTIONS_PER_WS = 20;
@@ -246,6 +246,6 @@ const handlePostgresSession = async (
};
registerSessionHandler(PamAccountType.Postgres, {
- gatewayResourceType: PamAccountType.Postgres,
+ gatewayAccountType: PamAccountType.Postgres,
handler: handlePostgresSession
});
diff --git a/backend/src/ee/services/pam-web-access/ssh/pam-ssh-session-handler.ts b/backend/src/ee/services/pam-web-access/ssh/pam-ssh-session-handler.ts
index 58939fea5e..c59842dab4 100644
--- a/backend/src/ee/services/pam-web-access/ssh/pam-ssh-session-handler.ts
+++ b/backend/src/ee/services/pam-web-access/ssh/pam-ssh-session-handler.ts
@@ -4,7 +4,6 @@ import { PamAccountType } from "@app/ee/services/pam/pam-enums";
import { logger } from "@app/lib/logger";
import { registerSessionHandler } from "../pam-session-handler-registry";
-import { SshClientMessageSchema, SshClientMessageType } from "./pam-ssh-ws-types";
import { parseClientMessage, resolveEndReason } from "../pam-web-access-fns";
import {
SessionEndReason,
@@ -12,6 +11,7 @@ import {
TSessionContext,
TSessionHandlerResult
} from "../pam-web-access-types";
+import { SshClientMessageSchema, SshClientMessageType } from "./pam-ssh-ws-types";
const handleSSHSession = async (
ctx: TSessionContext,
@@ -130,6 +130,6 @@ const handleSSHSession = async (
};
registerSessionHandler(PamAccountType.SSH, {
- gatewayResourceType: PamAccountType.SSH,
+ gatewayAccountType: PamAccountType.SSH,
handler: handleSSHSession
});