{"id":19794135,"url":"https://github.com/simplesamlphp/simplesamlphp-module-aggregator2","last_synced_at":"2025-08-17T19:33:53.323Z","repository":{"id":23084221,"uuid":"26438027","full_name":"simplesamlphp/simplesamlphp-module-aggregator2","owner":"simplesamlphp","description":"A SimpleSAMLphp module for metadata aggregation.","archived":false,"fork":false,"pushed_at":"2025-08-12T11:33:21.000Z","size":198,"stargazers_count":4,"open_issues_count":2,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-12T13:35:31.932Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://simplesamlphp.org","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplesamlphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-11-10T13:46:16.000Z","updated_at":"2025-08-12T11:33:23.000Z","dependencies_parsed_at":"2024-08-26T23:44:55.338Z","dependency_job_id":"5d376aac-99dc-4768-84b1-14c4a5adff1f","html_url":"https://github.com/simplesamlphp/simplesamlphp-module-aggregator2","commit_stats":{"total_commits":132,"total_committers":6,"mean_commits":22.0,"dds":"0.46212121212121215","last_synced_commit":"29f299953667861052ed9cb29881576eebd2f2d1"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/simplesamlphp/simplesamlphp-module-aggregator2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-aggregator2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-aggregator2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-aggregator2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-aggregator2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplesamlphp","download_url":"https://codeload.github.com/simplesamlphp/simplesamlphp-module-aggregator2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-aggregator2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270898687,"owners_count":24664704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T07:12:11.219Z","updated_at":"2025-08-17T19:33:53.242Z","avatar_url":"https://github.com/simplesamlphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aggregator 2\n\n![Build Status](https://github.com/simplesamlphp/simplesamlphp-module-aggregator2/actions/workflows/php.yml/badge.svg)\n[![Coverage Status](https://codecov.io/gh/simplesamlphp/simplesamlphp-module-aggregator2/branch/master/graph/badge.svg)](https://codecov.io/gh/simplesamlphp/simplesamlphp-module-aggregator2)\n[![Type coverage](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-aggregator2/coverage.svg)](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-aggregator2)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/simplesamlphp/simplesamlphp-module-aggregator2/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/simplesamlphp/simplesamlphp-module-aggregator2/?branch=master)\n\nThis is a SimpleSAMLphp module for metadata aggregation. It is designed to\npreserve most of the common metadata items, and it also attempts to preserve\nunknown elements. Metadata sources are parsed and rebuilt, so small\ndifferences between the original sources and the metadata generated may occur.\nMore specifically:\n\n* Signatures will be removed from every signed metadata source.\n* All sources will be wrapped up in an EntitiesDescriptor element.\n\nNote: This aggregator works only with XML metadata, and does its work\nindependently of other parts of SimpleSAMLphp, such as the metarefresh module.\n\n## Installation\n\nOnce you have installed SimpleSAMLphp, installing this module is very simple.\nJust execute the following command in the root of your SimpleSAMLphp\ninstallation:\n\n```bash\nvendor/bin/composer require simplesamlphp/simplesamlphp-module-aggregator2:dev-master\n```\n\nwhere `dev-master` instructs Composer to install the `master` branch from the Git\nrepository. See the [releases](releases) available if you want to use a stable version\nof the module.\n\n[releases]: https://github.com/simplesamlphp/simplesamlphp-module-aggregator2/releases\n\nTo use this module, enable the aggregator2 module: in `config.php`, search\nfor the `module.enable` key and set `aggregator2` to true:\n\n```php\n    'module.enable' =\u003e [\n         'aggregator2' =\u003e true,\n         …\n    ],\n```\n\n## Configuration\n\nThis module is configured through the `config/module_aggregator2.php`\nconfiguration file.\nAn example file is available in `modules/aggregator2/config-templates/`:\n\n```bash\n    cp modules/aggregator2/config-templates/module_aggregator2.php config/\n```\n\nThe configuration file contains one or more aggregators in the configuration\narray. The index for each item in the configuration array gives the identifier\nof the aggregator.\n\n### Aggregator entry configuration\n\nThe aggregator can be configured with the following options:\n\n* `sources`:   Array which describes a source from which we should\n               download metadata.\n\n* `cron.tag`:   Can be used to run periodical updates.\n                It will only be useful when you have metadata caching enabled.\n\n* `cache.directory`:   The path to a directory where the aggregator will cache\n                       downloaded and generated metadata.\n                       This directory must be writable by the web server.\n\n* `cache.generated`:   The number of seconds the generated metadata will\n                       be cached for.\n\n    *Note*: generated metadata will not be cached if this option is unset.\n\n* `valid.length`:   The number of seconds the generated metadata should\n                    be valid for. This is used to set the `validUntil`\n                    attribute on the generated metadata. Defaults to one week.\n\n    *Note*: The value of the `cache.generated` option must be smaller than the\n            value here, otherwise you would end up returning outdated metadata.\n\n* `ssl.cafile`:   This option enables validation of the server certificate when\n                  fetching metadata over HTTPS. It must be a path pointing to a\n                  PEM file which contains one or more valid CA certificates.\n                  The path can be either absolute or relative to the `cert`\n                  directory.\n\n    *Note*: This option can be overridden for each metadata source.\n\n* `sign.privatekey`:   The private key that should be used to sign the\n                       resulting metadata, in PEM format. The path to the\n                       private key can be either absolute or relative to the\n                       `cert` directory. Skip this option or set it to `NULL`\n                       if you don't want to sign the generated metadata.\n\n* `sign.privatekey_pass`:   The password used to encrypt the private key. If\n                            this option is unset, the private key is assumed\n                            to be unencrypted.\n\n* `sign.certificate`:   The certificate that contains the public key\n                        corresponding to the private key, in PEM format. The\n                        path to the certificate can be either absolute or\n                        relative to the `cert` directory.\n\n    *Note*: This certificate will be included in the generated metadata.\n\n* `sign.algorithm`:   The algorithm that should be used to sign the resulting\n                      metadata. The following algorithms are supported:\n\n  * `http://www.w3.org/2000/09/xmldsig#rsa-sha1`\n\n  * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256`\n\n  * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384`\n\n  * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512`\n\n    *Note*: Defaults to `http://www.w3.org/2000/09/xmldsig#rsa-sha256.`.\n            For backwards compatibility it is possible to set it to\n            `http://www.w3.org/2000/09/xmldsig#rsa-sha1`, however, it is\n            recommended to use another algorithm as SHA1 is considered broken.\n\n* `RegistrationInfo`:   Allows to specify information about the registrar of\n                        the generated metadata. Please refer to the\n                        [MDRPI extension](MDRPI) document for further\n                        information.\n\n* `exclude`:   Allows to exclude one or more entities from the generated\n               metadata, represented by their entity IDs. Can be either a\n               string with the entity ID of a single entity, or an array of\n               strings with all the entity IDs to exclude from the result.\n\n    *Note*: this option will not exclude the entities from the cached metadata\n            sources. It will only act as a default configuration for the\n            generation of the metadata aggregate, and therefore can be\n            overridden per request.\n\n* `filter`:   One or more sets representing the types of entities that should\n              be included in the generated metadata. Filtering will be\n              performed depending on the role of the entity, as well as the\n              protocols it supports. Can be either a string with the set of\n              entities desired, or an array of strings with all the different\n              sets to filter by. The following sets are available:\n\n  * `saml2`: all the entities that support the SAML 2.0 protocol.\n\n  * `saml20-idp`: all the identity providers that support the\n                  SAML 2.0 protocol.\n\n  * `saml20-sp`: all the service providers that support the\n                 SAML 2.0 protocol.\n\n  * `saml20-aa`: all the attribute authorities that support the\n                 SAML 2.0 protocol.\n\n    *Note*: this option will not filter the entities in the cached metadata\n            sources. It will only act as a default configuration for the\n            generation of the metadata aggregate, and therefore can be\n            overridden per request.\n\n[MDRPI]: https://simplesamlphp.org/docs/stable/simplesamlphp-metadata-extensions-rpi\n\n### Aggregator source configuration\n\n* `url`:   The URL the metadata should be fetched from.\n\n* `ssl.cafile`:   This option enables validation of the server certificate when\n                  fetching metadata over HTTPS. It must be a path pointing to a\n                  PEM file which contains one or more valid CA certificates.\n                  The path can be either absolute or relative to the `cert`\n                  directory.\n\n    *Note*: This option overrides the option with the same name in the root\n            configuration for the an aggregator.\n\n* `cert`:   The certificate that should be used to check the signature of this\n            metadata document, in PEM format. The path to the certificate can\n            be either absolute or relative to the `cert` directory.\n\n    *Note*: This cannot be a CA certificate. Validation against CA certificates\n            (PKI) is not supported.\n\n### Retrieving aggregated metadata\n\nYou will find a link to the aggregator2 module in the *Federation* tab of\nSimpleSAMLphp's web interface. There you will be able to see a list of all\nthe metadata aggregates you have configured, and see or download them in\ndifferent formats.\n\nIn general, metadata aggregates can be downloaded from the following location:\n\n  `http://\u003cYOUR HOST\u003e/simplesaml/modules.php/aggregator2/get?id=\u003caggregator-id\u003e`\n\nwhere the *aggregator id* is the identifier you used as an index for the\naggregator configuration array. Additionally, you can use the following\nparameters to customize the resulting metadata aggregate:\n\n* `exclude`:   Allows to exclude one or more entities from the generated\n               metadata, represented by their entity IDs. If you need to\n               specify more than one entity, use a comma-separated list\n               of entity IDs.\n\n* `filter`:   Allows to filter by sets specifying the type of entities or the\n              protocols they support. If you need to specify more than one set,\n              use a comma-separated list. See the configuration option with the\n              same name to get a list of all the sets supported.\n\n### Asynchronous metadata updates\n\nBy default, the `aggregator2` module will update the metadata upon receiving a\nrequest. For performance reasons, it is recommended to run the updates\nasynchronously. By doing this, the aggregated metadata will be generated in\nthe background.\n\nTo enable this, you must configure a cache directory with the `cache.directory`\noption. This directory must be writable by the web server. You can then enable\ncaching of generated metadata by setting the `cache.generated` option to the\nnumber of seconds the metadata should be cached.\n\nYou will now have a configuration that caches both downloaded and generated\nmetadata. However, it will still update the metadata when the user accesses\nthe aggregator endpoint. To update the generated metadata in the background,\nyou must add a `cron.tag` option. This option must reference a cron tag entry\nconfigured in `module_cron.php`. Once this is done, your aggregated metadata\nwill be updated every time that cron entry is executed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-aggregator2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-aggregator2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-aggregator2/lists"}