How It Works
Redis access in Infisical PAM uses an Infisical Gateway to securely proxy connections to your Redis server. When a user requests access, Infisical establishes a secure tunnel through the Gateway, enabling secure access without exposing your Redis instance directly.Key Concepts
- Gateway: An Infisical Gateway deployed in your network that can reach the Redis server. The Gateway handles secure communication between users and your Redis instance.
- Authentication: Redis supports username/password authentication (ACL). Credentials are stored securely in Infisical and used by the Gateway to authenticate with Redis.
- Local Proxy: The Infisical CLI starts a local proxy on your machine that intercepts Redis commands and routes them securely through the Gateway to your Redis instance.
- Session Tracking: All access sessions are logged, including when the session was created, who accessed the Redis instance, session duration, and when it ended.
Session Tracking
Infisical tracks:- When the session was created
- Who accessed which Redis instance
- Session duration
- All Redis commands executed during the session
- When the session ended
Session Logs: After ending a session (by stopping the proxy), you can view
detailed session logs in the Sessions page, including all commands executed
during the session.
Prerequisites
Before configuring Redis access in Infisical PAM, you need:- Infisical Gateway - A Gateway deployed in your network with access to the Redis server
- Redis Credentials - Username and password (if Redis ACL is enabled) or access to an unauthenticated Redis instance
- Infisical CLI - The Infisical CLI installed on user machines
Create the PAM Resource
The PAM Resource represents the connection between Infisical and your Redis instance.1
Ensure Gateway is Running
Before creating the resource, ensure you have an Infisical Gateway running and registered with your Infisical instance. The Gateway must have network access to your Redis server.
2
Create the Resource in Infisical
- Navigate to your PAM project and go to the Resources tab
- Click Add Resource and select Redis
- Enter a name for the resource (e.g.,
production-redis,staging-cache) - Enter the Host - the hostname or IP address of your Redis server (e.g.,
redis.example.comor192.168.1.100) - Enter the Port - the Redis port (default:
6379) - Select the Gateway that has access to this Redis instance
- Configure SSL/TLS options if needed:
- SSL Enabled: Enable if your Redis instance uses TLS/SSL
- SSL Reject Unauthorized: Enable to verify SSL certificates (recommended for production)
- SSL Certificate: Optional CA certificate for custom certificate authorities
SSL Configuration: If your Redis instance uses TLS/SSL, enable SSL and configure certificate validation. For self-signed certificates, you may need to provide the CA certificate or disable certificate validation (not recommended for production).
Create PAM Accounts
Once you have configured the PAM resource, you’ll need to configure a PAM account for your Redis resource. A PAM Account represents a specific set of credentials that users can request access to. You can create multiple accounts per resource, each with different permission levels.1
Navigate to Accounts
Go to the Accounts tab in your PAM project.
2
Add New Account
Click Add Account and select the Redis resource you created.
3
Fill in Account Details
Fill in the account details:
A friendly name for this account (e.g.,
readonly-user, admin-access)Toggle this on if your Redis instance requires authentication. When enabled, you’ll need to provide a username and password.
Leave it as disabled if your Redis instance doesn’t require authentication.
The Redis username (required if Use Credentials is enabled).
The Redis password (required if Use Credentials is enabled).
Access Redis Instance
Once your resource and accounts are configured, users can request access through the Infisical CLI:1
Get the Access Command
- Navigate to the Accounts tab in your PAM project
- Find the Redis account you want to access
- Click the Access button
- Copy the provided CLI command
2
Run the Access Command
Run the copied command in your terminal.The CLI will:
- Authenticate with Infisical
- Establish a secure connection through the Gateway
- Start a local proxy on your machine
- Provide connection details for your Redis client
3
Connect to Redis
Once the proxy is running, you can connect to Redis using your preferred Redis client. The proxy will be available on All commands are routed securely through the Infisical Gateway to your Redis instance.
localhost with the URL shown in the CLI output.Using redis-cli:4
End the Session
When you’re done, stop the proxy by pressing
Ctrl+C in the terminal where it’s running. This will:- Close the secure tunnel
- End the session
- Log the session details to Infisical