diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4712e8b..7437c93 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,7 +1,7 @@ [bumpversion] commit = False tag = False -current_version = 0.8.2 +current_version = 0.9.0 [bumpversion:file:setup.cfg] diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e38c8a8..9dca893 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,20 @@ Changelog ========= +0.9.0 (2023-10-23) +================== + +Quality of life update + +* [#45] Added automatic metadata retrieval + + * You can now configure a metadata source URL, which will download and process the + metadata automatically. + * Added a management command ``update_stored_metadata`` to refetch the metadata and + process any updates. + +* Added BSN validation to mock login form. + 0.8.2 (2023-09-01) ================== diff --git a/README.rst b/README.rst index 8963b51..3133c15 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ django-digid-eherkenning ======================== -:Version: 0.8.2 +:Version: 0.9.0 :Source: https://github.com/maykinmedia/django-digid-eherkenning :Keywords: django, authentication, digid, eherkenning, eidas, dutch, nl, netherlands :PythonVersion: 3.7+ diff --git a/digid_eherkenning/locale/nl/LC_MESSAGES/django.mo b/digid_eherkenning/locale/nl/LC_MESSAGES/django.mo index 50b3957..a3472c2 100644 Binary files a/digid_eherkenning/locale/nl/LC_MESSAGES/django.mo and b/digid_eherkenning/locale/nl/LC_MESSAGES/django.mo differ diff --git a/digid_eherkenning/locale/nl/LC_MESSAGES/django.po b/digid_eherkenning/locale/nl/LC_MESSAGES/django.po index 988e1e7..97fc283 100644 --- a/digid_eherkenning/locale/nl/LC_MESSAGES/django.po +++ b/digid_eherkenning/locale/nl/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-01 09:53+0000\n" +"POT-Creation-Date: 2023-10-23 10:00+0000\n" "PO-Revision-Date: 2020-06-23 16:55+0200\n" "Last-Translator: Sergei Maertens \n" "Language-Team: Maykin Media \n" @@ -12,31 +12,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: admin.py:14 admin.py:76 +#: admin.py:24 admin.py:89 msgid "X.509 Certificate" msgstr "X.509 Certificaat" -#: admin.py:23 admin.py:85 +#: admin.py:33 admin.py:98 msgid "Identity provider" msgstr "Identity provider" -#: admin.py:32 admin.py:94 +#: admin.py:43 admin.py:108 msgid "SAML configuration" msgstr "SAML-configuratie" -#: admin.py:45 admin.py:108 +#: admin.py:57 admin.py:122 msgid "Service details" msgstr "Servicegegevens" -#: admin.py:57 admin.py:145 +#: admin.py:69 admin.py:159 msgid "Organization details" msgstr "Organisatiegegevens" -#: admin.py:122 +#: admin.py:136 msgid "eHerkenning" msgstr "eHerkenning" -#: admin.py:133 +#: admin.py:147 msgid "eIDAS" msgstr "eIDAS" @@ -59,6 +59,7 @@ msgstr "" # python-format #: backends.py:31 +#, python-format msgid "User %(user)s%(user_info)s from %(ip)s logged in using %(service)s" msgstr "" "Gebruiker %(user)s%(user_info)s is met %(service)s ingelogd vanaf %(ip)s." @@ -71,26 +72,42 @@ msgstr " (nieuw account)" msgid "Login failed due to no BSN being returned by DigiD." msgstr "Login mislukt doordat er geen BSN is teruggegeven door DigiD." -#: choices.py:30 +#: choices.py:29 msgid "Non existent (1)" msgstr "Non existent (1)" -#: choices.py:32 +#: choices.py:30 msgid "Low (2)" msgstr "Low (2)" -#: choices.py:33 +#: choices.py:31 msgid "Low (2+)" msgstr "Low (2+)" -#: choices.py:35 +#: choices.py:32 msgid "Substantial (3)" msgstr "Substantial (3)" -#: choices.py:37 +#: choices.py:33 msgid "High (4)" msgstr "High (4)" +#: choices.py:40 +msgid "DigiD Basis" +msgstr "" + +#: choices.py:44 +msgid "DigiD Midden" +msgstr "" + +#: choices.py:48 +msgid "DigiD Substantieel" +msgstr "" + +#: choices.py:52 +msgid "DigiD Hoog" +msgstr "" + #: mock/backends.py:20 msgid "Login failed due to no BSN having more then 9 digits." msgstr "Login mislukt doordat er geen BSN gevonden is met 9 cijfers." @@ -99,19 +116,19 @@ msgstr "Login mislukt doordat er geen BSN gevonden is met 9 cijfers." msgid "Login failed due to no BSN not being numerical." msgstr "Login mislukt doordat er geen numeriek BSN gevonden is." -#: mock/idp/forms.py:7 +#: mock/idp/forms.py:11 msgid "DigiD gebruikersnaam" msgstr "" -#: mock/idp/forms.py:10 +#: mock/idp/forms.py:15 msgid "Wachtwoord" msgstr "" -#: mock/idp/forms.py:13 +#: mock/idp/forms.py:18 msgid "Onthoud mijn DigiD gebruikersnaam" msgstr "" -#: mock/views/digid.py:92 views/digid.py:79 +#: mock/views/digid.py:92 views/digid.py:89 msgid "" "An error occurred in the communication with DigiD. Please try again later. " "If this error persists, please check the website https://www.digid.nl for " @@ -121,43 +138,57 @@ msgstr "" "nogmaals. Indien deze fout blijft aanhouden, kijk dan op de website https://" "www.digid.nl voor de laatste informatie." -#: models/base.py:25 +#: models/base.py:27 msgid "key pair" msgstr "sleutelpaar" -#: models/base.py:27 +#: models/base.py:29 msgid "" "The private key and public certificate pair to use during the authentication " "flow." msgstr "De private-key en publieke certificaat voor de authenticatie-flow." -#: models/base.py:32 +#: models/base.py:34 msgid "identity provider metadata" msgstr "metadata identity provider" -#: models/base.py:34 -msgid "The metadata file of the identity provider." -msgstr "Het bestand met metadata van de identity provider." - #: models/base.py:37 +msgid "" +"The metadata file of the identity provider. This is auto populated from the " +"configured source URL." +msgstr "" +"Het bestand met metadata van de identity provider. Deze wordt automatisch opgehaald " +"via de ingestelde metadata-URL." + +#: models/base.py:42 msgid "identity provider service entity ID" msgstr "identity provider service entity ID" -#: models/base.py:41 +#: models/base.py:46 msgid "" "Example value: 'https://was-preprod1.digid.nl/saml/idp/metadata'. Note that " "this must match the 'entityID' attribute on the 'md:EntityDescriptor' node " -"found in the Identity Provider's metadata." +"found in the Identity Provider's metadata. This is auto populated from the " +"configured source URL." msgstr "" "Bijvoorbeeld: 'https://was-preprod1.digid.nl/saml/idp/metadata'. Merk op dat " "dit moet overeenkomen met het 'entityID'-attribuut op het 'md-" -"EntityDescriptor'-element in de metadata van de identity provider." +"EntityDescriptor'-element in de metadata van de identity provider. Dit wordt " +"automatisch opgehaald via de ingestelde metadata-URL." + +#: models/base.py:53 +msgid "metadata file(XML) URL" +msgstr "(XML) metadata-URL" -#: models/base.py:47 +#: models/base.py:57 +msgid "The URL-source where the XML metadata file can be retrieved from." +msgstr "De URL waar het XML metadata-bestand kan gedownload worden." + +#: models/base.py:61 msgid "want assertions signed" msgstr "onderteken assertions" -#: models/base.py:50 +#: models/base.py:64 msgid "" "If True, the XML assertions need to be signed, otherwise the whole response " "needs to be signed." @@ -165,27 +196,39 @@ msgstr "" "Indien aangevinkt, dan moeten de XML-assertions ondertekend zijn. In het " "andere geval moet de hele response ondertekend zijn." -#: models/base.py:56 +#: models/base.py:70 msgid "want assertions encrypted" msgstr "versleutel assertions" -#: models/base.py:58 +#: models/base.py:72 msgid "If True the XML assertions need to be encrypted." msgstr "Indien aangevinkt, dan moeten de XML-assertions versleuteld zijn." -#: models/base.py:62 +#: models/base.py:76 +msgid "resolve artifact binding content type" +msgstr "Content-Type 'resolve artifact binding'" + +#: models/base.py:81 +msgid "" +"'application/soap+xml' is considered legacy and modern brokers typically " +"expect 'text/xml'." +msgstr "" +"'application/soap+xml' wordt als 'legacy' beschouwd. Moderne brokers " +"verwachten typisch 'text/xml'." + +#: models/base.py:86 msgid "key passphrase" msgstr "wachtwoordzin private-key" -#: models/base.py:64 +#: models/base.py:88 msgid "Passphrase for the private key used by the SOAP client." msgstr "Wachtwoord voor de private-key voor de authenticatie-flow." -#: models/base.py:68 +#: models/base.py:92 msgid "signature algorithm" msgstr "signature algorithm" -#: models/base.py:73 +#: models/base.py:97 msgid "" "Signature algorithm. Note that DSA_SHA1 and RSA_SHA1 are deprecated, but " "RSA_SHA1 is still the default value in the SAMLv2 standard. Warning: there " @@ -197,11 +240,11 @@ msgstr "" "zijn bekende problemen met de single-logoutfunctionaliteit indien je een " "ander algoritme dan SHA1 gebruikt (door hardcoded algoritmes)." -#: models/base.py:81 +#: models/base.py:105 msgid "digest algorithm" msgstr "digest algorithm" -#: models/base.py:86 +#: models/base.py:110 msgid "" "Digest algorithm. Note that SHA1 is deprecated, but still the default value " "in the SAMLv2 standard. Warning: there are known issues with single-logout " @@ -209,43 +252,43 @@ msgid "" "algorithm." msgstr "" -#: models/base.py:94 +#: models/base.py:118 msgid "entity ID" msgstr "entity ID" -#: models/base.py:94 +#: models/base.py:118 msgid "Service provider entity ID." msgstr "Service provider entity ID." -#: models/base.py:97 +#: models/base.py:121 msgid "base URL" msgstr "Basis-URL" -#: models/base.py:98 +#: models/base.py:122 msgid "Base URL of the application, without trailing slash." msgstr "De basis-URL van de applicatie, zonder slash op het eind." -#: models/base.py:102 +#: models/base.py:126 msgid "service name" msgstr "servicenaam" -#: models/base.py:103 +#: models/base.py:127 msgid "Name of the service you are providing." msgstr "Naam van de service die je aanbiedt." -#: models/base.py:107 +#: models/base.py:131 msgid "service description" msgstr "Service-omschrijving" -#: models/base.py:108 +#: models/base.py:132 msgid "A description of the service you are providing." msgstr "Een beschrijving van de service die je aanbiedt." -#: models/base.py:112 +#: models/base.py:136 msgid "technical contact: phone number" msgstr "technisch contactpersoon: telefoonnummer" -#: models/base.py:115 +#: models/base.py:139 msgid "" "Telephone number of the technical person responsible for this DigiD/" "eHerkenning/eIDAS setup. For it to show up in the metata, you should also " @@ -255,11 +298,11 @@ msgstr "" "eIDAS-installatie. Je moet ook het e-mailadres opgeven voor dit in de " "metadata beschikbaar is." -#: models/base.py:122 +#: models/base.py:146 msgid "technical contact: email" msgstr "technisch contactpersoon: e-mailadres" -#: models/base.py:125 +#: models/base.py:149 msgid "" "Email address of the technical person responsible for this DigiD/eHerkenning/" "eIDAS setup. For it to show up in the metadata, you should also specify the " @@ -269,11 +312,11 @@ msgstr "" "eIDAS-installatie. Je moet ook het telefoonnummer opgeven voor dit in de " "metadata beschikbaar is." -#: models/base.py:132 +#: models/base.py:156 msgid "organization URL" msgstr "organisatie-URL" -#: models/base.py:135 +#: models/base.py:159 msgid "" "URL of the organization providing the service for which DigiD/eHerkenning/" "eIDAS login is configured. For it to show up in the metadata, you should " @@ -283,11 +326,11 @@ msgstr "" "eIDAS-authenticatie ingericht is. Je moet ook de organisatienaam opgeven " "voor dit in de metadata beschikbaar is." -#: models/base.py:142 +#: models/base.py:166 msgid "organization name" msgstr "organisatienaam" -#: models/base.py:145 +#: models/base.py:169 msgid "" "URL of the organization providing the service for which DigiD/eHerkenning/" "eIDAS login is configured. For it to show up in the metadata, you should " @@ -297,7 +340,18 @@ msgstr "" "eIDAS-authenticatie ingericht is. Je moet ook de URL opgeven voor dit in de " "metadata beschikbaar is." -#: models/base.py:167 +#: models/base.py:211 +#, python-brace-format +msgid "Failed to parse the metadata, got error: {err}" +msgstr "Kon de metadata niet verwerken. De fout is: {err}" + +#: models/base.py:217 +msgid "" +"Could not find any identity provider information in the metadata at the " +"provided URL." +msgstr "" + +#: models/base.py:246 msgid "You must select a certificate" msgstr "Je moet een certificaat selecteren" @@ -305,7 +359,7 @@ msgstr "Je moet een certificaat selecteren" msgid "Attribute consuming service index" msgstr "Attribute consuming service index" -#: models/digid.py:27 models/eherkenning.py:30 models/eherkenning.py:62 +#: models/digid.py:27 models/eherkenning.py:28 models/eherkenning.py:60 msgid "requested attributes" msgstr "gewenste attributen" @@ -329,23 +383,23 @@ msgstr "Single Logout is beschikbaar indien ingeschakeld" msgid "Digid configuration" msgstr "DigiD-configuratie" -#: models/eherkenning.py:15 +#: models/eherkenning.py:14 msgid "LoA" msgstr "LoA" -#: models/eherkenning.py:19 +#: models/eherkenning.py:17 msgid "Level of Assurance (LoA) to use for all the services." msgstr "Betrouwbaarheidsniveau (LoA) voor alle services." -#: models/eherkenning.py:23 +#: models/eherkenning.py:21 msgid "eHerkenning attribute consuming service index" msgstr "eHerkenning attribute consuming service index" -#: models/eherkenning.py:26 +#: models/eherkenning.py:24 msgid "Attribute consuming service index for the eHerkenning service" msgstr "Attribute consuming service index voor de eHerkenningservice" -#: models/eherkenning.py:33 models/eherkenning.py:65 +#: models/eherkenning.py:31 models/eherkenning.py:63 msgid "" "A list of additional requested attributes. A single requested attribute can " "be a string (the name of the attribute) or an object with keys 'name' and " @@ -355,15 +409,11 @@ msgstr "" "string (de naam van het attribuut) zijn of een object met de sleutels 'name' " "en 'required', waarbij 'name' een string is en 'required' een boolean." -#: models/eherkenning.py:36 +#: models/eherkenning.py:37 msgid "eHerkenning service UUID" msgstr "UUID eHerkenningservice" -#: models/eherkenning.py:44 -msgid "eHerkenning service instance UUID" -msgstr "UUID eHerkenningservice instance" - -#: models/eherkenning.py:42 +#: models/eherkenning.py:40 msgid "" "UUID of the eHerkenning service. Once entered into catalogues, changing the " "value is a manual process." @@ -371,7 +421,11 @@ msgstr "" "UUID van de eHerkenningservice. Eenmaal dit in catalogi opgenomen is kan de " "waarde enkel via een handmatig proces gewijzigd worden." -#: models/eherkenning.py:50 models/eherkenning.py:82 +#: models/eherkenning.py:45 +msgid "eHerkenning service instance UUID" +msgstr "UUID eHerkenningservice instance" + +#: models/eherkenning.py:48 msgid "" "UUID of the eHerkenning service instance. Once entered into catalogues, " "changing the value is a manual process." @@ -379,23 +433,19 @@ msgstr "" "UUID van de eHerkenningservice-instantie. Eenmaal dit in catalogi opgenomen " "is kan de waarde enkel via een handmatig proces gewijzigd worden." -#: models/eherkenning.py:55 +#: models/eherkenning.py:53 msgid "eIDAS attribute consuming service index" msgstr "eIDAS attribute consuming service index" -#: models/eherkenning.py:58 +#: models/eherkenning.py:56 msgid "Attribute consuming service index for the eIDAS service" msgstr "Attribute consuming service index voor de eIDAS-service" -#: models/eherkenning.py:68 +#: models/eherkenning.py:69 msgid "eIDAS service UUID" msgstr "UUID eIDAS-service" -#: models/eherkenning.py:76 -msgid "eIDAS service instance UUID" -msgstr "UUID eIDAS-service instance" - -#: models/eherkenning.py:71 +#: models/eherkenning.py:72 msgid "" "UUID of the eIDAS service. Once entered into catalogues, changing the value " "is a manual process." @@ -403,27 +453,31 @@ msgstr "" "UUID van de eIDAS-service. Eenmaal dit in catalogi opgenomen is kan de " "waarde enkel via een handmatig proces gewijzigd worden." -#: models/eherkenning.py:79 +#: models/eherkenning.py:77 +msgid "eIDAS service instance UUID" +msgstr "UUID eIDAS-service instance" + +#: models/eherkenning.py:80 msgid "" -"UUID of the eIDAS service instance. Once entered into catalogues, " -"changing the value is a manual process." +"UUID of the eIDAS service instance. Once entered into catalogues, changing " +"the value is a manual process." msgstr "" -"UUID van de eIDAS-service-instantie. Eenmaal dit in catalogi opgenomen " -"is kan de waarde enkel via een handmatig proces gewijzigd worden." +"UUID van de eIDAS-service-instantie. Eenmaal dit in catalogi opgenomen is " +"kan de waarde enkel via een handmatig proces gewijzigd worden." -#: models/eherkenning.py:87 +#: models/eherkenning.py:85 msgid "OIN" msgstr "OIN" -#: models/eherkenning.py:88 +#: models/eherkenning.py:86 msgid "The OIN of the company providing the service." msgstr "De OIN van het bedrijf dat de service aanbiedt." -#: models/eherkenning.py:93 +#: models/eherkenning.py:91 msgid "no eIDAS" msgstr "zonder eIDAS" -#: models/eherkenning.py:97 +#: models/eherkenning.py:95 msgid "" "If True, then the service catalogue will contain only the eHerkenning " "service." @@ -431,11 +485,11 @@ msgstr "" "Indien aangevinkt, dan zal de dienstcatalogus enkel de eHerkenningservice " "bevatten." -#: models/eherkenning.py:101 +#: models/eherkenning.py:99 msgid "privacy policy" msgstr "privacybeleid" -#: models/eherkenning.py:103 +#: models/eherkenning.py:101 msgid "" "The URL where the privacy policy from the organization providing the service " "can be found." @@ -443,35 +497,23 @@ msgstr "" "De URL waar het privacybeleid van de service-aanbieder (organisatie) " "beschreven staat." -#: models/eherkenning.py:109 +#: models/eherkenning.py:107 msgid "broker ID" msgstr "makelaar-ID" -#: models/eherkenning.py:110 +#: models/eherkenning.py:108 msgid "OIN of the broker used to set up eHerkenning/eIDAS." msgstr "OIN van de makelaar waarmee eHerkenning/eIDAS ingericht is." -#: models/eherkenning.py:115 -msgid "resolve artifact binding content type" -msgstr "Content-Type 'resolve artifact binding'" - -#: models/eherkenning.py:120 -msgid "" -"'application/soap+xml' is considered legacy and modern brokers typically " -"expect 'text/xml'." -msgstr "" -"'application/soap+xml' wordt als 'legacy' beschouwd. Moderne brokers " -"verwachten typisch 'text/xml'." - -#: models/eherkenning.py:125 +#: models/eherkenning.py:113 msgid "service language" msgstr "servicetaal" -#: models/eherkenning.py:128 +#: models/eherkenning.py:116 msgid "Metadata for eHerkenning/eidas will contain this language key" msgstr "eHerkenning/eIDAS-metadata zal deze taal bevatten" -#: models/eherkenning.py:132 +#: models/eherkenning.py:120 msgid "Eherkenning/eIDAS configuration" msgstr "eHerkenning/eIDAS-configuratie" @@ -484,29 +526,42 @@ msgstr "SAML metadata inzien (XML)" msgid "View service catalogue metadata (XML)" msgstr "Dienstcatalogus inzien (XML)" -#: validators.py:7 +#: validators.py:9 msgid "A valid OIN consists of 20 digits." msgstr "Een geldig OIN moet uit 20 cijfers bestaan." -#: views/digid.py:83 +#: validators.py:14 +msgid "Expected a numerical value." +msgstr "De waarde moet numeriek zijn." + +#: validators.py:60 +#, python-format +msgid "BSN should have %(size)i characters." +msgstr "Een BSN bestaat uit %(size)i getallen." + +#: validators.py:61 +msgid "Invalid BSN." +msgstr "Ongeldig BSN." + +#: views/digid.py:93 msgid "You have cancelled logging in with DigiD." msgstr "U heeft het inloggen met DigiD geannuleerd." -#: views/digid.py:135 +#: views/digid.py:145 msgid "You are not authenticated with Digid" msgstr "U bent niet ingelogd met DigiD." -#: views/eherkenning.py:97 +#: views/eherkenning.py:103 msgid "No RSIN returned by eHerkenning. Login to eHerkenning did not succeed." msgstr "" "eHerkenning gaf geen RSIN terug. Het inloggen moet eHerkenning is niet " "gelukt." -#: views/eherkenning.py:102 views/eherkenning.py:107 +#: views/eherkenning.py:108 views/eherkenning.py:113 msgid "Login to eHerkenning did not succeed. Please try again." msgstr "eHerkenning-login mislukt. Probeer het nogmaals" -#: views/metadata.py:31 +#: views/metadata.py:51 msgid "" "Something went wrong while generating the metadata. Please get in touch with " "your technical contact person and inform them the configuration is invalid." diff --git a/docs/conf.py b/docs/conf.py index a075240..bd14d59 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ author = "Maykin Media" # The full version, including alpha/beta/rc tags -release = "0.8.2" +release = "0.9.0" # -- General configuration --------------------------------------------------- diff --git a/setup.cfg b/setup.cfg index e1d2703..784e8d5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ # see http://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files [metadata] name = django-digid-eherkenning -version = 0.8.2 +version = 0.9.0 description = A Django app for DigiD/eHerkenning authentication flows long_description = file: README.rst url = https://github.com/maykinmedia/django-digid-eherkenning