Skip to content

Commit 396727b

Browse files
authored
Merge branch 'main' into feat/jwt_trust_header_inclusion
2 parents d427727 + 77d48bf commit 396727b

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
@@ -251,19 +251,19 @@ config:
251251
client_id_scheme: x509_san_dns # this will be prepended in the client id scheme used in the request.
252252
include_issued_jwt_header_param: true # default false; if true, it will include x5c header parameters in the signed presentation request issued by this trust handler
253253
certificate_authorities:
254-
- ca.example.com: |
255-
-----BEGIN CERTIFICATE-----
256-
MIIB2DCCAX2gAwIBAgIULx2ECoVuwx8Hjz9KT8LU2UnO5fcwCgYIKoZIzj0EAwIw
257-
UjEuMCwGA1UEAwwlQ049Y2EuZXhhbXBsZS5jb20sIE89RXhhbXBsZSBDQSwgQz1J
258-
VDETMBEGA1UECgwKRXhhbXBsZSBDQTELMAkGA1UEBhMCSVQwHhcNMjUwNDA5MTIw
259-
ODUwWhcNMjYwNDEwMTIwODUwWjBSMS4wLAYDVQQDDCVDTj1jYS5leGFtcGxlLmNv
260-
bSwgTz1FeGFtcGxlIENBLCBDPUlUMRMwEQYDVQQKDApFeGFtcGxlIENBMQswCQYD
261-
VQQGEwJJVDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFnk7w/2CELwYAo1HYjh
262-
v07QS3Xo3HL1Qt/SD2s5pcBmENuFzPUS8E1JFZ047hfaGIb+6NQdUcNt7RGBQgvJ
263-
cNqjMTAvMBIGA1UdEwEB/wQIMAYBAf8CAQEwGQYDVR0RBBIwEIIOY2EuZXhhbXBs
264-
ZS5jb20wCgYIKoZIzj0EAwIDSQAwRgIhAJLASYXdk77YGrVeuj2bdy48fFeGcHwY
265-
hEt3dD1GqdqkAiEAqekBRTF9wzJ/lPmRJyPdLoxzGBbIkd53NCtGUfNvaL0=
266-
-----END CERTIFICATE-----
254+
ca.example.com: |
255+
-----BEGIN CERTIFICATE-----
256+
MIIB2DCCAX2gAwIBAgIULx2ECoVuwx8Hjz9KT8LU2UnO5fcwCgYIKoZIzj0EAwIw
257+
UjEuMCwGA1UEAwwlQ049Y2EuZXhhbXBsZS5jb20sIE89RXhhbXBsZSBDQSwgQz1J
258+
VDETMBEGA1UECgwKRXhhbXBsZSBDQTELMAkGA1UEBhMCSVQwHhcNMjUwNDA5MTIw
259+
ODUwWhcNMjYwNDEwMTIwODUwWjBSMS4wLAYDVQQDDCVDTj1jYS5leGFtcGxlLmNv
260+
bSwgTz1FeGFtcGxlIENBLCBDPUlUMRMwEQYDVQQKDApFeGFtcGxlIENBMQswCQYD
261+
VQQGEwJJVDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFnk7w/2CELwYAo1HYjh
262+
v07QS3Xo3HL1Qt/SD2s5pcBmENuFzPUS8E1JFZ047hfaGIb+6NQdUcNt7RGBQgvJ
263+
cNqjMTAvMBIGA1UdEwEB/wQIMAYBAf8CAQEwGQYDVR0RBBIwEIIOY2EuZXhhbXBs
264+
ZS5jb20wCgYIKoZIzj0EAwIDSQAwRgIhAJLASYXdk77YGrVeuj2bdy48fFeGcHwY
265+
hEt3dD1GqdqkAiEAqekBRTF9wzJ/lPmRJyPdLoxzGBbIkd53NCtGUfNvaL0=
266+
-----END CERTIFICATE-----
267267
relying_party_certificate_chains_by_ca: # X.509 chains in PEM format. Please note: Leaf's certificate MUST be related to metadata_jwks[0]
268268
ca.example.com:
269269
- |

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
@@ -312,7 +312,7 @@ def base64url_to_int(val):
312312
"config": {
313313
"client_id": f"{BASE_URL}/OpenID4VP",
314314
"include_issued_jwt_header_param": True,
315-
"relying_party_certificate_chains_by_ca":{
315+
"relying_party_certificate_chains_by_ca": {
316316
"ca.example.com": DEFAULT_X509_CHAIN,
317317
},
318318
"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
@@ -117,7 +117,7 @@ def _cache_upsert_source_trust_materials(
117117
return trust_source
118118

119119
def _upsert_source_trust_materials(
120-
self, trust_source: Optional[TrustSourceData], issuer: Optional[str] = None, force_update: bool = False
120+
self, trust_source: Optional[TrustSourceData], entity_id: Optional[str], force_update: bool = False
121121
) -> TrustSourceData:
122122
"""
123123
Extract the trust material of a certain issuer from all the trust handlers.
@@ -130,20 +130,15 @@ def _upsert_source_trust_materials(
130130
:rtype: Optional[TrustSourceData]
131131
"""
132132

133-
entity_id = issuer or "__internal__"
134-
135133
if not trust_source:
136134
trust_source = TrustSourceData.empty(entity_id)
137-
138-
if entity_id == "__internal__":
139-
return self._cache_upsert_source_trust_materials(trust_source, issuer)
140135

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

146-
def _get_trust_source(self, issuer: Optional[str] = None, force_update: bool = False) -> TrustSourceData:
141+
def _get_trust_source(self, entity_id: Optional[str], force_update: bool = False) -> TrustSourceData:
147142
"""
148143
Retrieve the trust source from the database or extract it from the trust handlers.
149144
@@ -153,9 +148,9 @@ def _get_trust_source(self, issuer: Optional[str] = None, force_update: bool = F
153148
:returns: The trust source
154149
:rtype: TrustSourceData
155150
"""
156-
trust_source = self._retrieve_trust_source(issuer or "__internal__")
151+
trust_source = self._retrieve_trust_source(entity_id)
157152

158-
return self._upsert_source_trust_materials(trust_source, issuer, force_update)
153+
return self._upsert_source_trust_materials(trust_source, entity_id, force_update)
159154

160155
def get_public_keys(
161156
self,

0 commit comments

Comments
 (0)