Skip to content

Commit 09e83de

Browse files
committed
docs: fix example config files
1 parent 719e09e commit 09e83de

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

htsget-config/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -401,14 +401,14 @@ The htsget-rs ticket and data servers can be configured to validate and authenti
401401

402402
The following options can be configured under the `auth` table to enable this:
403403

404-
| Option | Description | Type | Default |
405-
|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|--------------------------------------------------------------------------------------------------------|
406-
| `jwks_url` | The JSON web key sets url to fetch key sets validating the JWT token. | URL | Not set, either this option or `decode_public_key` must be set to validate JWTs. |
407-
| `public_key` | The path to PEM formatted public key used to decode the JWT token. | Filesystem path | Not set, either this option `jwks_url` must be set to validate JWTs. |
408-
| `validate_audience` | Validate that the JWT token has the specified audience field. | Array of strings | Optional. Does not validate the audience by default. |
409-
| `validate_issuer` | Validate that the JWT token has the specified issuer field. | Array of strings | Optional. Does not validate the issuer by default. |
410-
| `validate_subject` | Validate that the JWT token has the specified subject field. | Strings | Optional. Does not validate the subject by default. |
411-
| `tls` | Enables client authentication, or sets non-native root certificates for TLS when making requests. See [server configuration](#server-configuration) for more details. | TOML table | Optional. Performs no client authentication and uses native root certificates for TLS client requests. |
404+
| Option | Description | Type | Default |
405+
|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|-------------------------------------------------------------------------------------------------------------------|
406+
| `jwks_url` | The JSON web key sets url to fetch key sets validating the JWT token. | URL | Not set, either this option or `decode_public_key` must be set to validate JWTs. |
407+
| `public_key` | The path to PEM formatted public key used to decode the JWT token. | Filesystem path | Not set, either this option `jwks_url` must be set to validate JWTs. |
408+
| `validate_audience` | Validate that the JWT token has the specified audience field. | Array of strings | Optional. Does not validate the audience by default. |
409+
| `validate_issuer` | Validate that the JWT token has the specified issuer field. | Array of strings | Optional. Does not validate the issuer by default. |
410+
| `validate_subject` | Validate that the JWT token has the specified subject field. | Strings | Optional. Does not validate the subject by default. |
411+
| `http` | Additionally enables client authentication, or sets non-native root certificates for TLS, or disables HTTP header caching. See [server configuration](#server-configuration) for more details. | TOML table | TLS is always allowed, however the default performs no client authentication and uses native root certificates. |
412412

413413
When JWT authentication is enabled, either `jwks_url` or `public_key` must be set to validate the JWT. The `auth` table
414414
can be set under the `data_server` or `ticket_server` table, or globally to use the same configuration for both.

htsget-config/docs/examples/auth.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ jwks_url = "https://www.example.com/htsget"
1212
## Alternatively use public key-based validation
1313
#public_key = "/path/to/jwt-public-key.pem"
1414

15-
# Trusted authorization URLs
16-
trusted_authorization_urls = ["https://www.example.com/authorize"]
17-
# Optionally fetch the authorization url from the path in the JWT. Only
18-
# issues the request to the URL if it's also in `trusted_authorization_urls`.
19-
authorization_path = "$.authorization_url"
20-
2115
validate_audience = ["htsget-server"]
2216
validate_issuer = ["https://www.example.com"]
2317
validate_subject = "htsget"
2418

19+
# Authorization URLs, if using an authorization service.
20+
authorization_url = "https://www.example.com/authorize"
21+
# Forward the authorization header to the auth server.
22+
passthrough_auth = true
23+
## Any headers to forward
24+
#forward_headers = ["Content-Type"]
25+
2526
## Set client authentication
2627
#http.key = "key.pem"
2728
#http.cert = "cert.pem"

htsget-config/docs/examples/basic.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ ticket_server.addr = "127.0.0.1:8080"
55
data_server.addr = "127.0.0.1:8081"
66

77
# Serve data locally from the `data` directory or from an S3 bucket called `bucket` depending on the prefix.
8-
location = [ { location = "file://data", prefix = "file_prefix" }, { location = "s3://bucket", prefix = "s3_prefix" } ]
8+
locations = [ { location = "file://data", prefix = "file_prefix" }, { location = "s3://bucket", prefix = "s3_prefix" } ]

htsget-config/docs/examples/tls_ticket_server.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Run with `cargo run -p htsget-axum --all-features -- --config htsget-config/docs/examples/tls_ticket_server.toml`
33

44
ticket_server.addr = "0.0.0.0:8080"
5-
ticket_server.cors_allow_origins = "All"
5+
ticket_server.cors.allow_origins = "All"
66
ticket_server.tls.cert = "cert.pem"
77
ticket_server.tls.key = "key.pem"
88
data_server.addr = "0.0.0.0:8081"

0 commit comments

Comments
 (0)