Skip to content

Commit 5c64f43

Browse files
committed
Rename trust_mark_id to trust_mark_type
1 parent be9cc74 commit 5c64f43

File tree

19 files changed

+94
-93
lines changed

19 files changed

+94
-93
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"psr/container": "^2.0",
3232
"psr/log": "^3",
3333
"simplesamlphp/composer-module-installer": "^1.3",
34-
"simplesamlphp/openid": "^0",
34+
"simplesamlphp/openid": "dev-oidfed-draft-43",
3535
"spomky-labs/base64url": "^2.0",
3636
"symfony/expression-language": "^6.3",
3737
"symfony/psr-http-message-bridge": "^7.1",

config/module_oidc.php.dist

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -375,20 +375,20 @@ $config = [
375375
// 'eyJ...GHg',
376376
],
377377

378-
// (optional) Federation Trust Marks for dynamic fetching. An array of key-value pairs, where key is Trust Mark ID
379-
// and value is Trust Mark Issuer ID, each representing a Trust Mark issued to this entity. Each Trust Mark ID
380-
// in this array will be dynamically fetched from noted Trust Mark Issuer as necessary. If federation caching
381-
// is enabled (recommended), fetched Trust Marks will also be cached until their expiry.
378+
// (optional) Federation Trust Marks for dynamic fetching. An array of key-value pairs, where key is Trust Mark Type
379+
// and value is Trust Mark Issuer ID, each representing a Trust Mark issued to this entity. Each Trust Mark Type
380+
// in this array will be dynamically fetched from the noted Trust Mark Issuer as necessary. If federation
381+
// caching is enabled (recommended), fetched Trust Marks will also be cached until their expiry.
382382
ModuleConfig::OPTION_FEDERATION_DYNAMIC_TRUST_MARKS => [
383-
// 'trust-mark-id' => 'trust-mark-issuer-id',
383+
// 'trust-mark-type' => 'trust-mark-issuer-id',
384384
],
385385

386386
// (optional) Federation participation limit by Trust Marks. This is an array with the following format:
387387
// [
388388
// 'trust-anchor-id' => [
389389
// 'limit-id' => [
390-
// 'trust-mark-id',
391-
// 'trust-mark-id-2',
390+
// 'trust-mark-type',
391+
// 'trust-mark-type-2',
392392
// ],
393393
// ],
394394
// ],
@@ -399,13 +399,13 @@ $config = [
399399
'https://ta.example.org/' => [
400400
// Entities must have (at least) one Trust Mark from the list below.
401401
\SimpleSAML\Module\oidc\Codebooks\LimitsEnum::OneOf->value => [
402-
'trust-mark-id',
403-
'trust-mark-id-2',
402+
'trust-mark-type',
403+
'trust-mark-type-2',
404404
],
405405
// Entities must have all Trust Marks from the list below.
406406
\SimpleSAML\Module\oidc\Codebooks\LimitsEnum::AllOf->value => [
407-
'trust-mark-id-3',
408-
'trust-mark-id-4',
407+
'trust-mark-type-3',
408+
'trust-mark-type-4',
409409
],
410410
],
411411
],

locales/en/LC_MESSAGES/oidc.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ msgstr ""
491491
msgid "Trust Anchors"
492492
msgstr ""
493493

494-
msgid "Trust Mark ID"
494+
msgid "Trust Mark Type"
495495
msgstr ""
496496

497497
msgid ""

locales/es/LC_MESSAGES/oidc.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ msgstr ""
491491
msgid "Trust Anchors"
492492
msgstr ""
493493

494-
msgid "Trust Mark ID"
494+
msgid "Trust Mark Type"
495495
msgstr ""
496496

497497
msgid ""

locales/fr/LC_MESSAGES/oidc.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ msgstr ""
491491
msgid "Trust Anchors"
492492
msgstr ""
493493

494-
msgid "Trust Mark ID"
494+
msgid "Trust Mark Type"
495495
msgstr ""
496496

497497
msgid ""

locales/hr/LC_MESSAGES/oidc.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ msgstr "IDevi sidra povjerenja"
525525
msgid "Trust Anchors"
526526
msgstr "Sidra povjerenja"
527527

528-
msgid "Trust Mark ID"
528+
msgid "Trust Mark Type"
529529
msgstr "ID oznake povjerenja"
530530

531531
msgid ""

locales/it/LC_MESSAGES/oidc.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ msgstr ""
491491
msgid "Trust Anchors"
492492
msgstr ""
493493

494-
msgid "Trust Mark ID"
494+
msgid "Trust Mark Type"
495495
msgstr ""
496496

497497
msgid ""

locales/nl/LC_MESSAGES/oidc.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ msgstr "Vertrouwde anker-ID's"
459459
msgid "Trust Anchors"
460460
msgstr "Vertrouw op ankers"
461461

462-
msgid "Trust Mark ID"
462+
msgid "Trust Mark Type"
463463
msgstr "Vertrouwensmerk-ID"
464464

465465
msgid "Trust Mark validation passed (there were no warnings or errors during validation)."

src/Controllers/Admin/ConfigController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ function (string $token): Federation\TrustMark {
8080

8181
if (is_array($dynamicTrustMarks = $this->moduleConfig->getFederationDynamicTrustMarks())) {
8282
/**
83-
* @var non-empty-string $trustMarkId
83+
* @var non-empty-string $trustMarkType
8484
* @var non-empty-string $trustMarkIssuerId
8585
*/
86-
foreach ($dynamicTrustMarks as $trustMarkId => $trustMarkIssuerId) {
86+
foreach ($dynamicTrustMarks as $trustMarkType => $trustMarkIssuerId) {
8787
$trustMarkIssuerConfigurationStatement = $this->federation->entityStatementFetcher()
8888
->fromCacheOrWellKnownEndpoint($trustMarkIssuerId);
8989

9090
$trustMarks[] = $this->federation->trustMarkFetcher()->fromCacheOrFederationTrustMarkEndpoint(
91-
$trustMarkId,
91+
$trustMarkType,
9292
$this->moduleConfig->getIssuer(),
9393
$trustMarkIssuerConfigurationStatement,
9494
);

src/Controllers/Admin/TestController.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232
$this->authorization->requireAdmin(true);
3333

3434
$this->arrayLogger->setWeight(ArrayLogger::WEIGHT_WARNING);
35-
// Let's create new Federation instance so we can inject our debug logger and go without cache.
35+
// Let's create a new Federation instance so we can inject our debug logger and go without cache.
3636
$this->federationWithArrayLogger = new Federation(
3737
supportedAlgorithms: $this->federation->supportedAlgorithms(),
3838
cache: null,
@@ -114,31 +114,31 @@ public function trustChainResolution(Request $request): Response
114114

115115
public function trustMarkValidation(Request $request): Response
116116
{
117-
$trustMarkId = null;
117+
$trustMarkType = null;
118118
$leafEntityId = null;
119119
$trustAnchorId = null;
120120
$isFormSubmitted = false;
121121

122122
if ($request->isMethod(Request::METHOD_POST)) {
123123
$isFormSubmitted = true;
124124

125-
!empty($trustMarkId = $request->request->getString('trustMarkId')) ||
126-
throw new OidcException('Empty Trust Mark ID.');
125+
!empty($trustMarkType = $request->request->getString('trustMarkType')) ||
126+
throw new OidcException('Empty Trust Mark Type.');
127127
!empty($leafEntityId = $request->request->getString('leafEntityId')) ||
128128
throw new OidcException('Empty leaf entity ID.');
129129
!empty($trustAnchorId = $request->request->getString('trustAnchorId')) ||
130130
throw new OidcException('Empty Trust Anchor ID.');
131131

132132
try {
133-
// We should not try to validate Trust Marks until we have resolved trust chain between leaf and TA.
133+
// We should not try to validate Trust Marks until we have resolved a trust chain between leaf and TA.
134134
$trustChain = $this->federation->trustChainResolver()->for(
135135
$leafEntityId,
136136
[$trustAnchorId],
137137
)->getShortest();
138138

139139
try {
140-
$this->federationWithArrayLogger->trustMarkValidator()->doForTrustMarkId(
141-
$trustMarkId,
140+
$this->federationWithArrayLogger->trustMarkValidator()->doForTrustMarkType(
141+
$trustMarkType,
142142
$trustChain->getResolvedLeaf(),
143143
$trustChain->getResolvedTrustAnchor(),
144144
);
@@ -160,7 +160,7 @@ public function trustMarkValidation(Request $request): Response
160160
return $this->templateFactory->build(
161161
'oidc:tests/trust-mark-validation.twig',
162162
compact(
163-
'trustMarkId',
163+
'trustMarkType',
164164
'leafEntityId',
165165
'trustAnchorId',
166166
'logMessages',

0 commit comments

Comments
 (0)