Skip to content

Commit 10dfa40

Browse files
authored
src-connect: move explainer to architecture page (#1578)
1 parent c6f1aac commit 10dfa40

2 files changed

Lines changed: 81 additions & 42 deletions

File tree

docs/admin/architecture.mdx

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ flowchart LR
144144
145145
cloudflare["<b>Sourcegraph DNS (Cloudflare)</b><br/>WAF, Rate-limiting, VPN-only firewall (optional)"]
146146
147-
subgraph gcp_project["GCP Project - Dedicated per customer"]
147+
subgraph gcp_project["GCP project - Dedicated per customer"]
148148
gcp_lb["<b>GCP Load Balancer</b><br/>SSL termination"]
149149
nat["Cloud NAT Gateway"]
150150
subgraph gke["GKE"]
@@ -171,6 +171,8 @@ flowchart LR
171171
gke --> nat
172172
```
173173

174+
For customers connecting to private resources in on-prem data centers, also refer to the [Sourcegraph Connect agent for Sourcegraph Cloud](#sourcegraph-connect-agent-for-sourcegraph-cloud) section.
175+
174176
<Callout type="note">
175177
Learn more in the [Sourcegraph Cloud docs](/cloud).
176178
</Callout>
@@ -403,6 +405,56 @@ Enterprise Portal also handles Sourcegraph licensing and metering. Sourcegraph w
403405
docs](/admin/enterprise-portal).
404406
</Callout>
405407

408+
### Sourcegraph Connect agent for Sourcegraph Cloud
409+
410+
Sourcegraph Cloud supports connecting to private code hosts and artifact registries in the customer's network by deploying the Sourcegraph Connect tunnel agent in the customer's network.
411+
412+
Sourcegraph Connect consists of three components:
413+
414+
- **Connect tunnel clients:** Forward proxy clients for the Sourcegraph Cloud instance's containers to reach the customer's private code hosts and artifact registries, through the tunnel server.
415+
- Clients are managed by Sourcegraph, and deployed in the customer's Sourcegraph Cloud instance's VPC.
416+
- **Connect tunnel servers:** The broker between agents and clients, it authenticates agents and clients, enforces ACLs, sets up mTLS, and proxies encrypted traffic between agents and clients.
417+
- Tunnels are managed by Sourcegraph, and deployed in the customer's Sourcegraph Cloud instance's VPC.
418+
- mTLS certificates are rotated every 6 hours by default.
419+
- **Connect agents:** Deployed by the customer inside their network, agents proxy and encrypt traffic between the customer's private resources and the Sourcegraph Cloud tunnel clients.
420+
- The agent has its own identity, and using credentials provided to the customer during deployment, the agent authenticates and establishes a secure connection with the tunnel server. Only agents are allowed to establish secure connections with the tunnel server, and the server only accepts a connection if the agent's identity is approved.
421+
- Agents can only communicate with permitted code hosts and artifact registries.
422+
- The handshake between agents and tunnel servers occurs over a mTLS-encrypted connection using TCP/HTTP2 (gRPC) on port 50050.
423+
424+
```mermaid
425+
flowchart LR
426+
subgraph gcp["Dedicated&nbsp;Sourcegraph&nbsp;Cloud&nbsp;GCP&nbsp;project"]
427+
subgraph frontend_pod["sourcegraph-frontend pod"]
428+
frontend["frontend"]
429+
tunnel_client_1["Connect tunnel client"]
430+
frontend -->|"HTTPS"| tunnel_client_1
431+
end
432+
433+
subgraph gitserver_pod["gitserver pod"]
434+
gitserver["gitserver"]
435+
tunnel_client_2["Connect tunnel client"]
436+
gitserver -->|"HTTPS"| tunnel_client_2
437+
end
438+
439+
tunnel_server["Connect tunnel server"]
440+
tunnel_client_1 -->|"mTLS"| tunnel_server
441+
tunnel_client_2 -->|"mTLS"| tunnel_server
442+
end
443+
444+
subgraph customer["Customer Private Network"]
445+
tunnel_agent["Connect agent"]
446+
code_host["private code host"]
447+
tunnel_agent -->|"HTTPS"| code_host
448+
end
449+
450+
tunnel_server -->|"mTLS"| tunnel_agent
451+
```
452+
453+
<Callout type="note">
454+
Learn more in the [Sourcegraph Connect agent
455+
docs](/cloud/private-connectivity-sourcegraph-connect).
456+
</Callout>
457+
406458
### Observability
407459

408460
Observability encapsulates the monitoring and debugging of Sourcegraph deployments. Sourcegraph is designed and ships several observability tools and out-of-the-box capabilities to enable visibility into the health and state of a Sourcegraph deployment.
@@ -428,3 +480,18 @@ Debugging includes [tracing](/self-hosted/observability/tracing) and [logging](/
428480
<Callout type="note">
429481
Learn more in the [Observability docs](/self-hosted/observability).
430482
</Callout>
483+
484+
## Glossary
485+
486+
### Standard ports
487+
488+
Unless otherwise mentioned:
489+
490+
- HTTPS: 443
491+
- SSH: 22
492+
- HTTP: 80
493+
494+
### Data encryption
495+
496+
- Where TLS is used, at minimum, TLS 1.2 (TLS 1.3 also supported) is required.
497+
- All data is encrypted in transit and at rest.

docs/cloud/private-connectivity-sourcegraph-connect.mdx

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Private Resources in On-Prem Data Centers via Sourcegraph Connect Agent
1+
# Private resources in on-prem data centers via the Sourcegraph Connect agent
22

33
<Callout type="note">
44
This feature is in the Experimental stage. [Contact
@@ -9,35 +9,7 @@ As part of the [Enterprise tier](https://sourcegraph.com/pricing), Sourcegraph C
99

1010
## How it works
1111

12-
Sourcegraph Connect consists of three components:
13-
14-
### Tunnel Clients
15-
16-
Forward proxy clients for the Sourcegraph Cloud instance's containers to reach the customer's private code hosts and artifact registries, through the tunnel server.
17-
18-
Managed by Sourcegraph, and deployed in the customer's Sourcegraph Cloud instance's VPC.
19-
20-
### Tunnel Server
21-
22-
The broker between agents and clients, it authenticates agents and clients, enforces ACLs, sets up mTLS, and proxies encrypted traffic between agents and clients.
23-
24-
Managed by Sourcegraph, and deployed in the customer's Sourcegraph Cloud instance's VPC.
25-
26-
### Tunnel Agents
27-
28-
Deployed by the customer inside their network, agents proxy and encrypt traffic between the customer's private resources and the Sourcegraph Cloud tunnel clients.
29-
30-
The agent has its own identity, and using credentials provided to the customer during deployment, the agent authenticates and establishes a secure connection with the tunnel server. Only agents are allowed to establish secure connections with the tunnel server, and the server only accepts a connection if the agent's identity is approved.
31-
32-
Agents can only communicate with permitted code hosts and artifact registries.
33-
34-
<iframe
35-
src="https://link.excalidraw.com/readonly/453uvY8infI8wskSecGJ"
36-
width="100%"
37-
height="100%"
38-
style={{border: 'none'}}
39-
/>
40-
[Diagram link](https://link.excalidraw.com/readonly/453uvY8infI8wskSecGJ)
12+
A technical overview is available in [the architecture diagrams page](/admin/architecture#sourcegraph-connect-agent-for-sourcegraph-cloud).
4113

4214
## Steps
4315

@@ -47,22 +19,22 @@ The customer reaches out to their account manager to request this feature be ena
4719

4820
The account manager collects the required information from the customer, including but not limited to:
4921

50-
- The DNS names of the needed private resources (e.g. `gitlab.internal.company.net`, `artifactory.internal.company.net`)
51-
- The ports of the private resources (e.g. `443`, `80`, `22`)
52-
- The type of TLS certificates used by the private resources (e.g. self-signed, internal PKI, or issued by a public CA)
22+
- The DNS names of the needed private resources (e.g. `gitlab.internal.company.net`, `artifactory.internal.company.net`)
23+
- The ports of the private resources (e.g. `443`, `80`, `22`)
24+
- The type of TLS certificates used by the private resources (e.g. self-signed, internal PKI, or issued by a public CA)
5325

5426
Sourcegraph provides:
5527

56-
- The instructions, config file, and credentials to run the agent
57-
- The tunnel server's static public IPs and ports
28+
- The instructions, config file, and credentials to run the agent
29+
- The tunnel server's static public IPs and ports
5830

5931
### Create the connection
6032

6133
The customer installs the agent in their private network, following the instructions provided. At a high level:
6234

63-
- Configure internet egress to the provided tunnel server's static public IPs and ports
64-
- Configure intranet egress to the needed private resources
65-
- Deploy the tunnel agent via Docker container or binary, with the provided config file and credentials
35+
- Configure internet egress to the provided tunnel server's static public IPs and ports
36+
- Configure intranet egress to the needed private resources
37+
- Deploy the tunnel agent via Docker container or binary, with the provided config file and credentials
6638

6739
### Configure the code host connection
6840

@@ -126,9 +98,9 @@ The tunnel agent is designed and built with a minimal footprint and attack surfa
12698

12799
You can:
128100

129-
- Deploy the agent on a hardened container platform
130-
- Store the agent credential and config content in a secrets management system and mount these secrets to the container
131-
- Forward the agent's logs to your log management system
101+
- Deploy the agent on a hardened container platform
102+
- Store the agent credential and config content in a secrets management system and mount these secrets to the container
103+
- Forward the agent's logs to your log management system
132104

133105
### How can I inspect the agent's traffic, and audit the data the agent is accessing in my environment?
134106

0 commit comments

Comments
 (0)