Skip to content

Commit

Permalink
fix: aligned claims "trust_mark_issuer", "trust_marks_issuers" to tru…
Browse files Browse the repository at this point in the history
…st_mark_issuers
  • Loading branch information
rglauco committed Nov 2, 2023
1 parent 7e15d4b commit 74dfdee
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/CREATE_A_FEDERATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ta_conf_data = dict(
metadata=FA_METADATA,
constraints=FA_CONSTRAINTS,
is_active=True,
trust_marks_issuers=TM_ISSUERS,
trust_mark_issuers=TM_ISSUERS,
)
FederationEntityConfiguration.objects.create(**ta_conf_data)
Expand Down
8 changes: 4 additions & 4 deletions examples/federation_authority/dumps/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
}
],
"trust_marks": [],
"trust_marks_issuers": {
"trust_mark_issuers": {
"https://www.spid.gov.it/certification/rp/public": [
"https://registry.spid.agid.gov.it",
"https://public.intermediary.spid.it"
Expand Down Expand Up @@ -253,7 +253,7 @@
"trust_mark": "eyJhbGciOiJSUzI1NiIsImtpZCI6IkZpZll4MDNibm9zRDhtNmdZUUlmTkhOUDljTV9TYW05VGM1bkxsb0lJcmMifQ.eyJpc3MiOiJodHRwOi8vMTI3LjAuMC4xOjgwMDAvIiwic3ViIjoiaHR0cDovLzEyNy4wLjAuMTo4MDAwL29pZGMvcnAvIiwiaWF0IjoxNjQ1NjEyNDAxLCJpZCI6Imh0dHBzOi8vd3d3LnNwaWQuZ292Lml0L2NlcnRpZmljYXRpb24vcnAiLCJtYXJrIjoiaHR0cHM6Ly93d3cuYWdpZC5nb3YuaXQvdGhlbWVzL2N1c3RvbS9hZ2lkL2xvZ28uc3ZnIiwicmVmIjoiaHR0cHM6Ly9kb2NzLml0YWxpYS5pdC9pdGFsaWEvc3BpZC9zcGlkLXJlZ29sZS10ZWNuaWNoZS1vaWRjL2l0L3N0YWJpbGUvaW5kZXguaHRtbCJ9.mSPNR0AOPBn3UNJAIbrWUMQ8vGTetQajpa3i59JDKDXYWqo2TUGh4AQBghCiG3qqV9cl-hleLtuwoeZ1InKHeslTLftVdcR3meeMLs3mLobHYr26Mi7pC7-jx1ZFVyk4GXl7mn9WVSQGEUOiuhL01tdlUfxf0TJSFSOMEZGpCA3hXroLOnEl3FjkAw7sPvjfImsbadbHVusb72HTTs1n5Xo7z3As3fDWHcxD-fvvq0beu9cx-L2sT4YaNC-ELd1M3m5r0NIjjEUAt4Gnot-l5Z3-C_bA41uvh2hX34U_fGZ6jpmuluJo1Lqi26N8LTB-Rbu0UMaZnkRg9E72_YRZig"
}
],
"trust_marks_issuers": {},
"trust_mark_issuers": {},
"entity_type": "openid_relying_party",
"metadata": {
"federation_entity": {
Expand Down Expand Up @@ -343,7 +343,7 @@
}
],
"trust_marks": [],
"trust_marks_issuers": {},
"trust_mark_issuers": {},
"entity_type": "openid_provider",
"metadata": {
"federation_entity": {
Expand Down Expand Up @@ -543,7 +543,7 @@
"federation_list_endpoint": "http://127.0.0.1:8000/list"
}
},
"trust_marks_issuers": {
"trust_mark_issuers": {
"https://www.spid.gov.it/certification/rp/public": [
"https://registry.spid.agid.gov.it",
"https://public.intermediary.spid.it"
Expand Down
4 changes: 2 additions & 2 deletions examples/provider/dumps/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
}
],
"trust_marks": [],
"trust_marks_issuers": {},
"trust_mark_issuers": {},
"entity_type": "openid_provider",
"metadata": {
"federation_entity": {
Expand Down Expand Up @@ -340,7 +340,7 @@
"federation_list_endpoint": "http://127.0.0.1:8000/list"
}
},
"trust_marks_issuers": {
"trust_mark_issuers": {
"https://www.spid.gov.it/certification/rp/public": [
"https://registry.spid.agid.gov.it",
"https://public.intermediary.spid.it"
Expand Down
4 changes: 2 additions & 2 deletions examples/relying_party/dumps/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"trust_mark": "eyJhbGciOiJSUzI1NiIsImtpZCI6IkZpZll4MDNibm9zRDhtNmdZUUlmTkhOUDljTV9TYW05VGM1bkxsb0lJcmMifQ.eyJpc3MiOiJodHRwOi8vMTI3LjAuMC4xOjgwMDAvIiwic3ViIjoiaHR0cDovLzEyNy4wLjAuMTo4MDAwL29pZGMvcnAvIiwiaWF0IjoxNjQ1NjEyNDAxLCJpZCI6Imh0dHBzOi8vd3d3LnNwaWQuZ292Lml0L2NlcnRpZmljYXRpb24vcnAiLCJtYXJrIjoiaHR0cHM6Ly93d3cuYWdpZC5nb3YuaXQvdGhlbWVzL2N1c3RvbS9hZ2lkL2xvZ28uc3ZnIiwicmVmIjoiaHR0cHM6Ly9kb2NzLml0YWxpYS5pdC9pdGFsaWEvc3BpZC9zcGlkLXJlZ29sZS10ZWNuaWNoZS1vaWRjL2l0L3N0YWJpbGUvaW5kZXguaHRtbCJ9.mSPNR0AOPBn3UNJAIbrWUMQ8vGTetQajpa3i59JDKDXYWqo2TUGh4AQBghCiG3qqV9cl-hleLtuwoeZ1InKHeslTLftVdcR3meeMLs3mLobHYr26Mi7pC7-jx1ZFVyk4GXl7mn9WVSQGEUOiuhL01tdlUfxf0TJSFSOMEZGpCA3hXroLOnEl3FjkAw7sPvjfImsbadbHVusb72HTTs1n5Xo7z3As3fDWHcxD-fvvq0beu9cx-L2sT4YaNC-ELd1M3m5r0NIjjEUAt4Gnot-l5Z3-C_bA41uvh2hX34U_fGZ6jpmuluJo1Lqi26N8LTB-Rbu0UMaZnkRg9E72_YRZig"
}
],
"trust_marks_issuers": {},
"trust_mark_issuers": {},
"entity_type": "openid_relying_party",
"metadata": {
"federation_entity": {
Expand Down Expand Up @@ -159,7 +159,7 @@
"federation_list_endpoint": "http://127.0.0.1:8000/list"
}
},
"trust_marks_issuers": {
"trust_mark_issuers": {
"https://www.spid.gov.it/certification/rp/public": [
"https://registry.spid.agid.gov.it",
"https://public.intermediary.spid.it"
Expand Down
2 changes: 1 addition & 1 deletion examples/wallet_trust_anchor/dumps/ta-ec.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"jwks_core": [],
"trust_marks": [],
"trust_marks_issuers": {},
"trust_mark_issuers": {},
"entity_type": "federation_entity",
"metadata": {
"federation_entity": {
Expand Down
2 changes: 1 addition & 1 deletion spid_cie_oidc/entity/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Migration(migrations.Migration):
),
),
(
"trust_marks_issuers",
"trust_mark_issuers",
models.JSONField(
blank=True,
default=dict,
Expand Down
6 changes: 3 additions & 3 deletions spid_cie_oidc/entity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _create_jwks():
help_text=_("which trust marks MUST be exposed in its entity configuration"),
default=list,
)
trust_marks_issuers = models.JSONField(
trust_mark_issuers = models.JSONField(
blank=True,
help_text=_(
"Only usable for Trust Anchors and intermediates. "
Expand Down Expand Up @@ -219,8 +219,8 @@ def entity_configuration_as_dict(self):
"metadata": self.metadata,
}

if self.trust_marks_issuers:
conf["trust_marks_issuers"] = self.trust_marks_issuers
if self.trust_mark_issuers:
conf["trust_mark_issuers"] = self.trust_mark_issuers

if self.trust_marks:
conf["trust_marks"] = self.trust_marks
Expand Down
2 changes: 1 addition & 1 deletion spid_cie_oidc/entity/statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def validate_by_allowed_trust_marks(self) -> bool:
raise MissingTrustMark("Required Trust marks are missing.") # pragma: no cover

trust_mark_issuers_by_id = self.trust_anchor_entity_conf.payload.get(
"trust_marks_issuers", {}
"trust_mark_issuers", {}
)

# TODO : cache of issuers -> it would be better to have a proxy function
Expand Down
4 changes: 2 additions & 2 deletions spid_cie_oidc/entity/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
metadata=FA_METADATA,
constraints=FA_CONSTRAINTS,
is_active=1,
trust_marks_issuers=TM_ISSUERS,
trust_mark_issuers=TM_ISSUERS,
)
TA_JWK_PRI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Vm7I3NSZ34DZsCZJoc', 'kid': 'HIvo33-Km7n03ZqKDJfWVnlFudsW28YhQZx5eaXtAKA'}
TA_JWK_PUBLIC = {'kty': 'RSA', 'n': 'w8H80eT2zrs2XQ-SApZG9TkuXDuIxANfCVHt4fFqNnOEZaCNWqlTQIo0JiSBE-QmzZ09TYP1BJpESuQf_PUeLRVPfYHsBVk5OYvhT27_nYlV7_1LsFGLxxsIa-hswMMzvW-1_huKLy6Fp0WP0ouUJAHsF_eYVtO1ApRhvlIVd5azM4k7t8Lh8lkCSdF1SfGHfXnXJRb-XensZ0cFSfe2Koq9mD7jpGLXlPpXxj8Ow0g7KYT5kVtWE5ULmNmO7BIN1Hx4HpggbbEGgC9FyjKw4GfFb-csnB-icBPf_60HomjrkFFt6vTjrcqQaHOj-sEjP36N8rMSBiMmiMSPnsHhMQ', 'e': 'AQAB', 'kid': 'HIvo33-Km7n03ZqKDJfWVnlFudsW28YhQZx5eaXtAKA'}
Expand All @@ -40,5 +40,5 @@
},
constraints=FA_CONSTRAINTS,
is_active=1,
trust_marks_issuers=TM_ISSUERS,
trust_mark_issuers=TM_ISSUERS,
)
2 changes: 1 addition & 1 deletion spid_cie_oidc/provider/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"jwks_fed": [op_conf_priv_jwk],
"jwks_core": [op_conf_priv_jwk],
"trust_marks": [],
"trust_marks_issuers": {},
"trust_mark_issuers": {},
"entity_type": "openid_provider",
"metadata": {
"openid_provider": {
Expand Down

0 comments on commit 74dfdee

Please sign in to comment.