Skip to content

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

Merge branch 'main' into PAM-164

x0322052bb876af177d
diff --cc backend/src/@types/knex.d.ts
index ed37511e95,27f5c05471..5027da9c3d
--- a/backend/src/@types/knex.d.ts
+++ b/backend/src/@types/knex.d.ts
@@@ -1591,9 -1595,13 +1596,14 @@@ declare module "knex/types/tables"
TPamResourceFavoritesInsert,
TPamResourceFavoritesUpdate
>;
+ [TableName.PamDomain]: KnexOriginal.CompositeTableType<TPamDomains, TPamDomainsInsert, TPamDomainsUpdate>;
[TableName.PamAccount]: KnexOriginal.CompositeTableType<TPamAccounts, TPamAccountsInsert, TPamAccountsUpdate>;
[TableName.PamSession]: KnexOriginal.CompositeTableType<TPamSessions, TPamSessionsInsert, TPamSessionsUpdate>;
+ [TableName.PamSessionEventBatch]: KnexOriginal.CompositeTableType<
+ TPamSessionEventBatches,
+ TPamSessionEventBatchesInsert,
+ TPamSessionEventBatchesUpdate
+ >;
[TableName.PamDiscoverySource]: KnexOriginal.CompositeTableType<
TPamDiscoverySources,
TPamDiscoverySourcesInsert,
diff --cc frontend/src/pages/pam/PamAccountAccessPage/PamAccountAccessPage.tsx
index bc121fd236,6e6d9e635c..73dad528d0
--- a/frontend/src/pages/pam/PamAccountAccessPage/PamAccountAccessPage.tsx
+++ b/frontend/src/pages/pam/PamAccountAccessPage/PamAccountAccessPage.tsx
@@@ -23,13 -20,12 +20,12 @@@ const TerminalContent = (
const [sessionEnded, setSessionEnded] = useState(false);
const { containerRef, isConnected, disconnect, reconnect } = useWebAccessSession({
- accountId: accountId!,
- projectId: projectId!,
- orgId: orgId!,
+ accountId,
+ projectId,
+ orgId,
- resourceName: account?.resource.name ?? "",
+ resourceName: account?.resource?.name ?? "",
accountName: account?.name ?? "",
- resourceType: account?.resource.resourceType ?? "",
+ resourceType: account?.resource?.resourceType ?? "",
onSessionEnd: () => setSessionEnded(true)
});
@@@ -111,6 -107,35 +107,35 @@@
);
};
+ const PageContent = () => {
+ const params = useParams({
+ strict: false
+ }) as {
+ accountId?: string;
+ projectId?: string;
+ orgId?: string;
+ resourceType?: string;
+ resourceId?: string;
+ };
+
+ const { accountId, projectId, orgId } = params;
+ const { data: account, isPending } = useGetPamAccountById(accountId);
+
+ if (isPending) {
+ return (
+ <div className="flex h-screen w-screen items-center justify-center bg-[#0d1117] text-mineshaft-300">
+ Loading...
+ </div>
+ );
+ }
+
- if (account?.resource.resourceType === PamResourceType.Postgres) {
++ if (account?.resource?.resourceType === PamResourceType.Postgres) {
+ return <PamDataExplorerPage />;
+ }
+
+ return <TerminalContent accountId={accountId!} projectId={projectId!} orgId={orgId!} />;
+ };
+
export const PamAccountAccessPage = () => {
return (
<>
diff --cc frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
index 501c394f61,e0822d8c7a..d9f87b6ba0
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
@@@ -92,12 -90,10 +92,10 @@@ export const PamAccessAccountModal = (
if (!account) return null;
const showWebAccess =
- account.resource.resourceType === PamResourceType.Postgres ||
- account.resource.resourceType === PamResourceType.SSH ||
- account.resource.resourceType === PamResourceType.Redis;
+ account.resource?.resourceType === PamResourceType.Postgres ||
+ account.resource?.resourceType === PamResourceType.SSH ||
+ account.resource?.resourceType === PamResourceType.Redis;
- const showDataExplorer = account.resource?.resourceType === PamResourceType.Postgres;
-
return (
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
<ModalContent
diff --cc frontend/src/routeTree.gen.ts
index 5693e29fb5,814bb0af3b..cb7fe147b1
--- a/frontend/src/routeTree.gen.ts
+++ b/frontend/src/routeTree.gen.ts
@@@ -6435,10 -6249,8 +6417,9 @@@ export interface FileRoutesByTo
'/organizations/$orgId/projects/secret-management/$projectId/integrations/secret-syncs/$destination/$syncId': typeof secretManagerSecretSyncDetailsByIDPageRouteRoute
'/organizations/$orgId/projects/secret-management/$projectId/integrations/vercel/oauth2/callback': typeof secretManagerIntegrationsVercelOauthCallbackPageRouteRoute
'/organizations/$orgId/projects/pam/$projectId/resources/$resourceType/$resourceId/accounts/$accountId/access': typeof pamPamAccountAccessPageRouteRoute
- '/organizations/$orgId/projects/pam/$projectId/resources/$resourceType/$resourceId/accounts/$accountId/data-explorer': typeof pamPamDataExplorerPageRouteRoute
'/organizations/$orgId/projects/secret-management/$projectId/commits/$environment/$folderId/$commitId': typeof secretManagerCommitDetailsPageRouteRoute
'/organizations/$orgId/projects/secret-management/$projectId/commits/$environment/$folderId/$commitId/restore': typeof secretManagerCommitDetailsPageComponentsRollbackPreviewTabRouteRoute
+ '/organizations/$orgId/projects/pam/$projectId/domains/$domainType/$domainId/accounts/$accountId': typeof pamPamDomainAccountByIDPageRouteRoute
'/organizations/$orgId/projects/pam/$projectId/resources/$resourceType/$resourceId/accounts/$accountId': typeof pamPamAccountByIDPageRouteRoute
}
@@@ -7262,10 -7058,8 +7241,9 @@@ export interface FileRouteTypes
| '/organizations/$orgId/projects/secret-management/$projectId/integrations/secret-syncs/$destination/$syncId'
| '/organizations/$orgId/projects/secret-management/$projectId/integrations/vercel/oauth2/callback'
| '/organizations/$orgId/projects/pam/$projectId/resources/$resourceType/$resourceId/accounts/$accountId/access'
- | '/organizations/$orgId/projects/pam/$projectId/resources/$resourceType/$resourceId/accounts/$accountId/data-explorer'
| '/organizations/$orgId/projects/secret-management/$projectId/commits/$environment/$folderId/$commitId'
| '/organizations/$orgId/projects/secret-management/$projectId/commits/$environment/$folderId/$commitId/restore'
+ | '/organizations/$orgId/projects/pam/$projectId/domains/$domainType/$domainId/accounts/$accountId'
| '/organizations/$orgId/projects/pam/$projectId/resources/$resourceType/$resourceId/accounts/$accountId'
id:
| '__root__'