You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `/path`is optional and is matched as a path prefix.
64
64
- `@auth`requires a successful OIDC login before traffic reaches the app.
65
65
- `@auth:admins,devops`also requires membership in one of those groups.
66
+
- `~auth.example.com`is required only for wildcard auth routes and gives Terrarium the concrete oauth2-proxy callback host.
66
67
67
-
Use `https://` for normal public routes. Terrarium will request a Let's Encrypt certificate and redirect plain HTTP to HTTPS. Query strings and URL fragments are not part of route labels. Wildcard route hosts such as `*.example.com` are not supported; each published hostname needs its own explicit label.
68
+
Use `https://` for normal public routes. Terrarium will request a Let's Encrypt certificate and redirect plain HTTP to HTTPS. Query strings and URL fragments are not part of route labels.
69
+
70
+
Wildcard HTTPS routes are supported after DNS-01 ACME is configured:
71
+
72
+
```bash
73
+
terrariumctl set dns provider cloudflare CF_DNS_API_TOKEN:your-token
74
+
lxc config set my-app user.proxy "https://*.example.com:8080"
75
+
terrariumctl proxy sync
76
+
```
77
+
78
+
DNS credentials map directly to lego's provider environment variable names. See the [lego DNS provider list](https://go-acme.github.io/lego/dns/index.html) for supported providers and required variables. To disable DNS-01 and return to HTTP-01 certificate validation, run:
79
+
80
+
```bash
81
+
terrariumctl set dns provider
82
+
```
83
+
84
+
Wildcard auth routes need a concrete callback host under the same base domain:
85
+
86
+
```bash
87
+
lxc config set admin-ui user.proxy "https://*.example.com:3000@auth:admins~auth.example.com"
88
+
terrariumctl proxy sync
89
+
```
68
90
69
91
You can publish more than one route from the same container by separating routes with commas or newlines:
Use `https://` for normal public routes. It creates a HTTPS router with Let's Encrypt and redirects plain HTTP to HTTPS. Use `http://` only when you intentionally want a plain HTTP public route. The port is the port inside the container; the public listener is still 80/443. If the port is omitted, Terrarium targets container port `80`. A path, when present, is matched as a prefix. Query strings and fragments are not supported.
145
145
146
+
Wildcard HTTPS hosts such as `https://*.example.com:8080` require DNS-01 ACME. Configure the single Traefik DNS provider with lego environment variable names:
147
+
148
+
```bash
149
+
terrariumctl set dns provider cloudflare CF_DNS_API_TOKEN:your-token
150
+
terrariumctl set dns provider route53 AWS_ACCESS_KEY_ID:your-key AWS_SECRET_ACCESS_KEY:your-secret AWS_REGION:us-east-1
151
+
terrariumctl set dns provider
152
+
```
153
+
154
+
The last command disables DNS-01 and returns Traefik to HTTP-01. Traefik supports one DNS challenge provider per instance; see the [lego DNS provider list](https://go-acme.github.io/lego/dns/index.html) for provider codes and required environment variables.
155
+
146
156
Authentication suffixes are supported only on HTTP(S) routes:
147
157
148
158
```bash
149
159
lxc config set grafana user.proxy "https://grafana.example.com:3000@auth"
150
160
lxc config set admin-tool user.proxy "https://admin.example.com:8080@auth:admins,devops"
161
+
lxc config set wildcard-admin user.proxy "https://*.example.com:8080@auth:admins~auth.example.com"
151
162
terrariumctl proxy sync
152
163
```
153
164
154
-
`@auth` allows any authenticated user. `@auth:admins,devops` allows users in any listed group. Group names may contain letters, numbers, dots, underscores, and hyphens. External OIDC providers must emit a `groups` claim for group-restricted routes.
165
+
`@auth` allows any authenticated user. `@auth:admins,devops` allows users in any listed group. Group names may contain letters, numbers, dots, underscores, and hyphens. Wildcard auth routes must add `~callback-host`; Terrarium always uses HTTPS and oauth2-proxy's callback path for that host. External OIDC providers must emit a `groups` claim for group-restricted routes.
0 commit comments