docs/documentation/platform/pam/architecture.mdx
Infisical PAM utilizes a secure, proxy-based architecture designed to provide access to private resources without exposing them directly to the internet. This system relies on a combination of the Infisical CLI, a Relay server, and a self-hosted Gateway. For more information on Gateways, refer to the Gateway Overview.
The architecture consists of three main components working in unison:
<Steps> <Step title="Infisical CLI"> The client-side interface used to initiate access requests. It creates a local listener that forwards traffic securely to the Gateway. </Step> <Step title="Infisical Gateway"> A lightweight service deployed within your private network (e.g., VPC, on-prem). It acts as a proxy, intercepting traffic to enforce policies and record sessions before forwarding requests to the target resource. </Step> <Step title="Target Resource"> The actual infrastructure being accessed, such as a PostgreSQL database, a Linux server, or a web application. </Step> </Steps>graph LR
subgraph Client ["User Environment"]
CLI["Infisical CLI"]
end
Relay["Relay Server"]
subgraph Network ["Private Network (VPC)"]
Gateway["Infisical Gateway"]
DB[("Target Resource (Database/Server)")]
end
CLI <-->|Encrypted Tunnel| Relay
Relay <-->|Reverse Tunnel| Gateway
Gateway <-->|Native Protocol| DB
When a user accesses a resource (e.g., via infisical access), the following workflow occurs:
A key feature of the Gateway is its ability to act as a "middleman" for all session traffic.
The PAM security model allows you to maintain a zero-trust environment while enabling convenient access.
The connection between the Infisical CLI (client) and the Gateway is end-to-end encrypted. The Relay server acts solely as a router for encrypted packets and cannot decrypt or inspect the traffic passing through it.
The Gateway uses SSH reverse tunnels to connect to the Relay. This design offers significant security benefits:
For a deep dive into the underlying cryptography, certificate management, and isolation guarantees, refer to the Gateway Security Architecture.
For instructions on setting up the necessary infrastructure, see the Gateway Deployment Guide.