As organizations race to adopt generative artificial intelligence and cloud development tools, security teams face a persistent challenge: Shadow AI and unauthorized code exfiltration. In almost every security workshop, the conversation eventually turns to how companies can prevent employees from copying sensitive corporate data into personal accounts on leading AI and development platforms like ChatGPT, Claude, Gemini, DeepSeek, Perplexity, and GitHub.
While organizations often license official Business or Enterprise workspaces, employees frequently default to their personal accounts because they are already logged in, familiar, or accessible on personal browsers.
A general ban rarely works—it usually just drives usage to unmanaged smartphones and personal networks. A far more sustainable approach is to provide an approved corporate workspace while technically enforcing that only the company-managed tenant or enterprise can be accessed on corporate devices and networks.
Why Personal Accounts Pose Real Risks
Allowing employees to use consumer-tier LLM and repository accounts for work tasks introduces significant enterprise risks:
- No Contractual Data Protection (DPA): Personal accounts lack Data Processing Agreements (such as under Art. 28 GDPR). Pasting customer data, HR records, or proprietary source code into a personal account is effectively an unauthorized third-party transfer.
- Training and Data Retention: Consumer accounts often retain chat histories and may use inputs for model training depending on user settings, putting corporate intellectual property outside administrative control.
- Source Code Exfiltration: On platforms like GitHub, developers accidentally pushing internal repositories or using personal GitHub Copilot subscriptions on corporate machines bypasses organizational governance and auditability.
- Zero Visibility: Standard security controls like eDiscovery, Data Loss Prevention (DLP), audit logs, and retention policies do not apply to personal accounts.
- Offboarding Vulnerabilities: When employees leave the organization, their personal accounts—along with complete chat histories, code snippets, and uploaded documents—go with them.
- Account Security: Personal accounts are rarely secured with phishing-resistant Multi-Factor Authentication (MFA), creating a valuable vector for credential compromise.
How Tenant Restrictions Work for Cloud LLMs & Platforms
The concept of tenant restrictions builds on established enterprise proxy patterns. A secure web gateway or proxy injects a specific HTTP header into outbound traffic destined for a cloud service. The service inspects this header, verifying whether the requested workspace, organization, or enterprise ID matches the allowed list. If it does not, the sign-in or request is blocked.
Major LLM and AI platform providers, alongside developer ecosystems, support native tenant restriction headers:
| Service | HTTP Header Name | Expected Value | Prerequisite |
| ChatGPT | ChatGPT-Allowed-Workspace-Id | Workspace ID(s), comma-separated without spaces | Business or Enterprise workspace |
| Claude | anthropic-allowed-org-ids | Organization ID(s), comma-separated without spaces | Enterprise plan or Console organization |
| Gemini | X-Goog-Allowed-Customer-IDs | Google Cloud / Workspace Customer ID(s) | Google Workspace or Google Cloud Enterprise |
| DeepSeek | Custom proxy block / SNI filtering | Restricted via domain or SNI categorization | Enterprise firewall rules / Web categories |
| Perplexity | Custom proxy block / Enterprise API | Enterprise domain restriction policy | Perplexity Enterprise Pro |
| GitHub | sec-GitHub-allowed-enterprise | Enterprise ID / slug(s), comma-separated without spaces (up to 20) | GitHub Enterprise Cloud (with Enterprise Managed Users) |
Important Note: Because these headers must be injected into encrypted HTTPS traffic, none of these mechanisms work without TLS/SSL inspection (HTTPS decryption).
Implementation : Zscaler Internet Access (ZIA)
If your organization utilizes Zscaler Internet Access (ZIA) as your Secure Web Gateway (SWG), you can achieve the exact same tenant restriction behavior by leveraging HTTP Header Control (specifically HTTP Header Insertion Profiles) alongside URL & Cloud App Control policies.
Prerequisites
- Zscaler Client Connector deployed on managed endpoints.
- SSL Inspection enabled and enforced for target AI and developer domains (Decrypt policies active).
- Valid corporate Workspace IDs, Organization IDs, or Enterprise slugs.
Configuration Steps
- Enable SSL Inspection:
- Navigate to Policy > SSL Inspection in the ZIA Admin Portal and ensure decryption rules cover Cloud Applications and URLs associated with Artificial Intelligence, Machine Learning, and Software Development.
- Create HTTP Header Insertion Profiles:
- Navigate to Policies > Access Control > Internet & SaaS > HTTP Header Control.
- Open the HTTP Header Insertion Profile tab and create separate insertion profiles for each vendor key-value pair:
- ChatGPT Profile: Header Name
ChatGPT-Allowed-Workspace-Id| Valueyour-workspace-id - Claude Profile: Header Name
anthropic-allowed-org-ids| Valueyour-org-id - Gemini Profile: Header Name
X-Goog-Allowed-Customer-IDs| Valueyour-customer-id - GitHub Profile: Header Name
sec-GitHub-allowed-enterprise| Valueyour-enterprise-slug
- ChatGPT Profile: Header Name
- Attach Profiles to URL Filtering / Cloud App Control Policies:
- Go to Policies > Access Control > Internet & SaaS > URL & Cloud App Control.
- Create rules matching the target cloud apps or domains (e.g.,
chatgpt.com,claude.ai,gemini.google.com,github.com), set the action to Allow, and attach the corresponding HTTP Header Insertion Profile to each rule. (Note: For platforms like DeepSeek or Perplexity without native header support, set the rule action to Block or enforce read-only Browser Isolation).
- Validate and Test: Review ZIA Web Insights Logs to confirm that traffic matching your policies triggers the header insertion and blocks personal consumer account logins.
Operational Pitfalls & Best Practices
Before rolling out custom header enforcement across your enterprise, keep these practical considerations in mind:
- GitHub SSH & Codespaces Gaps: The
sec-GitHub-allowed-enterpriseheader restricts web UI sign-ins, API calls, GitHub Copilot, and Git operations over HTTPS, blocking personal accounts and outside Personal Access Tokens (PATs). However, it does not cover Git over SSH, GitHub Pages, Codespaces, or anonymous public reads. To prevent developers from pushing to personal repositories via SSH, block outbound SSH (port 22 andssh.github.com) at the firewall or proxy level. - Desktop and Mobile Applications: Native desktop applications (such as the ChatGPT desktop app) often rely on certificate pinning, meaning web-based custom header injection will not work out-of-the-box unless bypassed or managed via MDM policies.
- QUIC and DNS over HTTPS: Ensure protocols like QUIC (UDP 443) and Secure DNS are disabled or blocked at the network perimeter, as they can tunnel traffic around inspection proxies.
- Managed Device Scope: Protection applies only where traffic runs through your secure gateway (EIA or ZIA). BYOD and personal devices remain out of scope and should be secured via strict conditional access or device compliance policies.
- Strict Validation: Always test header configurations in a pilot group first. An incorrect header value or invalid slug can trigger a
400 Bad Requestacross all traffic, temporarily cutting off access to the legitimate corporate workspace.
Conclusion
Implementing custom headers via Zscaler Internet Access bridges a long-standing security gap: it allows organizations to embrace AI and developer productivity by officially sanctioning corporate workspaces while cleanly and transparently blocking personal account usage across ChatGPT, Claude, Gemini, and GitHub.
What are your experiences with managing Shadow AI and personal accounts using Enterprise proxies? Feel free to share your thoughts or reach out with implementation questions!
References & Further Reading
- Microsoft Entra Internet Access: whennotif.io – ChatGPT, Claude & Co: Blocking Personal Accounts at Work with Entra Internet Access Custom Headers
- Microsoft Entra Explicit Proxy: whennotif.io – Entra Internet Access: Explicit Forward Proxy now in Public Preview
- Zscaler HTTP Header Control: Zscaler Blog – HTTP Header Control in Zscaler ZIA: Enforce Smarter Web Security Policies
- Zscaler AI Governance & Filtering: Zscaler White Paper – AI Content Filtering and Governance Practices Using Zscaler
- Anthropic Enterprise Tenant Restrictions: Claude Support – Enforce network-level access control with Tenant Restrictions

