Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • perun/perun-proxyidp/v1/simplesamlphp-module-proxystatistics
1 result
Show changes
Commits on Source (10)
# [8.3.0](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-proxystatistics/compare/v8.2.0...v8.3.0) (2023-11-27)
### Features
* 🎸 Option to ignore logins by SP/IDP EntityID in config ([443a766](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-proxystatistics/commit/443a7665405865552eea6e7dd7626221459470bc))
# [8.2.0](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-proxystatistics/compare/v8.1.1...v8.2.0) (2023-06-01)
......
# proxystatistics-simplesamlphp-module
![maintenance status: end of life](https://img.shields.io/maintenance/end%20of%20life/2023)
This project has reached end of life, which means no new features will be added. Security patches and important bug fixes will end as of 2023. Check out [RCIAM METRICS](https://github.com/rciam/rciam-authmetrics) instead.
## Description
Module for simpleSAMLphp which shows Proxy IdP/SP statistics
## Contribution
......
......@@ -655,16 +655,16 @@
},
{
"name": "simplesamlphp/saml2",
"version": "v4.6.8",
"version": "v4.6.10",
"source": {
"type": "git",
"url": "https://github.com/simplesamlphp/saml2.git",
"reference": "dea19260955a863f6a347e8479a2049d99b5cd18"
"reference": "a6c46e8134df2686da9ad44bc9b8f85443c03440"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/simplesamlphp/saml2/zipball/dea19260955a863f6a347e8479a2049d99b5cd18",
"reference": "dea19260955a863f6a347e8479a2049d99b5cd18",
"url": "https://api.github.com/repos/simplesamlphp/saml2/zipball/a6c46e8134df2686da9ad44bc9b8f85443c03440",
"reference": "a6c46e8134df2686da9ad44bc9b8f85443c03440",
"shasum": ""
},
"require": {
......@@ -707,9 +707,9 @@
"description": "SAML2 PHP library from SimpleSAMLphp",
"support": {
"issues": "https://github.com/simplesamlphp/saml2/issues",
"source": "https://github.com/simplesamlphp/saml2/tree/v4.6.8"
"source": "https://github.com/simplesamlphp/saml2/tree/v4.6.10"
},
"time": "2023-05-05T11:55:46+00:00"
"time": "2023-05-31T16:03:51+00:00"
},
{
"name": "simplesamlphp/simplesamlphp",
......@@ -2353,16 +2353,16 @@
},
{
"name": "symfony/cache",
"version": "v5.4.23",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
"reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107"
"reference": "e2013521c0f07473ae69a01fce0af78fc3ec0f23"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/cache/zipball/983c79ff28612cdfd66d8e44e1a06e5afc87e107",
"reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107",
"url": "https://api.github.com/repos/symfony/cache/zipball/e2013521c0f07473ae69a01fce0af78fc3ec0f23",
"reference": "e2013521c0f07473ae69a01fce0af78fc3ec0f23",
"shasum": ""
},
"require": {
......@@ -2430,7 +2430,7 @@
"psr6"
],
"support": {
"source": "https://github.com/symfony/cache/tree/v5.4.23"
"source": "https://github.com/symfony/cache/tree/v5.4.25"
},
"funding": [
{
......@@ -2446,7 +2446,7 @@
"type": "tidelift"
}
],
"time": "2023-04-21T15:38:51+00:00"
"time": "2023-06-22T08:06:06+00:00"
},
{
"name": "symfony/cache-contracts",
......@@ -2707,16 +2707,16 @@
},
{
"name": "symfony/dependency-injection",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "4645e032d0963fb614969398ca28e47605b1a7da"
"reference": "f0410c30a6c86bbce6c719c2b5cfc343362b982e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4645e032d0963fb614969398ca28e47605b1a7da",
"reference": "4645e032d0963fb614969398ca28e47605b1a7da",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f0410c30a6c86bbce6c719c2b5cfc343362b982e",
"reference": "f0410c30a6c86bbce6c719c2b5cfc343362b982e",
"shasum": ""
},
"require": {
......@@ -2776,7 +2776,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dependency-injection/tree/v5.4.24"
"source": "https://github.com/symfony/dependency-injection/tree/v5.4.25"
},
"funding": [
{
......@@ -2792,7 +2792,7 @@
"type": "tidelift"
}
],
"time": "2023-05-05T14:42:55+00:00"
"time": "2023-06-24T09:45:28+00:00"
},
{
"name": "symfony/deprecation-contracts",
......@@ -3098,16 +3098,16 @@
},
{
"name": "symfony/filesystem",
"version": "v5.4.23",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5"
"reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5",
"reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364",
"reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364",
"shasum": ""
},
"require": {
......@@ -3142,7 +3142,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/filesystem/tree/v5.4.23"
"source": "https://github.com/symfony/filesystem/tree/v5.4.25"
},
"funding": [
{
......@@ -3158,7 +3158,7 @@
"type": "tidelift"
}
],
"time": "2023-03-02T11:38:35+00:00"
"time": "2023-05-31T13:04:02+00:00"
},
{
"name": "symfony/finder",
......@@ -3225,16 +3225,16 @@
},
{
"name": "symfony/framework-bundle",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/framework-bundle.git",
"reference": "c06a56a47817d29318aaace1c655cbde16c998e8"
"reference": "c9d65bdab4a26e110ec4c87b3aa5de108c0f860d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/framework-bundle/zipball/c06a56a47817d29318aaace1c655cbde16c998e8",
"reference": "c06a56a47817d29318aaace1c655cbde16c998e8",
"url": "https://api.github.com/repos/symfony/framework-bundle/zipball/c9d65bdab4a26e110ec4c87b3aa5de108c0f860d",
"reference": "c9d65bdab4a26e110ec4c87b3aa5de108c0f860d",
"shasum": ""
},
"require": {
......@@ -3280,7 +3280,7 @@
"symfony/translation": "<5.3",
"symfony/twig-bridge": "<4.4",
"symfony/twig-bundle": "<4.4",
"symfony/validator": "<5.2",
"symfony/validator": "<5.3.11",
"symfony/web-profiler-bundle": "<4.4",
"symfony/workflow": "<5.2"
},
......@@ -3313,7 +3313,7 @@
"symfony/string": "^5.0|^6.0",
"symfony/translation": "^5.3|^6.0",
"symfony/twig-bundle": "^4.4|^5.0|^6.0",
"symfony/validator": "^5.2|^6.0",
"symfony/validator": "^5.3.11|^6.0",
"symfony/web-link": "^4.4|^5.0|^6.0",
"symfony/workflow": "^5.2|^6.0",
"symfony/yaml": "^4.4|^5.0|^6.0",
......@@ -3355,7 +3355,7 @@
"description": "Provides a tight integration between Symfony components and the Symfony full-stack framework",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/framework-bundle/tree/v5.4.24"
"source": "https://github.com/symfony/framework-bundle/tree/v5.4.25"
},
"funding": [
{
......@@ -3371,20 +3371,20 @@
"type": "tidelift"
}
],
"time": "2023-05-25T13:05:00+00:00"
"time": "2023-06-15T07:35:04+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5"
"reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/3c59f97f6249ce552a44f01b93bfcbd786a954f5",
"reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/f66be2706075c5f6325d2fe2b743a57fb5d23f6b",
"reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b",
"shasum": ""
},
"require": {
......@@ -3431,7 +3431,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.24"
"source": "https://github.com/symfony/http-foundation/tree/v5.4.25"
},
"funding": [
{
......@@ -3447,20 +3447,20 @@
"type": "tidelift"
}
],
"time": "2023-05-19T07:21:23+00:00"
"time": "2023-06-22T08:06:06+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1"
"reference": "f6c92fe64bbdad7616cb90663c24f6350f3ca464"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f38b722e1557eb3f487d351b48f5a1279b50e9d1",
"reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f6c92fe64bbdad7616cb90663c24f6350f3ca464",
"reference": "f6c92fe64bbdad7616cb90663c24f6350f3ca464",
"shasum": ""
},
"require": {
......@@ -3543,7 +3543,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v5.4.24"
"source": "https://github.com/symfony/http-kernel/tree/v5.4.25"
},
"funding": [
{
......@@ -3559,7 +3559,7 @@
"type": "tidelift"
}
],
"time": "2023-05-27T08:06:30+00:00"
"time": "2023-06-26T05:58:08+00:00"
},
{
"name": "symfony/polyfill-ctype",
......@@ -4210,16 +4210,16 @@
},
{
"name": "symfony/routing",
"version": "v5.4.22",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d"
"reference": "56bfc1394f7011303eb2e22724f9b422d3f14649"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/c2ac11eb34947999b7c38fb4c835a57306907e6d",
"reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d",
"url": "https://api.github.com/repos/symfony/routing/zipball/56bfc1394f7011303eb2e22724f9b422d3f14649",
"reference": "56bfc1394f7011303eb2e22724f9b422d3f14649",
"shasum": ""
},
"require": {
......@@ -4280,7 +4280,7 @@
"url"
],
"support": {
"source": "https://github.com/symfony/routing/tree/v5.4.22"
"source": "https://github.com/symfony/routing/tree/v5.4.25"
},
"funding": [
{
......@@ -4296,7 +4296,7 @@
"type": "tidelift"
}
],
"time": "2023-03-14T14:59:20+00:00"
"time": "2023-06-05T14:18:47+00:00"
},
{
"name": "symfony/service-contracts",
......@@ -4469,16 +4469,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v5.4.24",
"version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3"
"reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/8e12706bf9c68a2da633f23bfdc15b4dce5970b3",
"reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/82269f73c0f0f9859ab9b6900eebacbe54954ede",
"reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede",
"shasum": ""
},
"require": {
......@@ -4537,7 +4537,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.4.24"
"source": "https://github.com/symfony/var-dumper/tree/v5.4.25"
},
"funding": [
{
......@@ -4553,7 +4553,7 @@
"type": "tidelift"
}
],
"time": "2023-05-25T13:05:00+00:00"
"time": "2023-06-20T20:56:26+00:00"
},
{
"name": "symfony/var-exporter",
......
......@@ -103,4 +103,10 @@ $config = [
* Password to protect API write endpoint (has no effect if write is disabled)
*/
//'apiWritePasswordHash' => password_hash('ap1Wr1T3rP@S$'),
'ignoredIds' => [
'IDP' => ['spentityid1', 'spentityid2', 'spentityid3',],
'SP' => ['idpentityid1', 'idpentityid2', 'idpentityid3',],
],
];
......@@ -41,6 +41,8 @@ class Config
private const API_WRITE_PASSWORD_HASH = 'apiWritePasswordHash';
private const IGNORED_IDS = 'ignoredIds';
private $config;
private $store;
......@@ -63,6 +65,8 @@ class Config
private $apiWritePasswordHash;
private $ignoredIds;
private static $instance;
private function __construct()
......@@ -76,6 +80,7 @@ class Config
$this->requiredAuthSource = $this->config->getString(self::REQUIRE_AUTH_SOURCE, '');
$this->idAttribute = $this->config->getString(self::USER_ID_ATTRIBUTE, 'uid');
$this->apiWriteEnabled = $this->config->getBoolean(self::API_WRITE_ENABLED, false);
$this->ignoredIds = $this->config->getArray(self::IGNORED_IDS, []);
if ($this->apiWriteEnabled) {
$this->apiWriteUsername = $this->config->getString(self::API_WRITE_USERNAME);
if (empty(trim($this->apiWriteUsername))) {
......@@ -162,4 +167,9 @@ class Config
{
return $this->apiWritePasswordHash;
}
public function getIgnoredIds()
{
return $this->ignoredIds;
}
}
......@@ -60,6 +60,11 @@ class DatabaseCommand
private $mode;
private $ignoredIds = [
Config::MODE_IDP => [],
Config::MODE_SP => [],
];
private $escape_char = '`';
public function __construct()
......@@ -73,6 +78,7 @@ class DatabaseCommand
} else {
$this->unknownDriver();
}
$this->ignoredIds = array_merge($this->ignoredIds, $this->config->getIgnoredIds());
$this->tables = array_merge($this->tables, $this->config->getTables());
$this->mode = $this->config->getMode();
}
......@@ -269,6 +275,18 @@ class DatabaseCommand
return;
}
$entityId = $entities[$side][self::KEY_ID];
if (in_array($entityId, $this->ignoredIds[$side])) {
Logger::debug(
sprintf(
"%s EntityId of %s (%s) has been found in the ignored list. Not inserting login.",
self::DEBUG_PREFIX,
$side,
$entityId
)
);
return;
}
}
$ids = [];
......
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>perun-proxy-aai/renovate-config"]
"enabled": false
}
......@@ -229,7 +229,7 @@ function drawPieChart(dataName, viewCols, url, getEl) {
var processedData = processDataForPieChart(
getStatisticsData(dataName),
viewCols
viewCols,
);
var data = processedData.data;
......@@ -291,7 +291,7 @@ function drawPieChart(dataName, viewCols, url, getEl) {
evt,
"nearest",
{ intersect: true },
false
false,
);
if (activePoints.length) {
window.location.href =
......@@ -306,7 +306,7 @@ function getDrawChart(side) {
null,
"loginCountPer" + side,
[0, 2],
getStatisticsData("module_url_base") + "detail.php?side=" + side + "&id="
getStatisticsData("module_url_base") + "detail.php?side=" + side + "&id=",
);
}
......@@ -317,7 +317,7 @@ function drawCountTable(
dataName,
allowHTML,
url,
getEl
getEl,
) {
var el = getEl();
if (!el) return;
......@@ -384,7 +384,7 @@ function getDrawTable(side) {
2,
"loginCountPer" + side,
false,
getStatisticsData("module_url_base") + "detail.php?side=" + side + "&id="
getStatisticsData("module_url_base") + "detail.php?side=" + side + "&id=",
);
}
......@@ -396,7 +396,7 @@ function getDrawCountTable(side) {
2,
"accessCounts",
true,
null
null,
);
}
......@@ -421,7 +421,7 @@ function chartInit() {
idLoadCallback(side + "Table", getDrawTable(side));
idLoadCallback(
"detail" + side + "Chart",
drawPieChart.bind(null, "accessCounts", [0, 2], null)
drawPieChart.bind(null, "accessCounts", [0, 2], null),
);
idLoadCallback("detail" + side + "Table", getDrawCountTable(side));
});
......