From 04b2fc0393533a084bb951d61e657bf1070a1559 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Sat, 15 Jan 2022 15:35:14 +0000 Subject: [PATCH 1/2] Fix up docs for `track_puppeted_user_ips` (again) --- changelog.d/11561.feature | 2 +- changelog.d/11749.feature | 2 +- changelog.d/11757.feature | 1 + docs/sample_config.yaml | 16 ++++++++++++---- synapse/config/api.py | 16 ++++++++++++---- 5 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 changelog.d/11757.feature diff --git a/changelog.d/11561.feature b/changelog.d/11561.feature index 19dada883bb2..3d4f2159c0b3 100644 --- a/changelog.d/11561.feature +++ b/changelog.d/11561.feature @@ -1 +1 @@ -Add `track_puppeted_user_ips` config flag to track puppeted user IP addresses. This also includes them in monthly active user counts. +Add `track_puppeted_user_ips` config flag to record client IP addresses against puppeted users, and include the puppeted users in monthly active user counts. diff --git a/changelog.d/11749.feature b/changelog.d/11749.feature index 19dada883bb2..3d4f2159c0b3 100644 --- a/changelog.d/11749.feature +++ b/changelog.d/11749.feature @@ -1 +1 @@ -Add `track_puppeted_user_ips` config flag to track puppeted user IP addresses. This also includes them in monthly active user counts. +Add `track_puppeted_user_ips` config flag to record client IP addresses against puppeted users, and include the puppeted users in monthly active user counts. diff --git a/changelog.d/11757.feature b/changelog.d/11757.feature new file mode 100644 index 000000000000..3d4f2159c0b3 --- /dev/null +++ b/changelog.d/11757.feature @@ -0,0 +1 @@ +Add `track_puppeted_user_ips` config flag to record client IP addresses against puppeted users, and include the puppeted users in monthly active user counts. diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index 9a501167ee3b..eda7db61d8f0 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -1503,10 +1503,18 @@ 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 -# requests are tracked. Implicitly enables MAU tracking for puppeted users. -# Uncomment to also track puppeted user IP's. +# We record the IP address of clients used to access the API for various +# reasons, including displaying it to the user in the "Where you're signed in" +# dialog. +# +# By default, when puppeting another user via the admin API, the client IP +# address is recorded against the user who created the access token (ie, the +# admin user), and *not* the puppeted user. +# +# Uncomment the following to also record the IP address against the puppeted +# user. (This also means that the puppeted user will count as an "active" user +# for the purpose of monthly active user tracking - see 'limit_usage_by_mau' etc +# above.) # #track_puppeted_user_ips: true diff --git a/synapse/config/api.py b/synapse/config/api.py index f8e52150a25f..f075a7e3ee54 100644 --- a/synapse/config/api.py +++ b/synapse/config/api.py @@ -61,10 +61,18 @@ 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 - # requests are tracked. Implicitly enables MAU tracking for puppeted users. - # Uncomment to also track puppeted user IP's. + # We record the IP address of clients used to access the API for various + # reasons, including displaying it to the user in the "Where you're signed in" + # dialog. + # + # By default, when puppeting another user via the admin API, the client IP + # address is recorded against the user who created the access token (ie, the + # admin user), and *not* the puppeted user. + # + # Uncomment the following to also record the IP address against the puppeted + # user. (This also means that the puppeted user will count as an "active" user + # for the purpose of monthly active user tracking - see 'limit_usage_by_mau' etc + # above.) # #track_puppeted_user_ips: true """ % { From b72e60ce60b020cce5c9485a5f233f76e958aaa8 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Mon, 17 Jan 2022 12:27:03 +0000 Subject: [PATCH 2/2] Remove trailing whitespace to keep linter happy --- docs/sample_config.yaml | 8 ++++---- synapse/config/api.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index eda7db61d8f0..543d52e23e9a 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -1503,12 +1503,12 @@ room_prejoin_state: #additional_event_types: # - org.example.custom.event.type -# We record the IP address of clients used to access the API for various +# We record the IP address of clients used to access the API for various # reasons, including displaying it to the user in the "Where you're signed in" # dialog. -# -# By default, when puppeting another user via the admin API, the client IP -# address is recorded against the user who created the access token (ie, the +# +# By default, when puppeting another user via the admin API, the client IP +# address is recorded against the user who created the access token (ie, the # admin user), and *not* the puppeted user. # # Uncomment the following to also record the IP address against the puppeted diff --git a/synapse/config/api.py b/synapse/config/api.py index f075a7e3ee54..8133b6b62402 100644 --- a/synapse/config/api.py +++ b/synapse/config/api.py @@ -61,12 +61,12 @@ def generate_config_section(cls, **kwargs) -> str: #additional_event_types: # - org.example.custom.event.type - # We record the IP address of clients used to access the API for various + # We record the IP address of clients used to access the API for various # reasons, including displaying it to the user in the "Where you're signed in" # dialog. - # - # By default, when puppeting another user via the admin API, the client IP - # address is recorded against the user who created the access token (ie, the + # + # By default, when puppeting another user via the admin API, the client IP + # address is recorded against the user who created the access token (ie, the # admin user), and *not* the puppeted user. # # Uncomment the following to also record the IP address against the puppeted