Components
- Infisical: Stores the account credentials, checks permissions and template policies, and stores session recordings
- Gateway: A service you deploy in your private network that connects to your databases and servers, adds the credentials, and records each session
- Relay: A server that passes the client’s connection to the Gateway over a tunnel that the Gateway opens outbound (Infisical runs relays for Infisical Cloud, or you can run your own)
- Client: The browser for web access, or the Infisical CLI, which opens an encrypted tunnel to the Gateway (for web access, Infisical opens the tunnel on the browser’s behalf, and an AI agent connects through the CLI)
- Actor: The user or machine identity that the session belongs to (Infisical checks the actor’s permissions and records the actor in the audit log)
A Gateway in direct listen mode accepts connections itself, so it doesn’t use a relay.
How a connection works
When an actor connects to an account, the connection goes through these steps:- The actor launches a session in the browser or runs a CLI command
- Infisical checks that the actor has a role that can launch sessions on the account
- Infisical applies the template’s policies, such as requiring a reason or MFA, and limiting the session’s duration
- If the account requires approval, Infisical checks that the actor has an approved access request
- The client opens an encrypted tunnel to the Gateway, through a relay or, in direct listen mode, straight to the Gateway
- The Gateway fetches the account’s credentials from Infisical and connects to the database or server with them
- The actor works with the database or server through the Gateway, which records the session
Network security
How the Gateway connects to Infisical depends on its connection mode:- Relay mode: The Gateway only makes outbound connections, so your firewall doesn’t need to allow any inbound traffic
- Direct listen mode: Infisical connects to the Gateway, so the Gateway accepts inbound traffic from the Infisical host on its listen address
Encryption
- Client to Gateway: An end-to-end encrypted tunnel, which the relay that routes it can’t decrypt
- Gateway to Infisical: TLS
- Session recordings: Encrypted by the Gateway before it uploads them
Recording
The Gateway records each session as the traffic passes through it:- The Gateway captures the session’s events, such as queries or terminal input and output
- The Gateway encrypts the events and saves them on its own disk
- The Gateway uploads the events while the session runs, so admins can watch active sessions
- If the Gateway loses its connection to Infisical, it keeps the events on disk and uploads them when the connection comes back
Deployment options
Each template sets the Gateway or Gateway pool for the accounts that use it, and you can override it on a single account. To deploy a Gateway, see Deploy a Gateway.