Security Overview
Private Connect is designed with security as a core principle. This page explains what the Hub sees, how data is encrypted, and what threats the system protects against.Encryption
TLS 1.2+ for all connections, opaque payload relay
Workspace Isolation
Database-level RLS, multi-layer isolation guarantees
Audit Logging
Complete audit trail of all agent actions and access
Token Security
256-bit tokens, SHA-256 hashing, automatic expiry
What the Hub Sees
Understanding what the Hub can and cannot see is critical for evaluating the security model.| Data | Visibility | Notes |
|---|---|---|
| Agent identity | ✓ Visible | Agent ID, label, workspace |
| Service names | ✓ Visible | e.g., “prod-db”, “redis” |
| Target host:port | ✓ Visible | e.g., “localhost:5432” |
| Connection metadata | ✓ Visible | When connections are made, duration |
| IP addresses | ✓ Visible | For audit logging (masked in logs) |
| Payload data | Opaque relay | Base64-encoded, not inspected |
Payload Handling
When Agent A exposes a service and Agent B reaches it, data flows through the Hub as an opaque relay:Example: Database Queries
Question: Does the Hub see my database queries? Answer: No. The Hub sees that Agent A connected to Agent B for service “prod-db”, but the actual SQL queries and responses are opaque base64 packets that the Hub relays without inspection.Encryption
In Transit
| Connection | Encryption | Notes |
|---|---|---|
| Agent ↔ Hub | TLS 1.2+ | Required for non-localhost |
| Hub ↔ Database | TLS | When using managed PostgreSQL |
| Web UI ↔ API | HTTPS | Always enforced |
HTTPS enforcement can be bypassed for local development only:
At Rest
- Database: Encryption depends on your PostgreSQL provider
- Hosted version: Uses Railway’s managed PostgreSQL with encryption at rest
- Self-hosted: Configure your database provider’s encryption settings
End-to-End Encryption (Future)
Currently, payload data passes through the Hub as an opaque relay. For environments requiring zero-knowledge relay, we’re considering optional agent-to-agent encryption where:- Agents negotiate keys directly
- Hub relays encrypted packets it cannot read
- Perfect forward secrecy via ephemeral keys
Workspace Isolation
Every resource belongs to exactly one workspace. Multiple layers enforce isolation:Isolation Layers
1. Database-level (RLS)
1. Database-level (RLS)
PostgreSQL Row Level Security (RLS) enforces workspace isolation at the database layer. All workspace-scoped tables have RLS policies that only allow access to rows matching the current workspace context.Example policy:
2. Application-level
2. Application-level
All queries are additionally scoped by
workspaceId in the application code (defense-in-depth).3. API-level
3. API-level
Guards validate workspace ownership before any operation.
4. Realtime-level
4. Realtime-level
WebSocket rooms are isolated by workspace.
5. Agent-level
5. Agent-level
Agents can only discover and access services within their workspace.
Who Can Access My Services?
Only authenticated members of your workspace. By default, exposed services are completely private.- Discover that your services exist
- List services in your workspace
- Connect to any of your services
The workspace IS the access boundary — think of it like a private Tailnet in Tailscale.
Cross-Workspace Access
Services can be shared across workspace boundaries via opt-in mechanisms:Service Shares
Token-based access with permissions:- Time-limited access
- Instant revocation
- Audit logging
- Per-service permissions
Public Links
Time-limited URLs with configurable restrictions:- Read-only access (
--methods GET) - Specific paths only (
--paths /api/public,/health) - Rate limiting (
--rate-limit 100) - Automatic expiration (
--expires 7d) - Instant revocation (via web dashboard or API)
Authentication & Authorization
User Authentication
- Passwordless: Magic links sent via email
- Sessions: HTTP-only cookies with secure flags
- Expiry: Sessions expire after 30 days of inactivity
Agent Authentication
- Tokens: 256-bit random tokens, stored as SHA-256 hashes
- Expiry: Tokens expire after 30 days (configurable)
- Rotation:
connect up --rotate-tokento rotate before expiry - Audit: All token usage logged with IP, user-agent, and client type
Provisioned Tokens (for AI agents)
AI agent runtimes can request short-lived tokens viaPOST /v1/agents/provision:
- Default TTL: 2 hours (configurable: 5 min to 24 hours)
- Client identity: Each token is tagged with a
clientType(cursor,claude-code,codex,devin,github-actions,cli,sdk,other) - Auto-generated credentials: The API generates both
agentIdandtoken— callers cannot reuse or supply their own - Audit trail: A
PROVISIONEDevent is logged at creation, and all subsequent token usage carries theclientTypefor attribution
API Key Authentication
- Format:
pc_prefix + 32 random characters - Scope: Full workspace access
- Revocation: Instant via web UI or API
Audit Logging
Complete audit trail of all agent actions and access.What’s Logged
| Event | Data Captured |
|---|---|
| Agent connect/disconnect | Agent ID, client type, IP (masked), timestamp |
| Token provisioned | Agent ID, client type, TTL, timestamp |
| Token usage | Agent ID, client type, IP, user-agent |
| Token rotation | Agent ID, client type, new expiry |
| IP changes | Previous IP, new IP, timestamp |
| Service expose/unexpose | Service name, target, agent |
| Share creation/revocation | Share ID, creator, permissions |
| Share access | IP, path, method, status code |
Log Security
- Sensitive data (tokens, keys) is scrubbed before logging
- IP addresses are masked in logs (
192.168.x.x) - Logs are structured JSON for SIEM ingestion
Accessing Audit Logs
Token Security
Tokens are the primary authentication mechanism for agents.Security Features
30-day expiry with warnings
30-day expiry with warnings
- Tokens expire after 30 days
- 7-day warning before expiration
- 24-hour grace period for rotation
SHA-256 hashing
SHA-256 hashing
- Tokens are hashed using SHA-256 before storage
- Original tokens never stored in database
- Impossible to retrieve original token from database
IP change notifications
IP change notifications
- Alerts when agent IP changes
- Helps detect token theft
- Logged in audit trail
Automatic rejection
Automatic rejection
- Expired tokens are automatically rejected
- No grace period after expiration
- Forces rotation for continued access
Log Scrubbing
Production logs automatically redact:- API keys (
pc_...) - Agent tokens (64 hex characters)
- Bearer tokens
- Session cookies
Rate Limiting
- Service shares support per-minute rate limits
- API endpoints should be rate-limited at the load balancer level
- Public links can enforce rate limits per client IP
Threat Model
Trusted
- The Hub operator (you, if self-hosted; us, if using hosted version)
- Workspace members with API keys
- Agents with valid tokens
Untrusted
- Network between agents and Hub (mitigated by TLS)
- Other workspaces (isolated by design)
- External share recipients (limited by share permissions)
Not Protected Against
Self-Hosting Security
When self-hosting, you control the entire security posture.Production Checklist
Use Managed PostgreSQL
- Enable encryption at rest
- Configure automated backups
- Use strong passwords
- Enable connection pooling
Set Up Monitoring
- Health checks for Hub availability
- Alerts for high error rates
- Database connection monitoring
- Disk space monitoring
Configure Token Settings
- Review and customize token expiry settings
- Set up token rotation policies
- Enable IP change notifications
Environment Variables
Compliance
Current State
Private Connect is designed with security in mind but does not currently hold compliance certifications.Self-Hosted Compliance
When self-hosting, you control:- Data residency and jurisdiction
- Encryption configuration
- Access controls and audit policies
- Backup and retention policies
Roadmap
We’re evaluating:- SOC 2 Type II certification for the hosted version
- GDPR compliance documentation
- Security questionnaire / CAIQ responses
Data Residency
Hosted Version
For the hosted version atapi.privateconnect.co:
- All data resides in US (Oregon) region
- No data replication to other regions
- No cross-border data transfer
Self-Hosted
Deploy in any region:- Full control over data location
- Meet regional compliance requirements
- Air-gapped environments supported
Reporting Security Issues
Please report security vulnerabilities responsibly:Discord
DM a maintainer in our Discord server
- Acknowledgment within 48 hours
- Fix timeline provided within 7 days
- Public disclosure coordinated with reporter
Security Features Summary
| Feature | Benefit |
|---|---|
| No VPN | No client to install, no split tunneling issues |
| No firewall rules | Services stay private, outbound-only connections |
| No exposed ports | Nothing listens publicly |
| Time-limited shares | Access expires automatically |
| Instant revocation | Cut off access in one command |
| Audit trail | See who accessed what, when |
| Per-service access | Grant access to specific services, not the whole network |
| Workspace isolation | Multi-layer isolation guarantees |
| Token rotation | Regularly rotate credentials without downtime |
| Opaque relay | Hub doesn’t see your data |
FAQ
Does the Hub see my database queries?
Does the Hub see my database queries?
No. The Hub sees that Agent A connected to Agent B for service “prod-db”, but the actual SQL queries and responses are opaque base64 packets that the Hub relays without inspection.
Can other workspaces see my services?
Can other workspaces see my services?
No. Services are isolated to their workspace. Other workspaces cannot discover or connect to your services unless you explicitly share them.
What happens if the Hub goes down?
What happens if the Hub goes down?
Existing TCP connections through the Hub will fail. Agents will attempt to reconnect with exponential backoff. No data is lost—the Hub doesn’t store payload data.
Can I run multiple Hubs?
Can I run multiple Hubs?
Currently, agents connect to a single Hub. Multi-region Hub federation is on the roadmap for high availability deployments.
Is the agent open source?
Is the agent open source?
Yes. The entire stack (agent, API, web UI) is open source under FSL-1.1-MIT license. View the code on GitHub.