Review and refactor configuration for runtime components
See original GitHub issueInconsistencies
Sandbox, JSON API, Extractor and Navigator share some common configuration settings (but use different names for these settings), e.g:
- ledger host (can be shared via daml.yaml)
- ledger port (can be shared)
- wall clock time (can be shared)
- max inbound message size (can be shared)
- ledger ID (can be shared)
- max TTL seconds (can be shared)
- PostresSQL backend configuration (each process uses it for different purposes, for different DB instances, but do it inconsistently)
Sandbox currently does not require username/password, JSON API does, don’t know about Extractor. I strongly believe username/password should be required.
We currently specify PostgreSQL username/password via a command line option, which is not secure, anyone who has access to the machine can do ps -aef
and get this username/password.
There is #3147 issue, which talks about adding support for ledger host/port configuration via daml.yaml
.
Proposal
We should:
- remove command line configuration options and rely on
daml.yaml
only - standardize common ledger configuration settings and share the ledger config across all DAML assistant components.
We can standardize the command line options too, but it would simplify the main
method logic if we only support daml.yaml
configuration with an additional option that allows overriding the path to the default configuration, something like: --config-file=<path-to-file-to-override-default-daml-yaml-config>
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
To emphasize what @cocreature said,
daml.yaml
is an SDK concern and not be present on platform deployments. Maybe doing it the other way around and only supporting command-line arguments for the platform components (Sandbox and JSON API) and teachdaml-helper
how to forward them makes more sense. However, to make this pleasant we still need to standardize the command line flags. IMO, Navigator is an SDK tool and should not end up on deployed platforms. I’m not sure about the future plans for extractor.At this point, aligning the configuration with Canton’s is also important.