Skip to content

Commit 25e34a4

Browse files
authored
Merge pull request #62 from agntcy/docs-update
chore(docs): organising docs content
2 parents 63f579a + 0e1d613 commit 25e34a4

4 files changed

Lines changed: 114 additions & 148 deletions

File tree

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# macOS
2+
.DS_Store
3+
4+
# Editor backups
5+
*~
6+
*.swp
7+
*.swo
8+
9+
# Local environment and secrets
10+
.env
11+
.env.*

README.md

Lines changed: 7 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -16,158 +16,17 @@ provided as-is for demonstration and testing purposes.
1616

1717
**Latest Version**: v1.3.0 - See [CHANGELOG.md](CHANGELOG.md) for what's new.
1818

19-
## Getting Started
20-
21-
Choose your path based on your goal:
22-
23-
### 📍 I want to use Directory (connect to public staging)
24-
25-
**Goal:** Connect your application to the existing Directory network to discover agents.
26-
27-
**Prerequisites:** You'll need a SPIRE server in your environment.
28-
29-
**Next Step:** Follow the [Client Onboarding Guide](onboarding/README.md)
30-
31-
---
32-
33-
### 🚀 I want to deploy my own Directory instance
34-
35-
**Goal:** Run your own Directory instance for local testing or private deployment.
36-
37-
**Prerequisites:** Kubernetes cluster (Kind, Minikube, or cloud provider)
38-
39-
**Next Step:** See [Getting Started](https://docs.agntcy.org/dir/getting-started/) (Helm or GitOps/Argo CD)
40-
41-
---
42-
43-
### 🌐 I want to deploy AND join the public network
44-
45-
**Goal:** Run your own Directory instance and federate with the public staging network.
46-
47-
**Prerequisites:** Kubernetes cluster + SPIRE knowledge
48-
49-
**Next Steps:**
50-
1. Deploy your Directory instance (see [Getting Started](https://docs.agntcy.org/dir/getting-started/))
51-
2. Setup federation (see [Client Onboarding Guide](onboarding/README.md) after deployment)
52-
53-
As of `dir` `v1.3.0`, the Helm chart provides a default DHT bootstrap address for the public testbed. In most cases you should leave bootstrap-peer settings unset in your values unless you intentionally need to override that default.
54-
55-
---
56-
57-
## Optional OIDC/SPIFFE Authentication Gateway
58-
59-
The default Directory deployment in this repository uses SPIFFE/SPIRE-oriented authentication that works well for in-cluster workloads. If you also want to support `dirctl`, SDKs, or automation running **outside** the cluster, deploy the standalone `oidc-gateway` application alongside `dir`.
60-
61-
The public gateway chart lives in the dedicated repository:
62-
63-
- [agntcy/oidc-gateway](https://github.com/agntcy/oidc-gateway)
64-
65-
This gateway puts Envoy in front of Directory:
66-
67-
1. A remote client presents an OIDC JWT, SPIFFE JWT-SVID, or SPIFFE X.509-SVID.
68-
2. Envoy validates bearer JWTs with `jwt_authn` or downstream SPIFFE mTLS when enabled.
69-
3. The ext-authz service normalizes the caller to a canonical principal and checks allowed gRPC methods.
70-
4. Only authorized requests are forwarded to the internal Directory apiserver with the configured principal header.
71-
72-
### When to Use It
73-
74-
Use the OIDC gateway when:
75-
76-
- You want remote `dirctl` access from a laptop or workstation outside the cluster
77-
- You want a human login flow backed by Dex
78-
- You want GitHub Actions or other external automation to call Directory with OIDC tokens
79-
80-
You do not need this gateway if you only use in-cluster, SPIFFE-based access.
81-
82-
### What to Configure
83-
84-
The staging example now includes a separate `oidc-gateway` app under `applications/oidc-gateway/dev/`. The main settings are:
85-
86-
- `envoy.backend.*`: points Envoy at the internal Directory service
87-
- `envoy.oidc.issuers[]`: configures Envoy `jwt_authn` providers and JWKS lookup for bearer-token validation
88-
- `envoy.oidc.github.*`: configures GitHub Actions OIDC for automation
89-
- `authServer.oidc.issuers`: maps verified token issuers to stable provider keys such as `dex` or `github`
90-
- `authServer.oidc.headers.authPrincipal`: sets the canonical principal header forwarded to Directory (`x-auth-principal` by default)
91-
- `authServer.oidc.roles`: maps canonical principals such as `oidc:dex:alice`, `oidc:github:repo:...`, or `spiffe:spiffe://...` to allowed gRPC methods
92-
- `ingress.*`: exposes the Envoy gateway for external access over gRPC
93-
94-
### Dex and Remote Clients
95-
96-
If you want interactive user login, configure Dex in `applications/dex/dev/values.yaml` and make sure:
97-
98-
- `config.issuer` matches the public URL where Dex is reachable
99-
- your GitHub OAuth app credentials are supplied through a Kubernetes Secret
100-
- the Dex issuer values in `applications/dex/dev/values.yaml` and `applications/oidc-gateway/dev/values.yaml` match
101-
102-
Enabling Dex by itself is not enough for remote Directory access. Remote clients also need the standalone `oidc-gateway` deployed so their OIDC tokens can be validated before requests reach Directory.
103-
104-
### Canonical Field Reference
105-
106-
The staging values file is a user-facing example. For the complete public source of truth for all supported fields, see:
107-
108-
- `agntcy/dir/install/charts/dir/values.yaml`
109-
- `agntcy/oidc-gateway/install/charts/oidc-gateway/values.yaml`
110-
111-
---
112-
113-
## Next Steps: Connecting to the Directory Network
114-
115-
After deploying your Directory instance (see [Getting Started](https://docs.agntcy.org/dir/getting-started/)), it will be **isolated** and cannot discover agents from other organizations.
116-
117-
### Why Join the Network?
118-
119-
**Current State (Standalone):**
120-
- ✅ Your Directory works for your organization
121-
- ❌ Cannot discover agents from other organizations
122-
- ❌ Your agents are not discoverable by others
123-
- ❌ Limited to your own trust domain
124-
125-
**After Federation:**
126-
- ✅ All standalone benefits
127-
- ✅ Discover agents across multiple organizations
128-
- ✅ Your agents become globally discoverable
129-
- ✅ Part of decentralized discovery network
130-
131-
### How to Setup Federation
132-
133-
Federation requires configuring SPIRE to exchange trust bundles with other Directory instances.
134-
135-
**Follow these steps:**
136-
137-
1. **Choose a Federation Profile**
138-
- **https_web** (recommended): Uses standard HTTPS + Let's Encrypt, no SSL passthrough needed
139-
- **https_spiffe**: Uses SPIFFE mTLS, requires SSL passthrough and bootstrap bundle exchange
140-
141-
See [Federation Profiles](https://docs.agntcy.org/dir/federation-profiles/) for detailed comparison.
142-
143-
2. **Create Your Federation File**
144-
- Describes how others can connect to your SPIRE federation endpoint
145-
- Template: `onboarding/federation/.federation.web.template.yaml` (or `.federation.spiffe.template.yaml`)
146-
- Example: See `onboarding/federation/spire.ads.outshift.io.yaml` for reference
147-
148-
3. **Submit Your Federation File**
149-
- Fork this repository
150-
- Add your file to `onboarding/federation/your-domain.com.yaml`
151-
- Submit a Pull Request
152-
153-
4. **Deploy Directory's Federation File**
154-
- After approval, deploy `onboarding/federation/spire.ads.outshift.io.yaml` to your cluster
155-
- Run `task gen:dir` to regenerate `applications/dir/gen.values.yaml`
156-
- ArgoCD will automatically sync the federation configuration
157-
- This tells your SPIRE how to connect to the Directory network
158-
159-
**Complete Instructions:** See the [Client Onboarding Guide](onboarding/README.md) for step-by-step federation setup.
160-
161-
---
162-
16319
## Documentation
16420

16521
| Topic | Link |
16622
|-------|------|
167-
| Getting Started | [docs.agntcy.org/dir/getting-started](https://docs.agntcy.org/dir/getting-started/) |
168-
| Partner Federation with Prod | [docs.agntcy.org/dir/partner-prod-federation](https://docs.agntcy.org/dir/partner-prod-federation/) |
169-
| Federation Profiles | [docs.agntcy.org/dir/federation-profiles](https://docs.agntcy.org/dir/federation-profiles/) |
170-
| Federation Troubleshooting | [docs.agntcy.org/dir/federation-troubleshooting](https://docs.agntcy.org/dir/federation-troubleshooting/) |
23+
| Getting Started | [docs/dir-getting-started.md](docs/dir-getting-started.md) |
24+
| OIDC/SPIFFE Gateway | [docs/dir-oidc-gateway.md](docs/dir-oidc-gateway.md) |
25+
| Client Onboarding | [onboarding/README.md](onboarding/README.md) |
26+
| Partner Federation with Prod | [docs/dir-federation-setup.md](docs/dir-federation-setup.md) |
27+
| Federation Profiles | [docs/dir-federation-profiles.md](docs/dir-federation-profiles.md) |
28+
| Federation Troubleshooting | [docs/dir-federation-troubleshooting.md](docs/dir-federation-troubleshooting.md) |
29+
| Helm / GitOps Deployment | [docs.agntcy.org/dir/getting-started](https://docs.agntcy.org/dir/getting-started/) |
17130
| Production Deployment | [docs.agntcy.org/dir/prod-deployment](https://docs.agntcy.org/dir/prod-deployment/) |
17231

17332
---

docs/dir-getting-started.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Getting Started
2+
3+
Choose your path based on your goal:
4+
5+
## I want to use Directory (connect to public staging)
6+
7+
**Goal:** Connect your application to the existing Directory network to discover agents.
8+
9+
**Prerequisites:** You'll need a SPIRE server in your environment.
10+
11+
**Next Step:** Follow the [Client Onboarding Guide](../onboarding/README.md).
12+
13+
## I want to deploy my own Directory instance
14+
15+
**Goal:** Run your own Directory instance for local testing or private deployment.
16+
17+
**Prerequisites:** Kubernetes cluster (Kind, Minikube, or cloud provider)
18+
19+
**Next Step:** See [Getting Started](https://docs.agntcy.org/dir/getting-started/) (Helm or GitOps/Argo CD).
20+
21+
## I want to deploy AND join the public network
22+
23+
**Goal:** Run your own Directory instance and federate with the public staging network.
24+
25+
**Prerequisites:** Kubernetes cluster + SPIRE knowledge
26+
27+
**Next Steps:**
28+
29+
1. Deploy your Directory instance (see [Getting Started](https://docs.agntcy.org/dir/getting-started/))
30+
2. Setup federation (see [Client Onboarding Guide](../onboarding/README.md) after deployment)
31+
32+
As of `dir` `v1.3.0`, the Helm chart provides a default DHT bootstrap address for the public testbed. In most cases you should leave bootstrap-peer settings unset in your values unless you intentionally need to override that default.
33+
34+
## Related Documentation
35+
36+
- [Federation Profiles](dir-federation-profiles.md) — compare `https_web` and `https_spiffe` bundle endpoint profiles
37+
- [Partner Federation with Prod](dir-federation-setup.md) — federate with the public Directory at `spire.ads.outshift.io`
38+
- [OIDC/SPIFFE Authentication Gateway](dir-oidc-gateway.md) — enable remote `dirctl`, SDK, or automation access

docs/dir-oidc-gateway.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Optional OIDC/SPIFFE Authentication Gateway
2+
3+
The default Directory deployment in this repository uses SPIFFE/SPIRE-oriented authentication that works well for in-cluster workloads. If you also want to support `dirctl`, SDKs, or automation running **outside** the cluster, deploy the standalone `oidc-gateway` application alongside `dir`.
4+
5+
The public gateway chart lives in the dedicated repository:
6+
7+
- [agntcy/oidc-gateway](https://github.com/agntcy/oidc-gateway)
8+
9+
This gateway puts Envoy in front of Directory:
10+
11+
1. A remote client presents an OIDC JWT, SPIFFE JWT-SVID, or SPIFFE X.509-SVID.
12+
2. Envoy validates bearer JWTs with `jwt_authn` or downstream SPIFFE mTLS when enabled.
13+
3. The ext-authz service normalizes the caller to a canonical principal and checks allowed gRPC methods.
14+
4. Only authorized requests are forwarded to the internal Directory apiserver with the configured principal header.
15+
16+
## When to Use It
17+
18+
Use the OIDC gateway when:
19+
20+
- You want remote `dirctl` access from a laptop or workstation outside the cluster
21+
- You want a human login flow backed by Dex
22+
- You want GitHub Actions or other external automation to call Directory with OIDC tokens
23+
24+
You do not need this gateway if you only use in-cluster, SPIFFE-based access.
25+
26+
## What to Configure
27+
28+
The staging example includes a separate `oidc-gateway` app under `applications/oidc-gateway/dev/`. The main settings are:
29+
30+
- `envoy.backend.*`: points Envoy at the internal Directory service
31+
- `envoy.oidc.issuers[]`: configures Envoy `jwt_authn` providers and JWKS lookup for bearer-token validation
32+
- `envoy.oidc.github.*`: configures GitHub Actions OIDC for automation
33+
- `authServer.oidc.issuers`: maps verified token issuers to stable provider keys such as `dex` or `github`
34+
- `authServer.oidc.headers.authPrincipal`: sets the canonical principal header forwarded to Directory (`x-auth-principal` by default)
35+
- `authServer.oidc.roles`: maps canonical principals such as `oidc:dex:alice`, `oidc:github:repo:...`, or `spiffe:spiffe://...` to allowed gRPC methods
36+
- `ingress.*`: exposes the Envoy gateway for external access over gRPC
37+
38+
## Dex and Remote Clients
39+
40+
If you want interactive user login, configure Dex in `applications/dex/dev/values.yaml` and make sure:
41+
42+
- `config.issuer` matches the public URL where Dex is reachable
43+
- your GitHub OAuth app credentials are supplied through a Kubernetes Secret
44+
- the Dex issuer values in `applications/dex/dev/values.yaml` and `applications/oidc-gateway/dev/values.yaml` match
45+
46+
Enabling Dex by itself is not enough for remote Directory access. Remote clients also need the standalone `oidc-gateway` deployed so their OIDC tokens can be validated before requests reach Directory.
47+
48+
## Canonical Field Reference
49+
50+
The staging values file is a user-facing example. For the complete public source of truth for all supported fields, see:
51+
52+
- `agntcy/dir/install/charts/dir/values.yaml`
53+
- `agntcy/oidc-gateway/install/charts/oidc-gateway/values.yaml`
54+
55+
## Related Documentation
56+
57+
- [Getting Started](dir-getting-started.md) — deployment paths for this repository
58+
- [Client Onboarding Guide](../onboarding/README.md) — connect clients to the public staging network

0 commit comments

Comments
 (0)