|
| 1 | +# Service info |
| 2 | + |
| 3 | +`GET /service-info` (and the gRPC `GetServiceInfo` method) describes the Funnel |
| 4 | +deployment following the [GA4GH service-info specification][service-info] |
| 5 | +(v1.0.0) and the TES `tesServiceInfo` extension. Service registries and clients |
| 6 | +use it to tell deployments apart and to show who runs them. |
| 7 | + |
| 8 | +> [!IMPORTANT] |
| 9 | +> Service info is public. Funnel serves it without authentication, even when |
| 10 | +> `Server.BasicAuth` or `Server.OidcAuth` is configured. Everything you set here, |
| 11 | +> including the storage locations you advertise, is visible to anyone who can |
| 12 | +> reach the server. Don't put credentials, internal host names, or bucket names |
| 13 | +> you want to keep private into these fields. |
| 14 | +
|
| 15 | +## Configuration |
| 16 | + |
| 17 | +`Server.ServiceName` (also available as the `--Server.ServiceName` flag) sets |
| 18 | +`name`. The optional `Server.ServiceInfo` section of the configuration file |
| 19 | +sets the identity of the deployment; it has no command-line flags. The HTTP and |
| 20 | +gRPC endpoints report the same values. |
| 21 | + |
| 22 | +```yaml |
| 23 | +Server: |
| 24 | + ServiceName: Example TES |
| 25 | + ServiceInfo: |
| 26 | + Id: org.example.tes |
| 27 | + Description: Task execution service of Example Org |
| 28 | + Organization: |
| 29 | + Name: Example Org |
| 30 | + Url: https://example.org |
| 31 | + ContactUrl: mailto:admin@example.org |
| 32 | + DocumentationUrl: https://example.org/docs/tes |
| 33 | + Environment: prod |
| 34 | + CreatedAt: 2026-01-01T00:00:00Z |
| 35 | + Storage: |
| 36 | + - s3://example-bucket |
| 37 | +``` |
| 38 | +
|
| 39 | +| Key | Response field | Built-in value | |
| 40 | +| --- | --- | --- | |
| 41 | +| `Server.ServiceName` | `name` | `Funnel` | |
| 42 | +| `Id` | `id` | `org.ga4gh.funnel` | |
| 43 | +| `Description` | `description` | `Funnel is a toolkit for distributed task execution via a simple, standard API.` | |
| 44 | +| `Organization.Name`, `Organization.Url` | `organization.name`, `organization.url` | `CALYPR Data Platform`, `https://github.com/calypr/` | |
| 45 | +| `ContactUrl` | `contactUrl` | `https://github.com/calypr/` | |
| 46 | +| `DocumentationUrl` | `documentationUrl` | `https://github.com/calypr/funnel` | |
| 47 | +| `Environment` | `environment` | `development` | |
| 48 | +| `CreatedAt` | `createdAt` | `2016-03-21T16:27:49-07:00` | |
| 49 | +| `Storage` | `storage` | `file:///path/to/local/funnel-storage`, `s3://ohsu-compbio-funnel/storage` | |
| 50 | + |
| 51 | +Funnel always reports `type` (`org.ga4gh:tes:1.1.0`), `version` (the Funnel |
| 52 | +version), `updatedAt` (the time of the request), and |
| 53 | +`tesResources_backend_parameters` (from the compute backend) itself; they can't |
| 54 | +be configured. |
| 55 | + |
| 56 | +The built-in values describe the Funnel project, not your deployment, and the |
| 57 | +built-in storage locations are only examples. Every deployment that registers |
| 58 | +with a service registry should at least set its own `Id`, `Organization`, and |
| 59 | +`Environment`. The specification asks for an `id` that is unique for each |
| 60 | +service; reverse domain name notation (`org.example.tes`) is recommended. |
| 61 | + |
| 62 | +## Empty values |
| 63 | + |
| 64 | +Every key is optional: |
| 65 | + |
| 66 | +- A key that is missing, or set to an empty string, keeps its built-in value. |
| 67 | + This also applies to `Server.ServiceName`. Existing configurations without a |
| 68 | + `ServiceInfo` section report the same service info as before, except that an |
| 69 | + empty `ServiceName` now reports `Funnel` instead of an empty `name`, which |
| 70 | + the specification requires. |
| 71 | +- `Storage` is replaced as a whole: a non-empty list replaces both built-in |
| 72 | + locations, while a missing or empty list (`Storage: []`) keeps them. Funnel |
| 73 | + can't report an empty `storage` list. To avoid advertising the example |
| 74 | + locations, list the locations you want to advertise. |
| 75 | +- `Organization` is replaced as a whole as well. Either leave out both `Name` |
| 76 | + and `Url` to keep the built-in organization, or set both: the specification |
| 77 | + requires both, so setting only one of them is an error. |
| 78 | + |
| 79 | +## Validation |
| 80 | + |
| 81 | +`funnel server run` checks the configured values against the service-info |
| 82 | +specification at startup and refuses to start if any of them is invalid, |
| 83 | +naming every invalid key: |
| 84 | + |
| 85 | +- `ServiceName`, `Id`, `Description`, `Environment`, and `Organization.Name` |
| 86 | + must not consist only of whitespace. |
| 87 | +- `Organization.Url`, `ContactUrl`, and `DocumentationUrl` must be absolute |
| 88 | + `http` or `https` URLs with a host, such as `https://example.org`, written |
| 89 | + with the characters [RFC 3986][rfc3986] allows (percent-encode others, and |
| 90 | + use the ASCII form of internationalized domain names). `ContactUrl` may also |
| 91 | + be an email address as a `mailto:` URI (`mailto:admin@example.org`), as the |
| 92 | + specification suggests. Clients show these values as links, so Funnel is |
| 93 | + stricter here than the specification's `format: uri`: other schemes, such as |
| 94 | + `javascript:`, `data:` or `tel:`, are rejected, and so are URLs that contain |
| 95 | + credentials (`https://user:password@...`). |
| 96 | +- `CreatedAt` must be an [RFC 3339][rfc3339] timestamp with a time zone, such |
| 97 | + as `2026-01-01T00:00:00Z`. Leap seconds (`:60`) aren't accepted. |
| 98 | +- `Storage` entries must not be empty or consist only of whitespace. The TES |
| 99 | + specification allows any string; URIs such as `s3://example-bucket` are the |
| 100 | + convention. |
| 101 | + |
| 102 | +`Environment` is free text. The specification suggests `prod`, `test`, `dev`, |
| 103 | +and `staging`, but doesn't enforce them. |
| 104 | + |
| 105 | +[service-info]: https://github.com/ga4gh-discovery/ga4gh-service-info/blob/v1.0.0/service-info.yaml |
| 106 | +[rfc3986]: https://www.rfc-editor.org/rfc/rfc3986 |
| 107 | +[rfc3339]: https://www.rfc-editor.org/rfc/rfc3339 |
0 commit comments