From 4637d65857aefb1b3f4454527710f93c5677fe3c Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Fri, 14 Jan 2022 14:03:19 +0200 Subject: [PATCH 1/5] Fix sample_config.yaml in regards track_puppeted_user_ips Closes #11741 Signed-off-by: Jason Robinson --- docs/sample_config.yaml | 11 ++++++----- synapse/config/api.py | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index 907e067e5163..0d6adfb1d489 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -1503,11 +1503,12 @@ room_prejoin_state: #additional_event_types: # - org.example.custom.event.type -# If enabled, puppeted user IP's can also be tracked. By default when -# puppeting another user, the user who has created the access token -# for puppeting is tracked. If this is enabled, both requests are tracked. -# Implicitly enables MAU tracking for puppeted users. -#track_puppeted_user_ips: false +# By default when puppeting another user, the user who has created the +# access token for puppeting is tracked. If this is enabled, both +# requests are tracked. Implicitly enables MAU tracking for puppeted users. +# Uncomment to also track puppeted user IP's. +# +#track_puppeted_user_ips: true # A list of application service config files to use diff --git a/synapse/config/api.py b/synapse/config/api.py index bdbe9f0fa280..b36652de27a8 100644 --- a/synapse/config/api.py +++ b/synapse/config/api.py @@ -61,11 +61,12 @@ def generate_config_section(cls, **kwargs) -> str: #additional_event_types: # - org.example.custom.event.type - # If enabled, puppeted user IP's can also be tracked. By default when - # puppeting another user, the user who has created the access token - # for puppeting is tracked. If this is enabled, both requests are tracked. - # Implicitly enables MAU tracking for puppeted users. - #track_puppeted_user_ips: false + # By default when puppeting another user, the user who has created the + # access token for puppeting is tracked. If this is enabled, both + # requests are tracked. Implicitly enables MAU tracking for puppeted users. + # Uncomment to also track puppeted user IP's. + # + #track_puppeted_user_ips: true """ % { "formatted_default_state_types": formatted_default_state_types } From d4b43d97d917d73f1196fbf675db265a9477bcfa Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 14 Jan 2022 12:49:09 +0000 Subject: [PATCH 2/5] Remove trailing whitespace to keep flake8 happy --- synapse/config/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/config/api.py b/synapse/config/api.py index b36652de27a8..f8e52150a25f 100644 --- a/synapse/config/api.py +++ b/synapse/config/api.py @@ -61,8 +61,8 @@ def generate_config_section(cls, **kwargs) -> str: #additional_event_types: # - org.example.custom.event.type - # By default when puppeting another user, the user who has created the - # access token for puppeting is tracked. If this is enabled, both + # By default when puppeting another user, the user who has created the + # access token for puppeting is tracked. If this is enabled, both # requests are tracked. Implicitly enables MAU tracking for puppeted users. # Uncomment to also track puppeted user IP's. # From 73d22c879e64dc76d84645715a6b864f7de2a3c9 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 14 Jan 2022 12:56:38 +0000 Subject: [PATCH 3/5] It would help if I regenerated the config --- docs/sample_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index 0d6adfb1d489..9a501167ee3b 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -1503,8 +1503,8 @@ room_prejoin_state: #additional_event_types: # - org.example.custom.event.type -# By default when puppeting another user, the user who has created the -# access token for puppeting is tracked. If this is enabled, both +# By default when puppeting another user, the user who has created the +# access token for puppeting is tracked. If this is enabled, both # requests are tracked. Implicitly enables MAU tracking for puppeted users. # Uncomment to also track puppeted user IP's. # From ed371c6aeae7650c9427f56484d6269dbe4e9524 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 14 Jan 2022 13:31:13 +0000 Subject: [PATCH 4/5] ... and a changelog --- changelog.d/11749.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/11749.doc diff --git a/changelog.d/11749.doc b/changelog.d/11749.doc new file mode 100644 index 000000000000..3d64f473f535 --- /dev/null +++ b/changelog.d/11749.doc @@ -0,0 +1 @@ +Update room spec url in config files. \ No newline at end of file From 52bd15e560524f507a8ac906ccda4067190a13aa Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 14 Jan 2022 13:42:15 +0000 Subject: [PATCH 5/5] Use the right changelog --- changelog.d/11749.doc | 1 - changelog.d/11749.feature | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 changelog.d/11749.doc create mode 100644 changelog.d/11749.feature diff --git a/changelog.d/11749.doc b/changelog.d/11749.doc deleted file mode 100644 index 3d64f473f535..000000000000 --- a/changelog.d/11749.doc +++ /dev/null @@ -1 +0,0 @@ -Update room spec url in config files. \ No newline at end of file diff --git a/changelog.d/11749.feature b/changelog.d/11749.feature new file mode 100644 index 000000000000..19dada883bb2 --- /dev/null +++ b/changelog.d/11749.feature @@ -0,0 +1 @@ +Add `track_puppeted_user_ips` config flag to track puppeted user IP addresses. This also includes them in monthly active user counts.