diff --git a/docs/FEDERATION_METADATA_POLICY.md b/docs/FEDERATION_METADATA_POLICY.md index 942cb7e0..76730440 100644 --- a/docs/FEDERATION_METADATA_POLICY.md +++ b/docs/FEDERATION_METADATA_POLICY.md @@ -80,23 +80,23 @@ md = { "https://www.spid.gov.it/SpidL3" ], "claims_supported": [ - "https://attributes.spid.gov.it/spidCode", - "https://attributes.spid.gov.it/name", - "https://attributes.spid.gov.it/familyName", - "https://attributes.spid.gov.it/placeOfBirth", - "https://attributes.spid.gov.it/countyOfBirth", - "https://attributes.spid.gov.it/dateOfBirth", - "https://attributes.spid.gov.it/gender", - "https://attributes.spid.gov.it/companyName", - "https://attributes.spid.gov.it/registeredOffice", - "https://attributes.spid.gov.it/fiscalNumber", - "https://attributes.spid.gov.it/ivaCode", - "https://attributes.spid.gov.it/idCard", - "https://attributes.spid.gov.it/mobilePhone", - "https://attributes.spid.gov.it/email", - "https://attributes.spid.gov.it/address", - "https://attributes.spid.gov.it/expirationDate", - "https://attributes.spid.gov.it/digitalAddress" + "https://attributes.eid.gov.it/spid_code", + "given_name", + "family_name", + "place_of_birth", + "birthdate", + "gender", + "https://attributes.eid.gov.it/company_name", + "https://attributes.eid.gov.it/registered_office", + "https://attributes.eid.gov.it/fiscal_number", + "https://attributes.eid.gov.it/company_fiscal_number", + "https://attributes.eid.gov.it/vat_number", + "document_details", + "phone_number", + "email", + "https://attributes.eid.gov.it/e_delivery_service", + "https://attributes.eid.gov.it/eid_exp_date", + "address" ], "grant_types_supported": [ "authorization_code", diff --git a/docs/technical_specifications/RELYING_PARTY.md b/docs/technical_specifications/RELYING_PARTY.md index 2696c642..6b442ed5 100644 --- a/docs/technical_specifications/RELYING_PARTY.md +++ b/docs/technical_specifications/RELYING_PARTY.md @@ -101,14 +101,14 @@ SPID_REQUESTED_CLAIMS = getattr( "RP_REQUIRED_CLAIMS", { "id_token": { - "https://attributes.spid.gov.it/familyName": {"essential": True}, - "https://attributes.spid.gov.it/email": {"essential": True}, + "https://attributes.eid.gov.it/family_name": {"essential": True}, + "https://attributes.eid.gov.it/email": {"essential": True}, }, "userinfo": { - "https://attributes.spid.gov.it/name": None, - "https://attributes.spid.gov.it/familyName": None, - "https://attributes.spid.gov.it/email": None, - "https://attributes.spid.gov.it/fiscalNumber": None, + "https://attributes.eid.gov.it/given_name": None, + "https://attributes.eid.gov.it/family_name": None, + "https://attributes.eid.gov.it/email": None, + "https://attributes.eid.gov.it/fiscal_number": None, }, }, ) diff --git a/examples/federation_authority/dumps/example.json b/examples/federation_authority/dumps/example.json index 7085eae9..ccafcf03 100644 --- a/examples/federation_authority/dumps/example.json +++ b/examples/federation_authority/dumps/example.json @@ -15,7 +15,7 @@ "email": "", "origin": null, "attributes": { - "https://attributes.spid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78", + "https://attributes.eid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78", "given_name": "peppe", "family_name": "maradona", "email": "that@ema.il", @@ -45,7 +45,7 @@ "email": "", "origin": null, "attributes": { - "https://attributes.spid.gov.it/fiscal_number": "AATTTJDFKSKDF89", + "https://attributes.eid.gov.it/fiscal_number": "AATTTJDFKSKDF89", "given_name": "antonio", "family_name": "rossi", "email": "that@ema.il", @@ -306,22 +306,23 @@ "https://www.spid.gov.it/SpidL3" ], "claims_supported": [ - "https://attributes.spid.gov.it/spidCode", - "given_name", - "family_name", - "place_of_birth", - "date_of_birth", - "gender", - "https://attributes.spid.gov.it/companyName", - "https://attributes.spid.gov.it/registeredOffice", - "https://attributes.spid.gov.it/fiscal_number", - "https://attributes.spid.gov.it/ivaCode", - "https://attributes.spid.gov.it/idCard", - "https://attributes.spid.gov.it/mobilePhone", - "email", - "address", - "https://attributes.spid.gov.it/expirationDate", - "https://attributes.spid.gov.it/digitalAddress" + "https://attributes.eid.gov.it/spid_code", + "given_name", + "family_name", + "place_of_birth", + "birthdate", + "gender", + "https://attributes.eid.gov.it/company_name", + "https://attributes.eid.gov.it/registered_office", + "https://attributes.eid.gov.it/fiscal_number", + "https://attributes.eid.gov.it/company_fiscal_number", + "https://attributes.eid.gov.it/vat_number", + "document_details", + "phone_number", + "email", + "https://attributes.eid.gov.it/e_delivery_service", + "https://attributes.eid.gov.it/eid_exp_date", + "address" ], "grant_types_supported": [ "authorization_code", @@ -668,22 +669,23 @@ "https://www.spid.gov.it/SpidL3" ], "claims_supported": [ - "https://attributes.spid.gov.it/spidCode", - "given_name", - "family_name", - "place_of_birth", - "date_of_birth", - "gender", - "https://attributes.spid.gov.it/companyName", - "https://attributes.spid.gov.it/registeredOffice", - "https://attributes.spid.gov.it/fiscal_number", - "https://attributes.spid.gov.it/ivaCode", - "https://attributes.spid.gov.it/idCard", - "https://attributes.spid.gov.it/mobilePhone", - "email", - "address", - "https://attributes.spid.gov.it/expirationDate", - "https://attributes.spid.gov.it/digitalAddress" + "https://attributes.eid.gov.it/spid_code", + "given_name", + "family_name", + "place_of_birth", + "birthdate", + "gender", + "https://attributes.eid.gov.it/company_name", + "https://attributes.eid.gov.it/registered_office", + "https://attributes.eid.gov.it/fiscal_number", + "https://attributes.eid.gov.it/company_fiscal_number", + "https://attributes.eid.gov.it/vat_number", + "document_details", + "phone_number", + "email", + "https://attributes.eid.gov.it/e_delivery_service", + "https://attributes.eid.gov.it/eid_exp_date", + "address" ], "grant_types_supported": [ "authorization_code", @@ -1443,22 +1445,23 @@ "https://www.spid.gov.it/SpidL3" ], "claims_supported": [ - "https://attributes.spid.gov.it/spidCode", + "https://attributes.eid.gov.it/spid_code", "given_name", "family_name", "place_of_birth", - "date_of_birth", + "birthdate", "gender", - "https://attributes.spid.gov.it/companyName", - "https://attributes.spid.gov.it/registeredOffice", - "https://attributes.spid.gov.it/fiscal_number", - "https://attributes.spid.gov.it/ivaCode", - "https://attributes.spid.gov.it/idCard", - "https://attributes.spid.gov.it/mobilePhone", + "https://attributes.eid.gov.it/company_name", + "https://attributes.eid.gov.it/registered_office", + "https://attributes.eid.gov.it/fiscal_number", + "https://attributes.eid.gov.it/company_fiscal_number", + "https://attributes.eid.gov.it/vat_number", + "document_details", + "phone_number", "email", - "address", - "https://attributes.spid.gov.it/expirationDate", - "https://attributes.spid.gov.it/digitalAddress" + "https://attributes.eid.gov.it/e_delivery_service", + "https://attributes.eid.gov.it/eid_exp_date", + "address" ], "grant_types_supported": [ "authorization_code", diff --git a/examples/provider/dumps/example.json b/examples/provider/dumps/example.json index 0be5a350..aa094057 100644 --- a/examples/provider/dumps/example.json +++ b/examples/provider/dumps/example.json @@ -15,7 +15,7 @@ "email": "", "origin": null, "attributes": { - "https://attributes.spid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78", + "https://attributes.eid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78", "given_name": "peppe", "family_name": "maradona", "email": "that@ema.il", @@ -45,7 +45,7 @@ "email": "", "origin": null, "attributes": { - "https://attributes.spid.gov.it/fiscal_number": "AATTTJDFKSKDF89", + "https://attributes.eid.gov.it/fiscal_number": "AATTTJDFKSKDF89", "given_name": "antonio", "family_name": "rossi", "email": "that@ema.il", diff --git a/examples/relying_party/dumps/example.json b/examples/relying_party/dumps/example.json index 0bc61854..ad45e395 100644 --- a/examples/relying_party/dumps/example.json +++ b/examples/relying_party/dumps/example.json @@ -226,22 +226,23 @@ "https://www.spid.gov.it/SpidL3" ], "claims_supported": [ - "https://attributes.spid.gov.it/spidCode", + "https://attributes.eid.gov.it/spid_code", "given_name", "family_name", "place_of_birth", - "date_of_birth", + "birthdate", "gender", - "https://attributes.spid.gov.it/companyName", - "https://attributes.spid.gov.it/registeredOffice", - "https://attributes.spid.gov.it/fiscal_number", - "https://attributes.spid.gov.it/ivaCode", - "https://attributes.spid.gov.it/idCard", - "https://attributes.spid.gov.it/mobilePhone", + "https://attributes.eid.gov.it/company_name", + "https://attributes.eid.gov.it/registered_office", + "https://attributes.eid.gov.it/fiscal_number", + "https://attributes.eid.gov.it/company_fiscal_number", + "https://attributes.eid.gov.it/vat_number", + "document_details", + "phone_number", "email", - "address", - "https://attributes.spid.gov.it/expirationDate", - "https://attributes.spid.gov.it/digitalAddress" + "https://attributes.eid.gov.it/e_delivery_service", + "https://attributes.eid.gov.it/eid_exp_date", + "address" ], "grant_types_supported": [ "authorization_code", @@ -796,22 +797,23 @@ "https://www.spid.gov.it/SpidL3" ], "claims_supported": [ - "https://attributes.spid.gov.it/spidCode", + "https://attributes.eid.gov.it/spid_code", "given_name", "family_name", "place_of_birth", - "date_of_birth", + "birthdate", "gender", - "https://attributes.spid.gov.it/companyName", - "https://attributes.spid.gov.it/registeredOffice", - "https://attributes.spid.gov.it/fiscal_number", - "https://attributes.spid.gov.it/ivaCode", - "https://attributes.spid.gov.it/idCard", - "https://attributes.spid.gov.it/mobilePhone", + "https://attributes.eid.gov.it/company_name", + "https://attributes.eid.gov.it/registered_office", + "https://attributes.eid.gov.it/fiscal_number", + "https://attributes.eid.gov.it/company_fiscal_number", + "https://attributes.eid.gov.it/vat_number", + "document_details", + "phone_number", "email", - "address", - "https://attributes.spid.gov.it/expirationDate", - "https://attributes.spid.gov.it/digitalAddress" + "https://attributes.eid.gov.it/e_delivery_service", + "https://attributes.eid.gov.it/eid_exp_date", + "address" ], "grant_types_supported": [ "authorization_code", diff --git a/spid_cie_oidc/provider/schemas/authn_requests.py b/spid_cie_oidc/provider/schemas/authn_requests.py index 2822e26b..f425c4e5 100644 --- a/spid_cie_oidc/provider/schemas/authn_requests.py +++ b/spid_cie_oidc/provider/schemas/authn_requests.py @@ -53,28 +53,28 @@ class UserInfoSpid(BaseModel): alias="place_of_birth", default=None ) date_of_birth: Optional[dict] = Field( - alias="date_of_birth", default=None + alias="birthdate", default=None ) gender: Optional[dict] = Field( alias="gender", default=None ) company_name: Optional[dict] = Field( - alias="https://attributes.spid.gov.it/companyName", default=None + alias="https://attributes.eid.gov.it/company_name", default=None ) registered_office: Optional[dict] = Field( - alias="https://attributes.spid.gov.it/registeredOffice", default=None + alias="https://attributes.eid.gov.it/registered_office", default=None ) fiscal_number: Optional[dict] = Field( - alias="https://attributes.spid.gov.it/fiscal_number", default=None + alias="https://attributes.eid.gov.it/fiscal_number", default=None ) iva_code: Optional[dict] = Field( - alias="https://attributes.spid.gov.it/ivaCode", default=None + alias="https://attributes.eid.gov.it/vat_number", default=None ) id_card: Optional[dict] = Field( - alias="https://attributes.spid.gov.it/idCard", default=None + alias="https://attributes.eid.gov.it/document_details", default=None ) mobile_phone: Optional[dict] = Field( - alias="https://attributes.spid.gov.it/mobilePhone", default=None + alias="https://attributes.eid.gov.it/phone_number", default=None ) email: Optional[dict] = Field( alias="email", default=None @@ -83,10 +83,10 @@ class UserInfoSpid(BaseModel): alias="address", default=None ) expiration_date: Optional[dict] = Field( - alias="https://attributes.spid.gov.it/expirationDate", default=None + alias="https://attributes.eid.gov.it/eid_exp_date", default=None ) digital_address: Optional[dict] = Field( - alias="https://attributes.spid.gov.it/digitalAddress", default=None + alias="https://attributes.eid.gov.it/e_delivery_service", default=None ) diff --git a/spid_cie_oidc/provider/settings.py b/spid_cie_oidc/provider/settings.py index ad509eb8..4d49532e 100644 --- a/spid_cie_oidc/provider/settings.py +++ b/spid_cie_oidc/provider/settings.py @@ -174,18 +174,18 @@ "given_name": _("Name"), "family_name": _("Family name"), "place_of_birth": _("Place of birth"), - "date_of_birth": _("Date of birth"), + "birthdate": _("Date of birth"), "gender": _("Gender"), - "https://attributes.spid.gov.it/companyName": _("Company Name"), - "https://attributes.spid.gov.it/registeredOffice": _("Registered Office"), - "https://attributes.spid.gov.it/fiscal_number": _("Tax payer id"), - "https://attributes.spid.gov.it/ivaCode": _("Vat number"), - "https://attributes.spid.gov.it/idCard": _("Id card"), - "https://attributes.spid.gov.it/mobilePhone": _("Mobile phone"), + "https://attributes.eid.gov.it/company_name": _("Company Name"), + "https://attributes.eid.gov.it/registered_office": _("Registered Office"), + "https://attributes.eid.gov.it/fiscal_number": _("Tax payer id"), + "https://attributes.eid.gov.it/vat_number": _("Vat number"), + "document_details": _("Id card"), + "phone_number": _("Mobile phone"), "email": _("Email"), "address": _("Address"), - "https://attributes.spid.gov.it/expirationDate": _("Expiration date"), - "https://attributes.spid.gov.it/digitalAddress": _("Digital address"), + "https://attributes.eid.gov.it/eid_exp_date": _("Expiration date"), + "https://attributes.eid.gov.it/e_delivery_service": _("Digital address"), # CIE "given_name": _("Name"), diff --git a/spid_cie_oidc/provider/tests/authn_request_settings.py b/spid_cie_oidc/provider/tests/authn_request_settings.py index 5b602bc1..a22e1a24 100644 --- a/spid_cie_oidc/provider/tests/authn_request_settings.py +++ b/spid_cie_oidc/provider/tests/authn_request_settings.py @@ -10,7 +10,7 @@ "userinfo": { "given_name": {"values": ["str", "str"]}, "family_name": None, - "date_of_birth": {"value": "str"}, + "birthdate": {"value": "str"}, }, } diff --git a/spid_cie_oidc/provider/tests/settings.py b/spid_cie_oidc/provider/tests/settings.py index 9146c93a..4b4cd67f 100644 --- a/spid_cie_oidc/provider/tests/settings.py +++ b/spid_cie_oidc/provider/tests/settings.py @@ -35,22 +35,23 @@ "https://www.spid.gov.it/SpidL3", ], "claims_supported": [ - "https://attributes.spid.gov.it/spidCode", + "https://attributes.eid.gov.it/spid_code", "given_name", "family_name", "place_of_birth", - "date_of_birth", + "birthdate", "gender", - "https://attributes.spid.gov.it/companyName", - "https://attributes.spid.gov.it/registeredOffice", - "https://attributes.spid.gov.it/fiscal_number", - "https://attributes.spid.gov.it/ivaCode", - "https://attributes.spid.gov.it/idCard", - "https://attributes.spid.gov.it/mobilePhone", + "https://attributes.eid.gov.it/company_name", + "https://attributes.eid.gov.it/registered_office", + "https://attributes.eid.gov.it/fiscal_number", + "https://attributes.eid.gov.it/company_fiscal_number", + "https://attributes.eid.gov.it/vat_number", + "document_details", + "phone_number", "email", - "address", - "https://attributes.spid.gov.it/expirationDate", - "https://attributes.spid.gov.it/digitalAddress", + "https://attributes.eid.gov.it/e_delivery_service", + "https://attributes.eid.gov.it/eid_exp_date", + "address" ], "grant_types_supported": ["authorization_code", "refresh_token"], "id_token_signing_alg_values_supported": ["RS256", "ES256"], diff --git a/spid_cie_oidc/relying_party/settings.py b/spid_cie_oidc/relying_party/settings.py index bb8f53df..7cf59df3 100644 --- a/spid_cie_oidc/relying_party/settings.py +++ b/spid_cie_oidc/relying_party/settings.py @@ -65,7 +65,7 @@ "email", "email", ), - "fiscal_number": ("https://attributes.spid.gov.it/fiscal_number", "fiscal_number"), + "fiscal_number": ("https://attributes.eid.gov.it/fiscal_number", "fiscal_number"), }, ) @@ -82,7 +82,7 @@ "given_name": None, "family_name": None, "email": None, - "https://attributes.spid.gov.it/fiscal_number": None, + "https://attributes.eid.gov.it/fiscal_number": None, }, }, ) @@ -96,7 +96,7 @@ "given_name": None, "family_name": None, "email": None, - "https://attributes.spid.gov.it/fiscal_number": None + "https://attributes.eid.gov.it/fiscal_number": None }, }, ) diff --git a/spid_cie_oidc/relying_party/tests/mocked_response.py b/spid_cie_oidc/relying_party/tests/mocked_response.py index 5df10c1b..c5d80563 100644 --- a/spid_cie_oidc/relying_party/tests/mocked_response.py +++ b/spid_cie_oidc/relying_party/tests/mocked_response.py @@ -193,7 +193,7 @@ def __init__(self): def content(self): jwt = { "sub": 'asdasdasdasasdasdas', - "https://attributes.spid.gov.it/fiscal_number": "sdfsfs908df09s8df90s8fd0" + "https://attributes.eid.gov.it/fiscal_number": "sdfsfs908df09s8df90s8fd0" } jws = create_jws(jwt, op_conf_priv_jwk) jwe = create_jwe(