1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 18:52:42 +01:00
phorge-phorge/src/applications/config
epriestley eb73cb68ff Raise a setup warning when locked configuration has a configuration value stored in the database
Summary:
Ref T13249. See <https://discourse.phabricator-community.org/t/configuring-the-number-of-taskmaster-daemons/2394/>.

Today, when a configuration value is "locked", we prevent //writes// to the database. However, we still perform reads. When you upgrade, we generally don't want a bunch of your configuration to change by surprise.

Some day, I'd like to stop reading locked configuration from the database. This would defuse an escalation where an attacker finds a way to write to locked configuration despite safeguards, e.g. through SQL injection or policy bypass. Today, they could write to `cluster.mailers` or similar and substantially escalate access. A better behavior would be to ignore database values for `cluster.mailers` and other locked config, so that these impermissible writes have no effect.

Doing this today would break a lot of installs, but we can warn them about it now and then make the change at a later date.

Test Plan:
  - Forced a `phd.taskmasters` config value into the database.
  - Saw setup warning.
  - Used `bin/config delete --database phd.taskmasters` to clear the warning.
  - Reviewed documentation changes.
  - Reviewed `phd.taskmasters` documentation adjustment.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13249

Differential Revision: https://secure.phabricator.com/D20159
2019-02-13 12:27:48 -08:00
..
application Give Config the "" (SPARKLE LIKE NEW) emoji instead of "☺" (STUPID LOOKING FACE) 2018-07-23 12:43:25 -07:00
check Raise a setup warning when locked configuration has a configuration value stored in the database 2019-02-13 12:27:48 -08:00
constants Config re-design 2017-09-05 15:24:15 -07:00
controller Remove "iconv" PHP extension dependency 2019-01-30 19:46:58 -08:00
custom Revert partial/nonfunctional OpenGraph support 2017-11-22 15:21:10 -08:00
editor Allow "Can Configure Application" permissions to be configured 2018-11-19 07:25:41 -08:00
engine When we "discover" new fatal setup issues, stop serving traffic 2016-11-21 15:54:40 -08:00
exception Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
issue Clean up another insufficiently-general exception 2016-11-23 10:41:19 -08:00
json Improve UI formatting of some configuration values 2015-12-05 09:58:47 -08:00
management Add a bin/config set <key> --stdin < value.json flag to make CLI configuration of complex values easier 2018-02-08 06:09:09 -08:00
module Split setup checks into "preflight" and "normal" checks 2016-09-06 11:57:18 -07:00
option Raise a setup warning when locked configuration has a configuration value stored in the database 2019-02-13 12:27:48 -08:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
response Add a friendlier "in flight" error page 2016-09-07 06:59:48 -07:00
schema Fix all query warnings in "arc unit --everything" 2018-11-15 03:51:25 -08:00
storage Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
type Convert cluster/projects config options to newer modular structure 2017-06-27 12:35:54 -07:00
view Capitalize "OPcache" more consistently 2018-07-26 12:15:57 -07:00