Skip to content

Commit 77d48bf

Browse files
authored
Merge pull request #427 from italia/fix/issue_resolution
Issue resolution
2 parents e5a1cb7 + 70c26a9 commit 77d48bf

File tree

7 files changed

+20
-169
lines changed

7 files changed

+20
-169
lines changed

example/satosa/pyeudiw_backend.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,19 +249,19 @@ config:
249249
# client_id: *client_id
250250
client_id_scheme: x509_san_dns # this will be prepended in the client id scheme used in the request.
251251
certificate_authorities:
252-
- ca.example.com: |
253-
-----BEGIN CERTIFICATE-----
254-
MIIB2DCCAX2gAwIBAgIULx2ECoVuwx8Hjz9KT8LU2UnO5fcwCgYIKoZIzj0EAwIw
255-
UjEuMCwGA1UEAwwlQ049Y2EuZXhhbXBsZS5jb20sIE89RXhhbXBsZSBDQSwgQz1J
256-
VDETMBEGA1UECgwKRXhhbXBsZSBDQTELMAkGA1UEBhMCSVQwHhcNMjUwNDA5MTIw
257-
ODUwWhcNMjYwNDEwMTIwODUwWjBSMS4wLAYDVQQDDCVDTj1jYS5leGFtcGxlLmNv
258-
bSwgTz1FeGFtcGxlIENBLCBDPUlUMRMwEQYDVQQKDApFeGFtcGxlIENBMQswCQYD
259-
VQQGEwJJVDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFnk7w/2CELwYAo1HYjh
260-
v07QS3Xo3HL1Qt/SD2s5pcBmENuFzPUS8E1JFZ047hfaGIb+6NQdUcNt7RGBQgvJ
261-
cNqjMTAvMBIGA1UdEwEB/wQIMAYBAf8CAQEwGQYDVR0RBBIwEIIOY2EuZXhhbXBs
262-
ZS5jb20wCgYIKoZIzj0EAwIDSQAwRgIhAJLASYXdk77YGrVeuj2bdy48fFeGcHwY
263-
hEt3dD1GqdqkAiEAqekBRTF9wzJ/lPmRJyPdLoxzGBbIkd53NCtGUfNvaL0=
264-
-----END CERTIFICATE-----
252+
ca.example.com: |
253+
-----BEGIN CERTIFICATE-----
254+
MIIB2DCCAX2gAwIBAgIULx2ECoVuwx8Hjz9KT8LU2UnO5fcwCgYIKoZIzj0EAwIw
255+
UjEuMCwGA1UEAwwlQ049Y2EuZXhhbXBsZS5jb20sIE89RXhhbXBsZSBDQSwgQz1J
256+
VDETMBEGA1UECgwKRXhhbXBsZSBDQTELMAkGA1UEBhMCSVQwHhcNMjUwNDA5MTIw
257+
ODUwWhcNMjYwNDEwMTIwODUwWjBSMS4wLAYDVQQDDCVDTj1jYS5leGFtcGxlLmNv
258+
bSwgTz1FeGFtcGxlIENBLCBDPUlUMRMwEQYDVQQKDApFeGFtcGxlIENBMQswCQYD
259+
VQQGEwJJVDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFnk7w/2CELwYAo1HYjh
260+
v07QS3Xo3HL1Qt/SD2s5pcBmENuFzPUS8E1JFZ047hfaGIb+6NQdUcNt7RGBQgvJ
261+
cNqjMTAvMBIGA1UdEwEB/wQIMAYBAf8CAQEwGQYDVR0RBBIwEIIOY2EuZXhhbXBs
262+
ZS5jb20wCgYIKoZIzj0EAwIDSQAwRgIhAJLASYXdk77YGrVeuj2bdy48fFeGcHwY
263+
hEt3dD1GqdqkAiEAqekBRTF9wzJ/lPmRJyPdLoxzGBbIkd53NCtGUfNvaL0=
264+
-----END CERTIFICATE-----
265265
relying_party_certificate_chains_by_ca: # X.509 chains in PEM format. Please note: Leaf's certificate MUST be related to metadata_jwks[0]
266266
ca.example.com:
267267
- |

pyeudiw/satosa/schemas/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from pyeudiw.jwt.schemas.jwt import JWTConfig
88
from pyeudiw.satosa.schemas.autorization import AuthorizationConfig
99
from pyeudiw.satosa.schemas.endpoint import EndpointsConfig
10-
from pyeudiw.satosa.schemas.qrcode import QRCode
1110
from pyeudiw.satosa.schemas.response import ResponseConfig
1211
from pyeudiw.satosa.schemas.ui import UiConfig
1312
from pyeudiw.satosa.schemas.user_attributes import UserAttributesConfig
@@ -18,7 +17,6 @@
1817
class PyeudiwBackendConfig(BaseModel):
1918
ui: UiConfig
2019
endpoints: EndpointsConfig
21-
qrcode: QRCode
2220
response_code: ResponseConfig
2321
jwt: JWTConfig
2422
authorization: AuthorizationConfig

pyeudiw/satosa/schemas/qrcode.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

pyeudiw/tests/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def base64url_to_int(val):
310310
"class": "X509Handler",
311311
"config": {
312312
"client_id": f"{BASE_URL}/OpenID4VP",
313-
"relying_party_certificate_chains_by_ca":{
313+
"relying_party_certificate_chains_by_ca": {
314314
"ca.example.com": DEFAULT_X509_CHAIN,
315315
},
316316
"certificate_authorities": {

pyeudiw/tests/tools/test_qr_code.py

Lines changed: 0 additions & 77 deletions
This file was deleted.

pyeudiw/tools/qr_code.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

pyeudiw/trust/dynamic.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def _cache_upsert_source_trust_materials(
115115
return trust_source
116116

117117
def _upsert_source_trust_materials(
118-
self, trust_source: Optional[TrustSourceData], issuer: Optional[str] = None, force_update: bool = False
118+
self, trust_source: Optional[TrustSourceData], entity_id: Optional[str], force_update: bool = False
119119
) -> TrustSourceData:
120120
"""
121121
Extract the trust material of a certain issuer from all the trust handlers.
@@ -128,20 +128,15 @@ def _upsert_source_trust_materials(
128128
:rtype: Optional[TrustSourceData]
129129
"""
130130

131-
entity_id = issuer or "__internal__"
132-
133131
if not trust_source:
134132
trust_source = TrustSourceData.empty(entity_id)
135-
136-
if entity_id == "__internal__":
137-
return self._cache_upsert_source_trust_materials(trust_source, issuer)
138133

139134
if self.mode == "update_first" or force_update:
140-
return self._update_upsert_source_trust_materials(trust_source, issuer)
135+
return self._update_upsert_source_trust_materials(trust_source, entity_id)
141136
else:
142-
return self._cache_upsert_source_trust_materials(trust_source, issuer)
137+
return self._cache_upsert_source_trust_materials(trust_source, entity_id)
143138

144-
def _get_trust_source(self, issuer: Optional[str] = None, force_update: bool = False) -> TrustSourceData:
139+
def _get_trust_source(self, entity_id: Optional[str], force_update: bool = False) -> TrustSourceData:
145140
"""
146141
Retrieve the trust source from the database or extract it from the trust handlers.
147142
@@ -151,9 +146,9 @@ def _get_trust_source(self, issuer: Optional[str] = None, force_update: bool = F
151146
:returns: The trust source
152147
:rtype: TrustSourceData
153148
"""
154-
trust_source = self._retrieve_trust_source(issuer or "__internal__")
149+
trust_source = self._retrieve_trust_source(entity_id)
155150

156-
return self._upsert_source_trust_materials(trust_source, issuer, force_update)
151+
return self._upsert_source_trust_materials(trust_source, entity_id, force_update)
157152

158153
def get_public_keys(
159154
self,

0 commit comments

Comments
 (0)