diff --git a/modules/aggregator/config-templates/aggregator.php b/modules/aggregator/config-templates/aggregator.php index 5405b59a174364313358a79c9c9bb8559d537df5..868ced2a562adf5227b8569ce61979a2a9a02fe7 100644 --- a/modules/aggregator/config-templates/aggregator.php +++ b/modules/aggregator/config-templates/aggregator.php @@ -16,6 +16,10 @@ $config = array( 'maxCache' => 60*60*24, // 24 hour cache time 'maxDuration' => 60*60*24*5, // Maximum 5 days duration on ValidUntil. + // If base64 encoded for entity is already cached in the entity, should we + // reconstruct the XML or re-use. + 'reconstruct' => TRUE, + /* Whether metadata should be signed. */ 'sign.enable' => FALSE, diff --git a/modules/aggregator/www/index.php b/modules/aggregator/www/index.php index b866f42205ecac7d4187c793b6475ec2ae1fd576..08f7439b8ff2ce891b58b9c8e6101107ee31e851 100644 --- a/modules/aggregator/www/index.php +++ b/modules/aggregator/www/index.php @@ -11,6 +11,8 @@ $metadataSets = array( $globalConfig = SimpleSAML_Configuration::getInstance(); $aggregatorConfig = SimpleSAML_Configuration::getConfig('aggregator.php'); + +$reconstruct = $aggregatorConfig->getBoolean('reconstruct', FALSE); $aggregators = $aggregatorConfig->getArray('aggragators'); if (!array_key_exists('id', $_GET)) { @@ -102,7 +104,7 @@ foreach ($entities as $entity => $sets) { } } - if (is_string($entityDescriptor)) { + if (is_string($entityDescriptor) && !$reconstruct) { /* All metadata sets for the entity contain the same entity descriptor. Use that one. */ $tmp = new DOMDocument(); $tmp->loadXML(base64_decode($entityDescriptor));