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 PAM-12-add-k8s-for-pam
Sheen Capadngan178989d4a38d
diff --cc backend/src/ee/routes/v1/pam-account-routers/index.tsindex 61a29970e3,6b6a4cbed6..9c7cf161d6--- a/backend/src/ee/routes/v1/pam-account-routers/index.ts+++ b/backend/src/ee/routes/v1/pam-account-routers/index.ts@@@ -1,8 -1,8 +1,13 @@@+ import {+ CreateAwsIamAccountSchema,+ SanitizedAwsIamAccountWithResourceSchema,+ UpdateAwsIamAccountSchema+ } from "@app/ee/services/pam-resource/aws-iam/aws-iam-resource-schemas";+import {+ CreateKubernetesAccountSchema,+ SanitizedKubernetesAccountWithResourceSchema,+ UpdateKubernetesAccountSchema+} from "@app/ee/services/pam-resource/kubernetes/kubernetes-resource-schemas";import {CreateMySQLAccountSchema,SanitizedMySQLAccountWithResourceSchema,@@@ -50,13 -50,13 +55,22 @@@ export const PAM_ACCOUNT_REGISTER_ROUTEupdateAccountSchema: UpdateSSHAccountSchema});},+ [PamResource.Kubernetes]: async (server: FastifyZodProvider) => {+ registerPamResourceEndpoints({+ server,+ resourceType: PamResource.Kubernetes,+ accountResponseSchema: SanitizedKubernetesAccountWithResourceSchema,+ createAccountSchema: CreateKubernetesAccountSchema,+ updateAccountSchema: UpdateKubernetesAccountSchema+ });++ },+ [PamResource.AwsIam]: async (server: FastifyZodProvider) => {+ registerPamResourceEndpoints({+ server,+ resourceType: PamResource.AwsIam,+ accountResponseSchema: SanitizedAwsIamAccountWithResourceSchema,+ createAccountSchema: CreateAwsIamAccountSchema,+ updateAccountSchema: UpdateAwsIamAccountSchema+ });}};diff --cc backend/src/ee/routes/v1/pam-account-routers/pam-account-router.tsindex f6d6c1cf77,0c78b64491..d36702cb75--- a/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts+++ b/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts@@@ -3,9 -3,10 +3,11 @@@ import { z } from "zod"import { PamFoldersSchema } from "@app/db/schemas";import { EventType } from "@app/ee/services/audit-log/audit-log-types";import { PamAccountOrderBy, PamAccountView } from "@app/ee/services/pam-account/pam-account-enums";+ import { SanitizedAwsIamAccountWithResourceSchema } from "@app/ee/services/pam-resource/aws-iam/aws-iam-resource-schemas";+import { SanitizedKubernetesAccountWithResourceSchema } from "@app/ee/services/pam-resource/kubernetes/kubernetes-resource-schemas";import { SanitizedMySQLAccountWithResourceSchema } from "@app/ee/services/pam-resource/mysql/mysql-resource-schemas";import { PamResource } from "@app/ee/services/pam-resource/pam-resource-enums";+ import { GatewayAccessResponseSchema } from "@app/ee/services/pam-resource/pam-resource-schemas";import { SanitizedPostgresAccountWithResourceSchema } from "@app/ee/services/pam-resource/postgres/postgres-resource-schemas";import { SanitizedSSHAccountWithResourceSchema } from "@app/ee/services/pam-resource/ssh/ssh-resource-schemas";import { BadRequestError } from "@app/lib/errors";@@@ -20,16 -21,10 +22,17 @@@ const SanitizedAccountSchema = z.union(SanitizedSSHAccountWithResourceSchema, // ORDER MATTERSSanitizedPostgresAccountWithResourceSchema,SanitizedMySQLAccountWithResourceSchema,- SanitizedKubernetesAccountWithResourceSchema++ SanitizedKubernetesAccountWithResourceSchema,+ SanitizedAwsIamAccountWithResourceSchema]);-type TSanitizedAccount = z.infer<typeof SanitizedAccountSchema>;+const ListPamAccountsResponseSchema = z.object({+ accounts: SanitizedAccountSchema.array(),+ folders: PamFoldersSchema.array(),+ totalCount: z.number().default(0),+ folderId: z.string().optional(),+ folderPaths: z.record(z.string(), z.string())+});export const registerPamAccountRouter = async (server: FastifyZodProvider) => {server.route({diff --cc backend/src/ee/routes/v1/pam-resource-routers/index.tsindex e26cc5f708,fcd9840b4a..e3c9cf60c5--- a/backend/src/ee/routes/v1/pam-resource-routers/index.ts+++ b/backend/src/ee/routes/v1/pam-resource-routers/index.ts@@@ -1,8 -1,8 +1,13 @@@+ import {+ CreateAwsIamResourceSchema,+ SanitizedAwsIamResourceSchema,+ UpdateAwsIamResourceSchema+ } from "@app/ee/services/pam-resource/aws-iam/aws-iam-resource-schemas";+import {+ CreateKubernetesResourceSchema,+ SanitizedKubernetesResourceSchema,+ UpdateKubernetesResourceSchema+} from "@app/ee/services/pam-resource/kubernetes/kubernetes-resource-schemas";import {CreateMySQLResourceSchema,MySQLResourceSchema,@@@ -50,13 -50,13 +55,22 @@@ export const PAM_RESOURCE_REGISTER_ROUTupdateResourceSchema: UpdateSSHResourceSchema});},+ [PamResource.Kubernetes]: async (server: FastifyZodProvider) => {+ registerPamResourceEndpoints({+ server,+ resourceType: PamResource.Kubernetes,+ resourceResponseSchema: SanitizedKubernetesResourceSchema,+ createResourceSchema: CreateKubernetesResourceSchema,+ updateResourceSchema: UpdateKubernetesResourceSchema+ });++ },+ [PamResource.AwsIam]: async (server: FastifyZodProvider) => {+ registerPamResourceEndpoints({+ server,+ resourceType: PamResource.AwsIam,+ resourceResponseSchema: SanitizedAwsIamResourceSchema,+ createResourceSchema: CreateAwsIamResourceSchema,+ updateResourceSchema: UpdateAwsIamResourceSchema+ });}};diff --cc backend/src/ee/routes/v1/pam-resource-routers/pam-resource-router.tsindex 2c97312b43,b6a7532edd..8e4326f3f1--- a/backend/src/ee/routes/v1/pam-resource-routers/pam-resource-router.ts+++ b/backend/src/ee/routes/v1/pam-resource-routers/pam-resource-router.ts@@@ -1,10 -1,10 +1,14 @@@import { z } from "zod";import { EventType } from "@app/ee/services/audit-log/audit-log-types";+ import {+ AwsIamResourceListItemSchema,+ SanitizedAwsIamResourceSchema+ } from "@app/ee/services/pam-resource/aws-iam/aws-iam-resource-schemas";+import {+ KubernetesResourceListItemSchema,+ SanitizedKubernetesResourceSchema+} from "@app/ee/services/pam-resource/kubernetes/kubernetes-resource-schemas";import {MySQLResourceListItemSchema,SanitizedMySQLResourceSchema@@@ -27,14 -27,14 +31,16 @@@ const SanitizedResourceSchema = z.unionSanitizedPostgresResourceSchema,SanitizedMySQLResourceSchema,SanitizedSSHResourceSchema,- SanitizedKubernetesResourceSchema++ SanitizedKubernetesResourceSchema,+ SanitizedAwsIamResourceSchema]);const ResourceOptionsSchema = z.discriminatedUnion("resource", [PostgresResourceListItemSchema,MySQLResourceListItemSchema,SSHResourceListItemSchema,- KubernetesResourceListItemSchema++ KubernetesResourceListItemSchema,+ AwsIamResourceListItemSchema]);export const registerPamResourceRouter = async (server: FastifyZodProvider) => {diff --cc backend/src/ee/services/pam-account/pam-account-service.tsindex 565507d08a,c3baeff0c4..f901aee076--- a/backend/src/ee/services/pam-account/pam-account-service.ts+++ b/backend/src/ee/services/pam-account/pam-account-service.ts@@@ -565,27 -685,10 +685,26 @@@ export const pamAccountServiceFactoryexpiresAt: new Date(Date.now() + duration)});- const { connectionDetails, gatewayId, resourceType } = await decryptResource(resource, projectId, kmsService);-- const user = await userDAL.findById(actor.id);- if (!user) throw new NotFoundError({ message: `User with ID '${actor.id}' not found` });+ if (!gatewayId) {+ throw new BadRequestError({ message: "Gateway ID is required for this resource type" });+ }+ const { host, port } =+ resourceType !== PamResource.Kubernetes+ ? connectionDetails+ : (() => {+ const url = new URL(connectionDetails.url);+ let portNumber: number | undefined;+ if (url.port) {+ portNumber = Number(url.port);+ } else {+ portNumber = url.protocol === "https:" ? 443 : 80;+ }+ return {+ host: url.hostname,+ port: portNumber+ };+ })();const gatewayConnectionDetails = await gatewayV2Service.getPAMConnectionDetails({gatewayId,duration,@@@ -620,10 -723,10 +739,10 @@@encryptedCredentials: account.encryptedCredentials,kmsService,projectId- });+ })) as TSqlAccountCredentials;metadata = {- username: credentials.username,+ username: (credentials as TSqlAccountCredentials).username,database: connectionCredentials.database,accountName: account.name,accountPath: folderPath@@@ -636,10 -739,10 +755,10 @@@encryptedCredentials: account.encryptedCredentials,kmsService,projectId- });+ })) as TSSHAccountCredentials;metadata = {- username: credentials.username+ username: (credentials as TSSHAccountCredentials).username};}break;diff --cc backend/src/ee/services/pam-resource/pam-resource-enums.tsindex f9b5ab4bf1,bea1667fbe..c8c57b03b2--- a/backend/src/ee/services/pam-resource/pam-resource-enums.ts+++ b/backend/src/ee/services/pam-resource/pam-resource-enums.ts@@@ -2,7 -2,7 +2,8 @@@ export enum PamResourcePostgres = "postgres",MySQL = "mysql",SSH = "ssh",- Kubernetes = "kubernetes"++ Kubernetes = "kubernetes",+ AwsIam = "aws-iam"}export enum PamResourceOrderBy {diff --cc backend/src/ee/services/pam-resource/pam-resource-factory.tsindex 9fee549e16,1d1a84f339..bf8d13d664--- a/backend/src/ee/services/pam-resource/pam-resource-factory.ts+++ b/backend/src/ee/services/pam-resource/pam-resource-factory.ts@@@ -1,6 -1,6 +1,7 @@@+ import { awsIamResourceFactory } from "./aws-iam/aws-iam-resource-factory";++import { kubernetesResourceFactory } from "./kubernetes/kubernetes-resource-factory";import { PamResource } from "./pam-resource-enums";import { TPamAccountCredentials, TPamResourceConnectionDetails, TPamResourceFactory } from "./pam-resource-types";- import { kubernetesResourceFactory } from "./kubernetes/kubernetes-resource-factory";import { sqlResourceFactory } from "./shared/sql/sql-resource-factory";import { sshResourceFactory } from "./ssh/ssh-resource-factory";@@@ -10,5 -10,5 +11,6 @@@ export const PAM_RESOURCE_FACTORY_MAP:[PamResource.Postgres]: sqlResourceFactory as TPamResourceFactoryImplementation,[PamResource.MySQL]: sqlResourceFactory as TPamResourceFactoryImplementation,[PamResource.SSH]: sshResourceFactory as TPamResourceFactoryImplementation,- [PamResource.Kubernetes]: kubernetesResourceFactory as TPamResourceFactoryImplementation++ [PamResource.Kubernetes]: kubernetesResourceFactory as TPamResourceFactoryImplementation,+ [PamResource.AwsIam]: awsIamResourceFactory as TPamResourceFactoryImplementation};diff --cc backend/src/ee/services/pam-resource/pam-resource-fns.tsindex 0b5e817060,a90743a125..581f3425ac--- a/backend/src/ee/services/pam-resource/pam-resource-fns.ts+++ b/backend/src/ee/services/pam-resource/pam-resource-fns.ts@@@ -3,15 -3,15 +3,19 @@@ import { TKmsServiceFactory } from "@apimport { KmsDataKey } from "@app/services/kms/kms-types";import { decryptAccountCredentials } from "../pam-account/pam-account-fns";+ import { getAwsIamResourceListItem } from "./aws-iam/aws-iam-resource-fns";+import { getKubernetesResourceListItem } from "./kubernetes/kubernetes-resource-fns";import { getMySQLResourceListItem } from "./mysql/mysql-resource-fns";import { TPamResource, TPamResourceConnectionDetails } from "./pam-resource-types";import { getPostgresResourceListItem } from "./postgres/postgres-resource-fns";export const listResourceOptions = () => {- return [getPostgresResourceListItem(), getMySQLResourceListItem(), getKubernetesResourceListItem()].sort((a, b) =>- return [getPostgresResourceListItem(), getMySQLResourceListItem(), getAwsIamResourceListItem()].sort((a, b) =>-- a.name.localeCompare(b.name)-- );++ return [++ getPostgresResourceListItem(),++ getMySQLResourceListItem(),++ getAwsIamResourceListItem(),++ getKubernetesResourceListItem()++ ].sort((a, b) => a.name.localeCompare(b.name));};// Resourcediff --cc backend/src/ee/services/pam-resource/pam-resource-types.tsindex 99c9030d8b,2a27fb76e2..5291e044ac--- a/backend/src/ee/services/pam-resource/pam-resource-types.ts+++ b/backend/src/ee/services/pam-resource/pam-resource-types.ts@@@ -1,12 -1,12 +1,18 @@@import { OrderByDirection, TProjectPermission } from "@app/lib/types";import { TGatewayV2ServiceFactory } from "../gateway-v2/gateway-v2-service";+ import {+ TAwsIamAccount,+ TAwsIamAccountCredentials,+ TAwsIamResource,+ TAwsIamResourceConnectionDetails+ } from "./aws-iam/aws-iam-resource-types";+import {+ TKubernetesAccount,+ TKubernetesAccountCredentials,+ TKubernetesResource,+ TKubernetesResourceConnectionDetails+} from "./kubernetes/kubernetes-resource-types";import {TMySQLAccount,TMySQLAccountCredentials,@@@ -28,27 -28,28 +34,30 @@@ import} from "./ssh/ssh-resource-types";// Resource types- export type TPamResource = TPostgresResource | TMySQLResource | TSSHResource | TKubernetesResource;-export type TPamResource = TPostgresResource | TMySQLResource | TSSHResource | TAwsIamResource;++export type TPamResource = TPostgresResource | TMySQLResource | TSSHResource | TAwsIamResource | TKubernetesResource;export type TPamResourceConnectionDetails =| TPostgresResourceConnectionDetails| TMySQLResourceConnectionDetails| TSSHResourceConnectionDetails- | TKubernetesResourceConnectionDetails;++ | TKubernetesResourceConnectionDetails+ | TAwsIamResourceConnectionDetails;// Account types- export type TPamAccount = TPostgresAccount | TMySQLAccount | TSSHAccount | TKubernetesAccount;-export type TPamAccount = TPostgresAccount | TMySQLAccount | TSSHAccount | TAwsIamAccount;++export type TPamAccount = TPostgresAccount | TMySQLAccount | TSSHAccount | TAwsIamAccount | TKubernetesAccount;+export type TPamAccountCredentials =| TPostgresAccountCredentials// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents| TMySQLAccountCredentials| TSSHAccountCredentials- | TKubernetesAccountCredentials;++ | TKubernetesAccountCredentials+ | TAwsIamAccountCredentials;// Resource DTOs- export type TCreateResourceDTO = Pick<- TPamResource,- "name" | "connectionDetails" | "resourceType" | "gatewayId" | "projectId" | "rotationAccountCredentials"- >;+ export type TCreateResourceDTO = Pick<TPamResource, "name" | "connectionDetails" | "resourceType" | "projectId"> & {+ gatewayId?: string | null;+ rotationAccountCredentials?: TPamAccountCredentials | null;+ };export type TUpdateResourceDTO = Partial<Omit<TCreateResourceDTO, "resourceType" | "projectId">> & {resourceId: string;diff --cc frontend/src/hooks/api/pam/types/index.tsindex 255aaf834c,878a35aa10..332c985a95--- a/frontend/src/hooks/api/pam/types/index.ts+++ b/frontend/src/hooks/api/pam/types/index.ts@@@ -6,19 -6,19 +6,31 @@@ importPamResourceType,PamSessionStatus} from "../enums";+ import { TAwsIamAccount, TAwsIamResource } from "./aws-iam-resource";+import { TKubernetesAccount, TKubernetesResource } from "./kubernetes-resource";import { TMySQLAccount, TMySQLResource } from "./mysql-resource";import { TPostgresAccount, TPostgresResource } from "./postgres-resource";import { TSSHAccount, TSSHResource } from "./ssh-resource";+ export * from "./aws-iam-resource";+export * from "./kubernetes-resource";export * from "./mysql-resource";export * from "./postgres-resource";export * from "./ssh-resource";- export type TPamResource = TPostgresResource | TMySQLResource | TSSHResource | TKubernetesResource;-export type TPamResource = TPostgresResource | TMySQLResource | TSSHResource | TAwsIamResource;++export type TPamResource =++ | TPostgresResource++ | TMySQLResource++ | TSSHResource++ | TAwsIamResource++ | TKubernetesResource;- export type TPamAccount = TPostgresAccount | TMySQLAccount | TSSHAccount | TKubernetesAccount;-export type TPamAccount = TPostgresAccount | TMySQLAccount | TSSHAccount | TAwsIamAccount;++export type TPamAccount =++ | TPostgresAccount++ | TMySQLAccount++ | TSSHAccount++ | TAwsIamAccount++ | TKubernetesAccount;export type TPamFolder = {id: string;diff --cc frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/PamAccountForm.tsxindex 8c93d2dd52,d146424836..641e5fe82f--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/PamAccountForm.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/PamAccountForm.tsx@@@ -8,7 -8,7 +8,8 @@@ importimport { DiscriminativePick } from "@app/types";import { PamAccountHeader } from "../PamAccountHeader";+ import { AwsIamAccountForm } from "./AwsIamAccountForm";+import { KubernetesAccountForm } from "./KubernetesAccountForm";import { MySQLAccountForm } from "./MySQLAccountForm";import { PostgresAccountForm } from "./PostgresAccountForm";import { SshAccountForm } from "./SshAccountForm";@@@ -71,14 -71,14 +72,22 @@@ const CreateForm = (return (<SshAccountForm onSubmit={onSubmit} resourceId={resourceId} resourceType={resourceType} />);+ case PamResourceType.Kubernetes:+ return (+ <KubernetesAccountForm+ onSubmit={onSubmit}+ resourceId={resourceId}+ resourceType={resourceType}+ />+ );+ case PamResourceType.AwsIam:+ return (+ <AwsIamAccountForm+ onSubmit={onSubmit}+ resourceId={resourceId}+ resourceType={resourceType}+ />+ );default:throw new Error(`Unhandled resource: ${resourceType}`);}@@@ -109,8 -109,8 +118,10 @@@ const UpdateForm = ({ account, onComplereturn <MySQLAccountForm account={account as any} onSubmit={onSubmit} />;case PamResourceType.SSH:return <SshAccountForm account={account as any} onSubmit={onSubmit} />;+ case PamResourceType.Kubernetes:+ return <KubernetesAccountForm account={account as any} onSubmit={onSubmit} />;+ case PamResourceType.AwsIam:+ return <AwsIamAccountForm account={account as any} onSubmit={onSubmit} />;default:throw new Error(`Unhandled resource: ${account.resource.resourceType}`);}diff --cc frontend/src/pages/pam/PamResourcesPage/components/PamResourceForm/PamResourceForm.tsxindex abc23bde3f,f15e28f857..e3750e9321--- a/frontend/src/pages/pam/PamResourcesPage/components/PamResourceForm/PamResourceForm.tsx+++ b/frontend/src/pages/pam/PamResourcesPage/components/PamResourceForm/PamResourceForm.tsx@@@ -9,7 -9,7 +9,8 @@@ importimport { DiscriminativePick } from "@app/types";import { PamResourceHeader } from "../PamResourceHeader";+ import { AwsIamResourceForm } from "./AwsIamResourceForm";+import { KubernetesResourceForm } from "./KubernetesResourceForm";import { MySQLResourceForm } from "./MySQLResourceForm";import { PostgresResourceForm } from "./PostgresResourceForm";import { SSHResourceForm } from "./SSHResourceForm";@@@ -55,8 -55,8 +56,10 @@@ const CreateForm = ({ resourceType, onCreturn <MySQLResourceForm onSubmit={onSubmit} />;case PamResourceType.SSH:return <SSHResourceForm onSubmit={onSubmit} />;+ case PamResourceType.Kubernetes:+ return <KubernetesResourceForm onSubmit={onSubmit} />;+ case PamResourceType.AwsIam:+ return <AwsIamResourceForm onSubmit={onSubmit} />;default:throw new Error(`Unhandled resource: ${resourceType}`);}@@@ -87,8 -87,8 +90,10 @@@ const UpdateForm = ({ resource, onComplreturn <MySQLResourceForm resource={resource} onSubmit={onSubmit} />;case PamResourceType.SSH:return <SSHResourceForm resource={resource} onSubmit={onSubmit} />;+ case PamResourceType.Kubernetes:+ return <KubernetesResourceForm resource={resource} onSubmit={onSubmit} />;+ case PamResourceType.AwsIam:+ return <AwsIamResourceForm resource={resource} onSubmit={onSubmit} />;default:throw new Error(`Unhandled resource: ${(resource as any).resourceType}`);}diff --cc frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsxindex e0c6315512,f655377436..d9ce839415--- a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx+++ b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx@@@ -1,13 -1,9 +1,16 @@@+ import { faUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+-import { PamResourceType, TPamCommandLog, TPamSession, TTerminalEvent } from "@app/hooks/api/pam";+import {+ PamResourceType,+ THttpEvent,+ TPamCommandLog,+ TPamSession,+ TTerminalEvent+} from "@app/hooks/api/pam";import { CommandLogView } from "./CommandLogView";+import { HttpEventView } from "./HttpEventView";import { TerminalEventView } from "./TerminalEventView";type Props = {@@@ -20,23 -16,42 +23,44 @@@ export const PamSessionLogsSection = (const isDatabaseSession =session.resourceType === PamResourceType.Postgres ||session.resourceType === PamResourceType.MySQL;+ const isHttpSession = session.resourceType === PamResourceType.Kubernetes;+ const isAwsIamSession = session.resourceType === PamResourceType.AwsIam;const hasLogs = session.logs.length > 0;return (-- <div className="flex h-full w-full flex-col gap-4 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">-- <div className="flex items-center border-b border-mineshaft-400 pb-4">-- <h3 className="text-lg font-medium text-mineshaft-100">Session Logs</h3>++ <div className="border-mineshaft-600 bg-mineshaft-900 flex h-full w-full flex-col gap-4 rounded-lg border p-4">++ <div className="border-mineshaft-400 flex items-center border-b pb-4">++ <h3 className="text-mineshaft-100 text-lg font-medium">Session Logs</h3></div>{isDatabaseSession && hasLogs && <CommandLogView logs={session.logs as TPamCommandLog[]} />}{isSSHSession && hasLogs && <TerminalEventView events={session.logs as TTerminalEvent[]} />}+ {isHttpSession && hasLogs && <HttpEventView events={session.logs as THttpEvent[]} />}+ {isAwsIamSession && (- <div className="flex grow items-center justify-center text-bunker-300">++ <div className="text-bunker-300 flex grow items-center justify-center">+ <div className="text-center">+ <div className="mb-2">AWS Console session activity is logged in AWS CloudTrail</div>- <div className="text-xs text-bunker-400">++ <div className="text-bunker-400 text-xs">+ View detailed activity logs for this session in your AWS CloudTrail console.+ <br />+ <a+ href="https://console.aws.amazon.com/cloudtrail"+ target="_blank"+ rel="noopener noreferrer"- className="mt-2 inline-flex items-center gap-1 text-primary-400 hover:text-primary-300"++ className="text-primary-400 hover:text-primary-300 mt-2 inline-flex items-center gap-1"+ >+ Open AWS CloudTrail+ <FontAwesomeIcon icon={faUpRightFromSquare} className="size-3" />+ </a>+ </div>+ </div>+ </div>+ )}- {!hasLogs && !isAwsIamSession && (- <div className="flex grow items-center justify-center text-bunker-300">+ {!hasLogs && (- <div className="flex grow items-center justify-center text-bunker-300">++ <div className="text-bunker-300 flex grow items-center justify-center"><div className="text-center"><div className="mb-2">Session logs are not yet available</div>-- <div className="text-xs text-bunker-400">++ <div className="text-bunker-400 text-xs">Logs will be uploaded after the session duration has elapsed.<br />If logs do not appear after some time, please contact your Gateway administrators.