From 5c391d100922d167ea5236d77a789d88ecc3e43f Mon Sep 17 00:00:00 2001 From: "Matt H." Date: Wed, 13 Nov 2024 16:35:49 -0500 Subject: [PATCH] Add deprecation warnings about ID Broker's use of Google Analytics --- README.md | 2 +- application/console/controllers/CronController.php | 5 +++++ application/console/controllers/GaController.php | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8abfbd96..3bfc1640 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ The API is described by [api.raml](api.raml), and an auto-generated [api.html](a * `./vendor/bin/behat features/authentication.feature` * `./vendor/bin/behat features/authentication.feature:298` -## Google Analytics Calls +## Google Analytics Calls - DEPRECATED Calls are made to Google Analytics regarding users' mfas and whether a password has been pwned. If you want to have an indication that those calls are likely to succeed, run diff --git a/application/console/controllers/CronController.php b/application/console/controllers/CronController.php index 02e1d85f..8d87b58f 100644 --- a/application/console/controllers/CronController.php +++ b/application/console/controllers/CronController.php @@ -50,6 +50,11 @@ public function actionGoogleAnalytics() { $eventCategory = 'mfa-usage'; + \Yii::warning( + 'Reporting ID Broker metrics to Google Analytics is deprecated and ' + . 'will be removed in a future release.' + ); + $gaEvents = [ 'active_users' => User::find()->where(['active' => 'yes'])->count(), 'active_users_with_require_mfa' => User::countUsersWithRequireMfa(), diff --git a/application/console/controllers/GaController.php b/application/console/controllers/GaController.php index cc419dbf..140c9f9a 100644 --- a/application/console/controllers/GaController.php +++ b/application/console/controllers/GaController.php @@ -15,6 +15,10 @@ class GaController extends Controller */ public function actionRegister_event() { + \Yii::warning( + 'Sending ID Broker data to Google Analytics is deprecated and will ' + . 'be removed in a future release.' + ); list($gaService, $gaRequest) = Utils::GoogleAnalyticsServiceAndRequest("cron"); if ($gaService === null) {