Currently the mesh.yml file is read once a the start of mesh and the options can never be changed. For some options that makes sense (e.g. graphdb folder), for others this is a nuisance, since a server restart is always required even though it is not necessary (e.g. image resize quality).
We should split up the options into two categories: Immutable and mutable. Mutable options can be changed via the REST API at runtime.
Endpoint Proposal
GET /admin/config: Outputs the contents of the configuration as JSON.
POST /admin/config: Sets the configuration. Options that are not in the JSON or options that are immutable will be ignored.
Only users in the admin role will be authorized for the above endpoints.
Considerations
Should changed configs be saved back to the mesh.yml file?
Should all options be readable? Only the admin role can access the endpoint, however some fields could still be to dangerous to expose (e.g. keystore password)
Description
Currently the
mesh.yml
file is read once a the start of mesh and the options can never be changed. For some options that makes sense (e.g. graphdb folder), for others this is a nuisance, since a server restart is always required even though it is not necessary (e.g. image resize quality).We should split up the options into two categories: Immutable and mutable. Mutable options can be changed via the REST API at runtime.
Endpoint Proposal
GET /admin/config
: Outputs the contents of the configuration as JSON.POST /admin/config
: Sets the configuration. Options that are not in the JSON or options that are immutable will be ignored. Only users in theadmin
role will be authorized for the above endpoints.Considerations
mesh.yml
file?