Skip to content

Commit

Permalink
fix: [Security] sub claim removed from authz request object
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Jun 18, 2022
1 parent b44e14d commit 5a9abb7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spid_cie_oidc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.3"
__version__ = "0.7.4"
6 changes: 5 additions & 1 deletion spid_cie_oidc/onboarding/schemas/authn_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ class AuthenticationRequest(BaseModel):
state: constr(min_length=32)
# TODO: to be improved
ui_locales: Optional[List[str]]
sub: HttpUrl

# sub claim MUST not be used to prevent that this jwt
# could be reused as a private_key_jwt
# sub: HttpUrl

iss: HttpUrl
iat: int
exp: Optional[int]
Expand Down
5 changes: 4 additions & 1 deletion spid_cie_oidc/relying_party/views/rp_begin.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ def get(self, request, *args, **kwargs):
# add the signed request object
authz_data_obj = deepcopy(authz_data)
authz_data_obj["iss"] = client_conf["client_id"]
authz_data_obj["sub"] = client_conf["client_id"]

# sub claim MUST not be used to prevent that this jwt
# could be reused as a private_key_jwt
# authz_data_obj["sub"] = client_conf["client_id"]

request_obj = create_jws(authz_data_obj, entity_conf.jwks_core[0])
authz_data["request"] = request_obj
Expand Down

0 comments on commit 5a9abb7

Please sign in to comment.