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 branch 'main' into PAM-164
x032205797845c7e7a5
diff --cc backend/src/ee/services/pam-account/pam-account-fns.tsindex 98800ea8ef,c0e4fd90df..493b501436--- a/backend/src/ee/services/pam-account/pam-account-fns.ts+++ b/backend/src/ee/services/pam-account/pam-account-fns.ts@@@ -107,11 -70,16 +108,16 @@@ export const decryptAccountMessage = as};// Returns false for account types where all credential fields are already visible in the sanitized view-export const hasSensitiveCredentials = (resourceType: string, credentials: TPamAccountCredentials): boolean => {- if (resourceType === PamResource.AwsIam) return false;+export const hasSensitiveCredentials = (parentType: string, credentials: TPamAccountCredentials): boolean => {+ if (parentType === PamResource.AwsIam) return false;- if (parentType === PamResource.Kubernetes) return false;+ if (- resourceType === PamResource.Kubernetes &&++ parentType === PamResource.Kubernetes &&+ "authMethod" in credentials &&+ credentials.authMethod === KubernetesAuthMethod.GatewayKubernetesAuth+ )+ return false;if (- resourceType === PamResource.SSH &&+ parentType === PamResource.SSH &&"authMethod" in credentials &&credentials.authMethod === SSHAuthMethod.Certificate)diff --cc frontend/src/pages/pam/PamAccountByIDPage/components/PamAccountCredentialsSection.tsxindex d61f76b4ff,d426c0ec28..a8e9a14fcd--- a/frontend/src/pages/pam/PamAccountByIDPage/components/PamAccountCredentialsSection.tsx+++ b/frontend/src/pages/pam/PamAccountByIDPage/components/PamAccountCredentialsSection.tsx@@@ -13,7 -13,14 +13,13 @@@ importimport { ProjectPermissionSub } from "@app/context";import { ProjectPermissionPamAccountActions } from "@app/context/ProjectPermissionContext/types";import { useTimedReset } from "@app/hooks";- import { PamResourceType, TPamAccount, TWindowsAccount } from "@app/hooks/api/pam";+ import {+ KubernetesAuthMethod,+ PamResourceType,- TActiveDirectoryAccount,+ TKubernetesCredentials,+ TPamAccount,+ TWindowsAccount+ } from "@app/hooks/api/pam";import { TPamAccountCredentialsResponse } from "@app/hooks/api/pam/queries";import { TAwsIamCredentials } from "@app/hooks/api/pam/types/aws-iam-resource";import { TBaseSqlCredentials } from "@app/hooks/api/pam/types/shared/sql-resource";@@@ -103,21 -109,21 +109,35 @@@ const ActiveDirectoryCredentialsConten);};+ const KubernetesCredentialsContent = ({ credentials }: { credentials: TKubernetesCredentials }) => {+ if (credentials.authMethod === KubernetesAuthMethod.GatewayKubernetesAuth) {+ return (+ <>+ <CopyableField label="Namespace" value={credentials.namespace} />+ <CopyableField label="Service Account Name" value={credentials.serviceAccountName} />+ </>+ );+ }++ // ServiceAccountToken: no non-sensitive fields (token is behind the reveal gate)+ return null;+ };+const CredentialsContent = ({ account }: { account: TPamAccount }) => {+ if (account.domain) {+ switch (account.domain.domainType) {+ case "active-directory":+ return (+ <ActiveDirectoryCredentialsContent+ account={account as unknown as TActiveDirectoryAccount}+ />+ );+ default:+ return null;+ }+ }++ if (!account.resource) return null;const { resourceType } = account.resource;switch (resourceType) {@@@ -133,6 -139,12 +153,10 @@@return <AwsIamCredentialsContent credentials={account.credentials as TAwsIamCredentials} />;case PamResourceType.Windows:return <WindowsCredentialsContent account={account as TWindowsAccount} />;- case PamResourceType.ActiveDirectory:- return <ActiveDirectoryCredentialsContent account={account as TActiveDirectoryAccount} />;+ case PamResourceType.Kubernetes:+ return (+ <KubernetesCredentialsContent credentials={account.credentials as TKubernetesCredentials} />+ );default:return null;}