diff --git a/modules/admin/src/Controller/Federation.php b/modules/admin/src/Controller/Federation.php index 9ea17f68a830456ef18f746c714fc688732d2acb..43cbb00fa2b50f37ce0c44c40c57446b786d3d5c 100644 --- a/modules/admin/src/Controller/Federation.php +++ b/modules/admin/src/Controller/Federation.php @@ -199,10 +199,10 @@ class Federation $metadataBase = Module::getModuleURL('saml/idp/metadata'); if (count($idps) > 1) { foreach ($idps as $index => $idp) { - $idp['url'] = $metadataBase . '?idpentityid=' . urlencode($idp['entityID']); + $idp['url'] = $metadataBase . '?idpentityid=' . urlencode($idp['entityid']); $idp['metadata-set'] = 'saml20-idp-hosted'; $idp['metadata-index'] = $index; - $idp['metadata_array'] = SAML2_IdP::getHostedMetadata($idp['entityID']); + $idp['metadata_array'] = SAML2_IdP::getHostedMetadata($idp['entityid']); $saml2entities[] = $idp; } } else { @@ -214,14 +214,14 @@ class Federation } foreach ($saml2entities as $index => $entity) { - Assert::validURI($entity['entityID']); + Assert::validURI($entity['entityid']); Assert::maxLength( - $entity['entityID'], + $entity['entityid'], C::SAML2INT_ENTITYID_MAX_LENGTH, sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH) ); - $builder = new SAMLBuilder($entity['entityID']); + $builder = new SAMLBuilder($entity['entityid']); $builder->addMetadataIdP20($entity['metadata_array']); $builder->addOrganizationInfo($entity['metadata_array']); @@ -245,10 +245,10 @@ class Federation if (count($idps) > 1) { foreach ($idps as $index => $idp) { $idp['url'] = Module::getModuleURL('adfs/idp/metadata/?idpentityid=' . - urlencode($idp['entityID'])); + urlencode($idp['entityid'])); $idp['metadata-set'] = 'adfs-idp-hosted'; $idp['metadata-index'] = $index; - $idp['metadata_array'] = ADFS_IdP::getHostedMetadata($idp['entityID']); + $idp['metadata_array'] = ADFS_IdP::getHostedMetadata($idp['entityid']); $adfsentities[] = $idp; } } else { @@ -260,14 +260,14 @@ class Federation } foreach ($adfsentities as $index => $entity) { - Assert::validURI($entity['entityID']); + Assert::validURI($entity['entityid']); Assert::maxLength( - $entity['entityID'], + $entity['entityid'], C::SAML2INT_ENTITYID_MAX_LENGTH, sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH) ); - $builder = new SAMLBuilder($entity['entityID']); + $builder = new SAMLBuilder($entity['entityid']); $builder->addSecurityTokenServiceType($entity['metadata_array']); $builder->addOrganizationInfo($entity['metadata_array']); if (isset($entity['metadata_array']['contacts'])) { @@ -360,7 +360,7 @@ class Federation // sanitize the resulting array unset($metadata['UIInfo']); unset($metadata['metadata-set']); - unset($metadata['entityID']); + unset($metadata['entityid']); // sanitize the attributes array to remove friendly names if (isset($metadata['attributes']) && is_array($metadata['attributes'])) { @@ -372,7 +372,7 @@ class Federation $entities[] = [ 'authid' => $source->getAuthId(), - 'entityID' => $source->getEntityId(), + 'entityid' => $source->getEntityId(), 'type' => 'saml20-sp-hosted', 'url' => $source->getMetadataURL(), 'name' => $name, @@ -424,7 +424,7 @@ class Federation ]; } - // transpose from $entities[entityID][type] to $output[type][entityID] + // transpose from $entities[entityid][type] to $output[type][entityid] $arrayUtils = new Utils\Arrays(); $output = $arrayUtils->transpose($entities); @@ -527,13 +527,13 @@ class Federation { $this->authUtils->requireAdmin(); - $entityId = $request->query->get('entityID'); + $entityId = $request->query->get('entityid'); $set = $request->query->get('set'); $metadata = $this->mdHandler->getMetaData($entityId, $set); $t = new Template($this->config, 'admin:show_metadata.twig'); - $t->data['entityID'] = $entityId; + $t->data['entityid'] = $entityId; $t->data['metadata'] = VarExporter::export($metadata); return $t; } diff --git a/modules/admin/templates/federation.twig b/modules/admin/templates/federation.twig index 73cae23537a750fd8b5342cb7dc78fa5eca7e00b..a0b54ef97a166022d3c921d2a8636f4bcbb1cb0b 100644 --- a/modules/admin/templates/federation.twig +++ b/modules/admin/templates/federation.twig @@ -22,13 +22,13 @@ <dl> <dt>{{ set|entityDisplayName }}</dt> - <dd>EntityID: <code>{{ set.entityID }}</code></dd> + <dd>EntityID: <code>{{ set.entityid }}</code></dd> {%- if set.deprecated is defined and set.deprecated %} <dd><span class="entity-deprecated">{{ 'Deprecated'|trans }}</span></dd> {%- endif %} {% set index = attribute(set, 'metadata-index')|default(false) %} - {%- if index and set.entityID != index %} + {%- if index and set.entityid != index %} <dd>Index: <code>{{ index }}</code></dd> {%- endif %} @@ -67,7 +67,7 @@ title="{% trans %}Copy to clipboard{% endtrans %}"><span class="fa fa-copy"></span></a> </div> <div id="php-{{ key }}" class="code-box-content php"> - {#- #}$metadata['{{ set.entityID }}'] = {{ set.metadata_array }};{# -#} + {#- #}$metadata['{{ set.entityid }}'] = {{ set.metadata_array }};{# -#} </div> </dd> {%- for cert in set.certificates %} @@ -102,9 +102,9 @@ <fieldset class="fancyfieldset"> <legend>{{ mdtype[key]|trans }}</legend> <ul> - {% for entityID, entity in set %} + {% for entityid, entity in set %} - <li><a href="{{ moduleURL('admin/federation/show?entityid=' ~ (entity.entityID|url_encode) ~ '&set=' ~ key) }}"> + <li><a href="{{ moduleURL('admin/federation/show?entityid=' ~ (entity.entityid|url_encode) ~ '&set=' ~ key) }}"> {{- entity | entityDisplayName -}} </a> {% if entity.expire is defined %} diff --git a/modules/admin/templates/show_metadata.twig b/modules/admin/templates/show_metadata.twig index fe5b00e2a8b7ad28e0a2161be51f558c5e9dcf5a..24fdc3ea9235150343e333eebe5b1793382106d4 100644 --- a/modules/admin/templates/show_metadata.twig +++ b/modules/admin/templates/show_metadata.twig @@ -9,7 +9,7 @@ title="{% trans %}Copy to clipboard{% endtrans %}"><span class="fa fa-copy"></span></a> </div> <div id="metadata" class="code-box-content php"> - {#- #}$metadata["{{ entityID }}"] => {{ metadata|escape }};{# -#} + {#- #}$metadata["{{ entityid }}"] => {{ metadata|escape }};{# -#} </div> </div> <div class="center"> diff --git a/modules/core/src/Auth/Process/StatisticsWithAttribute.php b/modules/core/src/Auth/Process/StatisticsWithAttribute.php index f2eaa154e8776c15efe8c2a79d687ca6e6a4b947..bcbdd20d815e70c0063ada4bca5b6b4b213f9744 100644 --- a/modules/core/src/Auth/Process/StatisticsWithAttribute.php +++ b/modules/core/src/Auth/Process/StatisticsWithAttribute.php @@ -111,7 +111,7 @@ class StatisticsWithAttribute extends Auth\ProcessingFilter if (isset($state[$direction]['core:statistics-id'])) { return $state[$direction]['core:statistics-id']; } else { - return $state[$direction]['entityID']; + return $state[$direction]['entityid']; } } return 'NA'; diff --git a/modules/saml/src/IdP/SAML2.php b/modules/saml/src/IdP/SAML2.php index 4c3eaff62ed4510b765da6787e4aad38687c6a1a..25eb69909d720df7fc7a59f4c6dd43ae54022d57 100644 --- a/modules/saml/src/IdP/SAML2.php +++ b/modules/saml/src/IdP/SAML2.php @@ -58,7 +58,7 @@ class SAML2 Assert::notNull($state['saml:ConsumerURL']); $spMetadata = $state["SPMetadata"]; - $spEntityId = $spMetadata['entityID']; + $spEntityId = $spMetadata['entityid']; $spMetadata = Configuration::loadFromArray( $spMetadata, '$metadata[' . var_export($spEntityId, true) . ']' @@ -105,7 +105,7 @@ class SAML2 $statsData = [ 'spEntityID' => $spEntityId, - 'idpEntityID' => $idpMetadata->getString('entityID'), + 'idpEntityID' => $idpMetadata->getString('entityid'), 'protocol' => 'saml2', ]; if (isset($state['saml:AuthnRequestReceivedAt'])) { @@ -134,7 +134,7 @@ class SAML2 Assert::notNull($state['saml:ConsumerURL']); $spMetadata = $state["SPMetadata"]; - $spEntityId = $spMetadata['entityID']; + $spEntityId = $spMetadata['entityid']; $spMetadata = Configuration::loadFromArray( $spMetadata, '$metadata[' . var_export($spEntityId, true) . ']' @@ -168,7 +168,7 @@ class SAML2 $statsData = [ 'spEntityID' => $spEntityId, - 'idpEntityID' => $idpMetadata->getString('entityID'), + 'idpEntityID' => $idpMetadata->getString('entityid'), 'protocol' => 'saml2', 'error' => $status, ]; @@ -440,7 +440,7 @@ class SAML2 Stats::log('saml:idp:AuthnRequest', [ 'spEntityID' => $spEntityId, - 'idpEntityID' => $idpMetadata->getString('entityID'), + 'idpEntityID' => $idpMetadata->getString('entityid'), 'forceAuthn' => $forceAuthn, 'isPassive' => $isPassive, 'protocol' => 'saml2', @@ -531,7 +531,7 @@ class SAML2 Stats::log('saml:idp:LogoutRequest:sent', [ 'spEntityID' => $association['saml:entityID'], - 'idpEntityID' => $idpMetadata->getString('entityID'), + 'idpEntityID' => $idpMetadata->getString('entityid'), ]); /** @var array $dst */ @@ -586,7 +586,7 @@ class SAML2 Stats::log('saml:idp:LogoutResponse:sent', [ 'spEntityID' => $spEntityId, - 'idpEntityID' => $idpMetadata->getString('entityID'), + 'idpEntityID' => $idpMetadata->getString('entityid'), 'partial' => $partial ]); @@ -639,7 +639,7 @@ class SAML2 Logger::info('Received SAML 2.0 LogoutResponse from: ' . var_export($spEntityId, true)); $statsData = [ 'spEntityID' => $spEntityId, - 'idpEntityID' => $idpMetadata->getString('entityID'), + 'idpEntityID' => $idpMetadata->getString('entityid'), ]; if (!$message->isSuccess()) { $statsData['error'] = $message->getStatus(); @@ -662,11 +662,11 @@ class SAML2 Logger::info('Received SAML 2.0 LogoutRequest from: ' . var_export($spEntityId, true)); Stats::log('saml:idp:LogoutRequest:recv', [ 'spEntityID' => $spEntityId, - 'idpEntityID' => $idpMetadata->getString('entityID'), + 'idpEntityID' => $idpMetadata->getString('entityid'), ]); $spStatsId = $spMetadata->getOptionalString('core:statistics-id', $spEntityId); - Logger::stats('saml20-idp-SLO spinit ' . $spStatsId . ' ' . $idpMetadata->getString('entityID')); + Logger::stats('saml20-idp-SLO spinit ' . $spStatsId . ' ' . $idpMetadata->getString('entityid')); $state = [ 'Responder' => ['\SimpleSAML\Module\saml\IdP\SAML2', 'sendLogoutResponse'], @@ -796,7 +796,7 @@ class SAML2 $metadata = [ 'metadata-set' => 'saml20-idp-hosted', - 'entityID' => $entityid, + 'entityid' => $entityid, 'SingleSignOnService' => $sso, 'SingleLogoutService' => $slo, 'NameIDFormat' => $config->getOptionalArrayizeString('NameIDFormat', [Constants::NAMEID_TRANSIENT]), @@ -1111,11 +1111,11 @@ class SAML2 } $issuer = new Issuer(); - $issuer->setValue($idpMetadata->getString('entityID')); + $issuer->setValue($idpMetadata->getString('entityid')); $issuer->setFormat(Constants::NAMEID_ENTITY); $a->setIssuer($issuer); - $audience = array_merge([$spMetadata->getString('entityID')], $spMetadata->getOptionalArray('audience', [])); + $audience = array_merge([$spMetadata->getString('entityid')], $spMetadata->getOptionalArray('audience', [])); $a->setValidAudiences($audience); $a->setNotBefore($now - 30); @@ -1241,7 +1241,7 @@ class SAML2 $spNameQualifier = $spMetadata->getOptionalString('SPNameQualifier', null); if ($spNameQualifier === null) { - $spNameQualifier = $spMetadata->getString('entityID'); + $spNameQualifier = $spMetadata->getString('entityid'); } $nameId = new NameID(); @@ -1324,7 +1324,7 @@ class SAML2 $key->loadKey($pemKey); } else { throw new Error\ConfigurationError( - 'Missing encryption key for entity `' . $spMetadata->getString('entityID') . '`', + 'Missing encryption key for entity `' . $spMetadata->getString('entityid') . '`', $spMetadata->getString('metadata-set') . '.php', null ); @@ -1397,7 +1397,7 @@ class SAML2 $r = new Response(); $issuer = new Issuer(); - $issuer->setValue($idpMetadata->getString('entityID')); + $issuer->setValue($idpMetadata->getString('entityid')); $issuer->setFormat(Constants::NAMEID_ENTITY); $r->setIssuer($issuer); $r->setDestination($consumerURL); diff --git a/src/SimpleSAML/Metadata/MetaDataStorageHandler.php b/src/SimpleSAML/Metadata/MetaDataStorageHandler.php index efeb4377f22128f2df6e46d50fdab6aba46b8486..5d8727e759916452e4368e549dd4a1141316abf8 100644 --- a/src/SimpleSAML/Metadata/MetaDataStorageHandler.php +++ b/src/SimpleSAML/Metadata/MetaDataStorageHandler.php @@ -328,7 +328,7 @@ class MetaDataStorageHandler implements ClearableState $metadata['metadata-index'] = $entityId; $metadata['metadata-set'] = $set; - Assert::keyExists($metadata, 'entityID'); + Assert::keyExists($metadata, 'entityid'); return $metadata; } } @@ -377,12 +377,12 @@ class MetaDataStorageHandler implements ClearableState $result = array_merge($srcList, $result); } foreach ($result as $remote_provider) { - if (sha1($remote_provider['entityID']) == $sha1) { + if (sha1($remote_provider['entityid']) == $sha1) { $remote_provider['metadata-set'] = $set; return Configuration::loadFromArray( $remote_provider, - $set . '/' . var_export($remote_provider['entityID'], true) + $set . '/' . var_export($remote_provider['entityid'], true) ); } } diff --git a/src/SimpleSAML/Metadata/MetaDataStorageSource.php b/src/SimpleSAML/Metadata/MetaDataStorageSource.php index 8367dff4f0952ccd7f771a4866a67161bca68106..b22b5aaef4e51e0ad3c9b1a8a408643b24087869 100644 --- a/src/SimpleSAML/Metadata/MetaDataStorageSource.php +++ b/src/SimpleSAML/Metadata/MetaDataStorageSource.php @@ -159,7 +159,7 @@ abstract class MetaDataStorageSource if ($hostPath === $entry['host']) { if ($type === 'entityid') { - return $entry['entityID']; + return $entry['entityid']; } else { return $index; } @@ -214,7 +214,7 @@ abstract class MetaDataStorageSource foreach ($cidrHints as $hint_entry) { if ($netUtils->ipCIDRcheck($hint_entry, $ip)) { if ($type === 'entityid') { - return $entry['entityID']; + return $entry['entityid']; } else { return $index; } @@ -314,7 +314,7 @@ abstract class MetaDataStorageSource return $index; } - if ($entry['entityID'] === $entityId) { + if ($entry['entityid'] === $entityId) { if ($entry['host'] === '__DEFAULT__' || $entry['host'] === $currentHost) { return $index; } diff --git a/src/SimpleSAML/XHTML/Template.php b/src/SimpleSAML/XHTML/Template.php index 2a8a6f1bdc14b1a7175a2b94b5deb1d56c12ab8c..5cfb6c86ba1b9b99af94f60e8065bcc3027365c0 100644 --- a/src/SimpleSAML/XHTML/Template.php +++ b/src/SimpleSAML/XHTML/Template.php @@ -661,7 +661,7 @@ class Template extends Response return $data['OrganizationName'][$language]; } } - return $data['entityID']; + return $data['entityid']; } /**