From 84d646e05bb6fa1af4b40edd36b0772d1cb970d2 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Mon, 12 Mar 2018 14:23:01 +0100 Subject: [PATCH 01/29] Remove SURFisms --- app/Resources/translations/messages.en_GB.xliff | 8 ++++---- app/Resources/translations/messages.nl_NL.xliff | 8 ++++---- app/Resources/views/base.html.twig | 2 +- app/config/global_view_parameters.yml.dist | 4 ++-- app/config/parameters.yml.dist | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index cff4e6a7e..4bd70e4f0 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -85,7 +85,7 @@ ss.error.text.if_you_think_this_is_incorrect_report - Please report this error, including the error code, to the helpdesk via help@surfconext.nl + Please report this error, including the error code, to the helpdesk via help@example.org /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig @@ -95,7 +95,7 @@ ss.error.text.what_were_you_doing_well_fix_it - Please report this error, including the error code, to the helpdesk via help@surfconext.nl + Please report this error, including the error code, to the helpdesk via help@example.org /Resources/SurfnetStepupBundle/views/Exception/error.html.twig @@ -635,8 +635,8 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.test_second_factor.verification_successful - The test with your token was successful. You can login with Strong Authentication. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig + The test with your token was successful. You can login with OpenConext Stepup. + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig ss.verify_yubikey_command.otp.otp_invalid diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index afea327e4..2f5aafe49 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -85,7 +85,7 @@ ss.error.text.if_you_think_this_is_incorrect_report - Meld deze error code aan de helpdesk via support@surfconext.nl + Meld deze error code aan de helpdesk via support@example.org /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig @@ -95,7 +95,7 @@ ss.error.text.what_were_you_doing_well_fix_it - Meld deze error code aan de helpdesk via support@surfconext.nl + Meld deze error code aan de helpdesk via support@example.org /Resources/SurfnetStepupBundle/views/Exception/error.html.twig @@ -633,8 +633,8 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.test_second_factor.verification_successful - De test met je token is geslaagd. Je kunt inloggen met Sterke Authenticatie. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig + De test met je token is geslaagd. Je kunt inloggen met OpenConext Stepup. + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig ss.verify_yubikey_command.otp.otp_invalid diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index a1845d8d2..95bf5af39 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -22,7 +22,7 @@ {% endblock header %} {% block page_header %} diff --git a/app/config/global_view_parameters.yml.dist b/app/config/global_view_parameters.yml.dist index 126fa4e7f..225cf9ee5 100644 --- a/app/config/global_view_parameters.yml.dist +++ b/app/config/global_view_parameters.yml.dist @@ -3,5 +3,5 @@ # Strings containing '%' should be escaped by prepending '%' parameters: support_url: - en_GB: "https://support.surfconext.nl/faq-strong-authentication" - nl_NL: "https://support.surfconext.nl/faq-sterke-authenticatie" + en_GB: "https://support.example.org/faq-strong-authentication" + nl_NL: "https://support.example.org/faq-sterke-authenticatie" diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 4e119b8e4..d7ec31215 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -3,7 +3,7 @@ parameters: default_locale: en_GB locales: [nl_NL, en_GB] - locale_cookie_domain: surfconext.nl + locale_cookie_domain: example.org secret: NotSoSecretReplaceMe! debug_toolbar: true From 2f1b9b2fac40b685bf7cadaa527efc915f05c552 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Mon, 12 Mar 2018 14:23:16 +0100 Subject: [PATCH 02/29] Replace the logo --- app/Resources/views/base.html.twig | 2 +- web/images/SURFconext.png | Bin 7200 -> 0 bytes web/images/header-logo.png | Bin 0 -> 15143 bytes 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 web/images/SURFconext.png create mode 100644 web/images/header-logo.png diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index 95bf5af39..93597688b 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -22,7 +22,7 @@ {% endblock header %} {% block page_header %} diff --git a/web/images/SURFconext.png b/web/images/SURFconext.png deleted file mode 100644 index 5252e47531bdd8e85becf790309d174ad871176a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7200 zcmV+*9N*)KP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_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_od(j=-$OP&jzkd(;E{dkcg4H#q&keVhm3tur;PeDIM-jw(zT$3 zlyjORdA%@o+Zg$1skgvYCJO^*S?b1k=mRaB&xTbuheAX;E>Ah>pLKQ z^+jg2Aa~neUiHQNTG9giQ0DY zdK(q$W^Q1;OZ=s2`}}V96P%%Orf=!7jiloR60~v&b8?^MNd8gi?`3~1$4#E?KESNi zUs9Hha0;1e=|tUsB4xc;oaxCWEY+O4iNfK_W)f{XKKaJvGJ5BBc%)CIO*(Xw=z_nu z2fRK^!v_?P4VgJAbhBS-yKoE$paz(8J@D~vYrh=!;2D@MC5kF*XKxK}YkMy1v}3^Z z)$o04>8AxeY_D!Z_vPA90+r_$ccyS&&R{Y0XbRT4U*B=wTpoXnvt#Yvnf*1y<=XOh zeZl~q+e%F5wg({*VqI8hCfwqS=T{7BoMbg`#(tVPmZz)Llp->$tA6$BQ=KY%<$9qE@>$OR^(oB%{Q=GY-;a6jJ<+(h#$0-sXzION0v~C`P*Kp7FO{_j{y!W) BGdutQ literal 0 HcmV?d00001 From d181f7a238ee3f88baced01e83dd46bee872db43 Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Thu, 15 Mar 2018 11:58:58 +0100 Subject: [PATCH 03/29] Show the support URL instead of an email address on error pages --- .../views/Exception/error.html.twig | 2 +- .../views/Exception/error404.html.twig | 2 +- app/Resources/translations/messages.en_GB.xliff | 10 +++------- app/Resources/translations/messages.nl_NL.xliff | 10 +++------- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/app/Resources/SurfnetStepupBundle/views/Exception/error.html.twig b/app/Resources/SurfnetStepupBundle/views/Exception/error.html.twig index a393fb726..c35308c7a 100644 --- a/app/Resources/SurfnetStepupBundle/views/Exception/error.html.twig +++ b/app/Resources/SurfnetStepupBundle/views/Exception/error.html.twig @@ -11,5 +11,5 @@

{{ "now"|date('Y-m-d H:i:s') }}

{{ 'ss.error.text.your_art_code'|trans }}: #{{ art }}

-

{{ 'ss.error.text.what_were_you_doing_well_fix_it'|trans }}

+

{{ 'ss.error.text.if_you_think_this_is_incorrect_report'|trans({'%support_url%': global_view_parameters.supportUrl })|raw }}

{% endblock %} diff --git a/app/Resources/SurfnetStepupBundle/views/Exception/error404.html.twig b/app/Resources/SurfnetStepupBundle/views/Exception/error404.html.twig index 8a8eb1b85..9e9eee195 100644 --- a/app/Resources/SurfnetStepupBundle/views/Exception/error404.html.twig +++ b/app/Resources/SurfnetStepupBundle/views/Exception/error404.html.twig @@ -11,5 +11,5 @@

{{ "now"|date('Y-m-d H:i:s') }}

{{ 'ss.error.text.your_art_code'|trans }}: #{{ art }}

-

{{ 'ss.error.text.if_you_think_this_is_incorrect_report'|trans }}

+

{{ 'ss.error.text.if_you_think_this_is_incorrect_report'|trans({'%support_url%': global_view_parameters.supportUrl })|raw }}

{% endblock %} diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index 4bd70e4f0..805698400 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -85,7 +85,8 @@ ss.error.text.if_you_think_this_is_incorrect_report - Please report this error, including the error code, to the helpdesk via help@example.org + Visit <a href="%support_url%" target="_blank">the support page</a> if this does not fix your problem. On this page you will find more information about possible causes of the error and how to contact the support team. + /Resources/SurfnetStepupBundle/views/Exception/error.html.twig /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig @@ -93,11 +94,6 @@ The page you requested was not found. Please try again or go back to 'Home'. /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - ss.error.text.what_were_you_doing_well_fix_it - Please report this error, including the error code, to the helpdesk via help@example.org - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - ss.error.text.your_art_code The error code is diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index 2f5aafe49..a1b2152b4 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -85,7 +85,8 @@ ss.error.text.if_you_think_this_is_incorrect_report - Meld deze error code aan de helpdesk via support@example.org + Bezoek <a href="%support_url%" target="_blank">de support pagina</a> als dit je probleem niet oplost. Op deze pagina vind je meer informatie over de mogelijk oorzaken en hoe je contact kan opnemen met het supportteam. + /Resources/SurfnetStepupBundle/views/Exception/error.html.twig /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig @@ -93,11 +94,6 @@ De pagina die je zocht kan niet gevonden worden. Probeer het nog eens, of ga terug naar Home. /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - ss.error.text.what_were_you_doing_well_fix_it - Meld deze error code aan de helpdesk via support@example.org - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - ss.error.text.your_art_code De fout code is From 074082629d7d773a7730f12f2a29e0a324e9cdc5 Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Thu, 15 Mar 2018 12:02:05 +0100 Subject: [PATCH 04/29] Generalize the 'token test successful' message The user should never see the name stepup anyway and generalizing by not showing the vendor name (OpenConext) is easier. --- app/Resources/translations/messages.en_GB.xliff | 2 +- app/Resources/translations/messages.nl_NL.xliff | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index 805698400..9cfcc79f4 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -631,7 +631,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.test_second_factor.verification_successful - The test with your token was successful. You can login with OpenConext Stepup. + The test with your token was successful. You can login with your token. /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index a1b2152b4..4cde3560d 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -629,7 +629,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.test_second_factor.verification_successful - De test met je token is geslaagd. Je kunt inloggen met OpenConext Stepup. + De test met je token is geslaagd. Je kunt inloggen met je token. /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig From 78f0fa2d503c0dab11cedad78d82888fa1b1f952 Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Wed, 14 Mar 2018 17:07:48 +0100 Subject: [PATCH 05/29] Use the generic error page for all exceptions Instead of rendering specific error pages on a case-by-case basis, handle all exceptions in the stepup-bundle exception controller. This way, all error pages look the same with only the page title and error description tailored to the specific error. Logging of exceptions is also handled by the exception controller. The following error templates are removed and the error is handled using the exception controller: * authnFailed.html.twig * preconditionNotMet.html.twig * blank page in case of 'access denied' And specific user error messages are shown for the following error conditions: * response is missing a required attribute * unknown service provider * request not signed * request signed with unsupported algorithm * request signature validation failed See: - https://www.pivotaltracker.com/story/show/137516239 - https://www.pivotaltracker.com/story/show/155515714 --- .../views/Exception/error.html.twig | 15 -- .../views/Exception/error404.html.twig | 15 -- .../translations/messages.en_GB.xliff | 214 ++++++++++++------ .../translations/messages.nl_NL.xliff | 214 ++++++++++++------ app/config/config.yml | 2 +- composer.json | 4 +- composer.lock | 56 +++-- .../Controller/ExceptionController.php | 49 ++++ .../MissingRequiredAttributeException.php | 25 ++ .../Saml/Exception/authnFailed.html.twig | 12 - .../Exception/preconditionNotMet.html.twig | 9 - .../ProcessSamlAuthenticationHandler.php | 45 +--- .../Authentication/Provider/SamlProvider.php | 5 +- 13 files changed, 402 insertions(+), 263 deletions(-) delete mode 100644 app/Resources/SurfnetStepupBundle/views/Exception/error.html.twig delete mode 100644 app/Resources/SurfnetStepupBundle/views/Exception/error404.html.twig create mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php create mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Exception/MissingRequiredAttributeException.php delete mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/authnFailed.html.twig delete mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/preconditionNotMet.html.twig diff --git a/app/Resources/SurfnetStepupBundle/views/Exception/error.html.twig b/app/Resources/SurfnetStepupBundle/views/Exception/error.html.twig deleted file mode 100644 index c35308c7a..000000000 --- a/app/Resources/SurfnetStepupBundle/views/Exception/error.html.twig +++ /dev/null @@ -1,15 +0,0 @@ -{% extends '::base.html.twig' %} - -{% block page_title %}{{ 'ss.error.title'|trans({'status_code': statusCode, 'status_text': statusText}) }}{% endblock %} - -{% block content %} -

{{ block('page_title') }}

- -

{{ 'ss.error.text.an_error_occurred'|trans({'status_code': statusCode, 'status_text': statusText}) }}

- {{ 'ss.error.button.go_home'|trans }} - -
-

{{ "now"|date('Y-m-d H:i:s') }}

-

{{ 'ss.error.text.your_art_code'|trans }}: #{{ art }}

-

{{ 'ss.error.text.if_you_think_this_is_incorrect_report'|trans({'%support_url%': global_view_parameters.supportUrl })|raw }}

-{% endblock %} diff --git a/app/Resources/SurfnetStepupBundle/views/Exception/error404.html.twig b/app/Resources/SurfnetStepupBundle/views/Exception/error404.html.twig deleted file mode 100644 index 9e9eee195..000000000 --- a/app/Resources/SurfnetStepupBundle/views/Exception/error404.html.twig +++ /dev/null @@ -1,15 +0,0 @@ -{% extends '::base.html.twig' %} - -{% block page_title %}{{ 'ss.error.page_not_found.title'|trans }}{% endblock %} - -{% block content %} -

{{ block('page_title') }}

- -

{{ 'ss.error.text.page_not_found'|trans }}

- {{ 'ss.error.button.go_home'|trans }} - -
-

{{ "now"|date('Y-m-d H:i:s') }}

-

{{ 'ss.error.text.your_art_code'|trans }}: #{{ art }}

-

{{ 'ss.error.text.if_you_think_this_is_incorrect_report'|trans({'%support_url%': global_view_parameters.supportUrl })|raw }}

-{% endblock %} diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index 9cfcc79f4..deb2500bc 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -42,69 +42,6 @@ Nederlands /../vendor/surfnet/stepup-bundle/src/Resources/views/translations.twig - - ss.error.button.go_home - Back to Home - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.page_not_found.title - Page not found - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.saml_authn_failed.button.try_again - Retry to sign-in - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/authnFailed.html.twig - - - ss.error.saml_authn_failed.text.authn_failed - Sign in unsuccessful. Please try again. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/authnFailed.html.twig - - - ss.error.saml_authn_failed.title - Sign in - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/authnFailed.html.twig - - - ss.error.saml_precondition_not_met.text.precondition_not_met - You are not authorised to log in. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/preconditionNotMet.html.twig - - - ss.error.saml_precondition_not_met.title - Sign in - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/preconditionNotMet.html.twig - - - ss.error.text.an_error_occurred - Oops! Something went wrong. Go back to try again or go to the home screen. - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - - - ss.error.text.if_you_think_this_is_incorrect_report - Visit <a href="%support_url%" target="_blank">the support page</a> if this does not fix your problem. On this page you will find more information about possible causes of the error and how to contact the support team. - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.text.page_not_found - The page you requested was not found. Please try again or go back to 'Home'. - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.text.your_art_code - The error code is - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.title - Error - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - ss.flash.error_while_switching_locale Due to an unknown reason, switching locales failed. @@ -488,18 +425,18 @@ For all devices with a USB port. ss.second_factor.list.button.register_second_factor Register token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.list.text.add_second_factor Add new token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.list.text.no_second_factors There are no tokens registered for your account. Click on 'Register token' to register a new token. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.list.text.unverified @@ -537,12 +474,12 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.second_factor.revoke.button.revoke Remove - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.button.test Test - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.second_factor_type.sms @@ -597,12 +534,12 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.second_factor_list.header.second_factor_identifier ID - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor_list.header.type Token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.security.session_expired.click_to_login @@ -632,7 +569,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.test_second_factor.verification_successful The test with your token was successful. You can login with your token. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig ss.verify_yubikey_command.otp.otp_invalid @@ -644,6 +581,139 @@ An e-mail with your activation code has been sent to the e-mail address %email%. The verification of the YubiKey code failed due to unknown reasons. Please try again. /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig + + stepup.error.authentication_error.description + Sign in unsuccessful. Please try again. + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.authentication_error.title + Sign in + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.authn_failed.description + Sign in unsuccessful. Please try again. + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.authn_failed.title + Sign in + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.back_button + Back + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + + + stepup.error.error_code + Error code + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.generic_error.description + Something went wrong. Please try again. + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.generic_error.title + Oops! + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.hostname + Application + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.ip_address + IP address + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.missing_required_attribute.title + Missing required attribute + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php + + + stepup.error.page_not_found.text + The page you requested was not found. Please try again or go back to Home. + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + + + stepup.error.page_not_found.title + Page not found + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + + + stepup.error.precondition_not_met.description + You are not authorised to sign in + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.precondition_not_met.title + Not authorised to sign in + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.request_id + Request ID + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.signature_validation_failed.description + The SAML request has been signed but the signature could not be validated. + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.signature_validation_failed.title + Signature validation failed + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.support_page.text + the support page if this does not fix your problem. On this page you will find more information about possible causes of the error and how to contact the support team.]]> + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + + + stepup.error.timestamp + Time + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.unknown_service_provider.title + Unknown service provider + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.unsigned_request.description + The SAML request is expected to be signed but it was not + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.unsigned_request.title + Unsigned request + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.unsupported_signature.description + The SAMLRequest has been signed, but the signature format is not supported + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.unsupported_signature.title + Unsupported signature format + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.user_agent + User agent + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + stepup_middleware_client.form.switch_locale.switch Switch diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index 4cde3560d..7979b8c9c 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -42,69 +42,6 @@ Nederlands /../vendor/surfnet/stepup-bundle/src/Resources/views/translations.twig - - ss.error.button.go_home - Terug naar Home - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.page_not_found.title - Pagina niet gevonden - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.saml_authn_failed.button.try_again - Inloggen - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/authnFailed.html.twig - - - ss.error.saml_authn_failed.text.authn_failed - Inloggen mislukt. Probeer het nog eens. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/authnFailed.html.twig - - - ss.error.saml_authn_failed.title - Log in - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/authnFailed.html.twig - - - ss.error.saml_precondition_not_met.text.precondition_not_met - Je hebt niet de juiste rechten om in te mogen loggen. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/preconditionNotMet.html.twig - - - ss.error.saml_precondition_not_met.title - Log in - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/preconditionNotMet.html.twig - - - ss.error.text.an_error_occurred - Oeps! Er ging iets mis. Ga terug om het opnieuw te proberen of ga naar het beginscherm. - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - - - ss.error.text.if_you_think_this_is_incorrect_report - Bezoek <a href="%support_url%" target="_blank">de support pagina</a> als dit je probleem niet oplost. Op deze pagina vind je meer informatie over de mogelijk oorzaken en hoe je contact kan opnemen met het supportteam. - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.text.page_not_found - De pagina die je zocht kan niet gevonden worden. Probeer het nog eens, of ga terug naar Home. - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.text.your_art_code - De fout code is - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - /Resources/SurfnetStepupBundle/views/Exception/error404.html.twig - - - ss.error.title - Foutmelding - /Resources/SurfnetStepupBundle/views/Exception/error.html.twig - ss.flash.error_while_switching_locale Due to an unknown reason, switching locales failed. @@ -488,17 +425,17 @@ Geschikt voor alle devices met een USB-poort. ss.second_factor.list.button.register_second_factor Registreer token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.list.text.add_second_factor Registreer nieuw token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.list.text.no_second_factors Er zijn geen tokens geregistreerd voor jouw account. Klik op 'Registreer token' om een nieuw token te registreren. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.list.text.unverified @@ -535,12 +472,12 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.second_factor.revoke.button.revoke Verwijderen - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.button.test Testen - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.second_factor_type.sms @@ -595,12 +532,12 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.second_factor_list.header.second_factor_identifier ID - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor_list.header.type Token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.security.session_expired.click_to_login @@ -630,7 +567,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.test_second_factor.verification_successful De test met je token is geslaagd. Je kunt inloggen met je token. - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig ss.verify_yubikey_command.otp.otp_invalid @@ -642,6 +579,139 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d Het verifiëren van de YubiKey-code is wegens een onbekende reden niet gelukt. Probeer het opnieuw. /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig + + stepup.error.authentication_error.description + Inloggen mislukt. Probeer het nog eens. + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.authentication_error.title + Inloggen + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.authn_failed.description + Inloggen mislukt. Probeer het nog eens. + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.authn_failed.title + Inloggen + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.back_button + Terug + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + + + stepup.error.error_code + Foutcode + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.generic_error.description + Something went wrong. Please try again. + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.generic_error.title + Oeps! + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.hostname + Applicatie + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.ip_address + IP-adres + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.missing_required_attribute.title + Attribuut ontbreekt + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php + + + stepup.error.page_not_found.text + De pagina die je zocht kan niet gevonden worden. Probeer het nog eens, of ga terug naar Home. + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + + + stepup.error.page_not_found.title + Pagina niet gevonden + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + + + stepup.error.precondition_not_met.description + Je hebt niet de juiste rechten om in te mogen loggen. + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.precondition_not_met.title + Onvoldoende rechten om in te loggen + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.request_id + Request ID + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.signature_validation_failed.description + Het SAML bericht is ondertekend maar de signature kan niet gevalideerd worden + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.signature_validation_failed.title + Verificatie van signature mislukt + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.support_page.text + de support pagina als dit je probleem niet oplost. Op deze pagina vind je meer informatie over de mogelijk oorzaken en hoe je contact kan opnemen met het supportteam.]]> + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + + + stepup.error.timestamp + Tijd + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + + + stepup.error.unknown_service_provider.title + Onbekende serviceprovider + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.unsigned_request.description + Het SAML bericht moet ondertekend zijn maar bevat geen signature + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.unsigned_request.title + Geen signature in SAML bericht + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.unsupported_signature.description + Het SAML bericht is ondertekend, maar het signature formaat wordt niet ondersteund + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.unsupported_signature.title + Signature formaat wordt niet ondersteund + /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php + + + stepup.error.user_agent + User agent + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + stepup_middleware_client.form.switch_locale.switch Vertalen diff --git a/app/config/config.yml b/app/config/config.yml index 06135c32a..963820e1b 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -35,7 +35,7 @@ framework: twig: debug: "%kernel.debug%" strict_variables: "%kernel.debug%" - exception_controller: SurfnetStepupBundle:Exception:show + exception_controller: SurfnetStepupSelfServiceSelfServiceBundle:Exception:show globals: global_view_parameters: "@self_service.service.global_view_parameters" diff --git a/composer.json b/composer.json index 1d522565a..3d6ebd214 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,8 @@ "jms/di-extra-bundle": "~1.4.0", "surfnet/stepup-middleware-client-bundle": "^2.0", "guzzlehttp/guzzle": "^6", - "surfnet/stepup-saml-bundle": "^3.0", - "surfnet/stepup-bundle": "^3.2", + "surfnet/stepup-saml-bundle": "dev-feature/specific-error-pages as 3.0.0", + "surfnet/stepup-bundle": "dev-feature/specific-error-pages as 3.0.0", "surfnet/stepup-u2f-bundle": "dev-develop", "mopa/composer-bridge": "~1.5", "openconext/monitor-bundle": "^1.0", diff --git a/composer.lock b/composer.lock index 6f35e5811..a94f87749 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "0ded687d1bc7a1d86d78d88c1c92baba", + "content-hash": "5fdc668061995778751ba2a62b22d443", "packages": [ { "name": "beberlei/assert", @@ -2144,16 +2144,16 @@ }, { "name": "surfnet/stepup-bundle", - "version": "3.2.0", + "version": "dev-feature/specific-error-pages", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-bundle.git", - "reference": "547c5bcb8fe1841fa657bbf43c5ea4b8e575ec3a" + "reference": "ece8c34dfdefa24f266b11ae9afadc595429ba3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/547c5bcb8fe1841fa657bbf43c5ea4b8e575ec3a", - "reference": "547c5bcb8fe1841fa657bbf43c5ea4b8e575ec3a", + "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/ece8c34dfdefa24f266b11ae9afadc595429ba3b", + "reference": "ece8c34dfdefa24f266b11ae9afadc595429ba3b", "shasum": "" }, "require": { @@ -2164,6 +2164,7 @@ "monolog/monolog": "~1.11", "php": "^5.6|^7.0", "sensio/framework-extra-bundle": "~3", + "surfnet/stepup-saml-bundle": "dev-feature/specific-error-pages as 3.0.0", "symfony/config": "^2.7", "symfony/dependency-injection": "^2.7", "symfony/form": "^2.7", @@ -2197,20 +2198,20 @@ "suaas", "surfnet" ], - "time": "2018-03-14T13:11:17+00:00" + "time": "2018-03-15T14:23:07+00:00" }, { "name": "surfnet/stepup-middleware-client-bundle", - "version": "2.3.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-Middleware-clientbundle.git", - "reference": "ae0912254c4090de400a84a76db387e76e896c4d" + "reference": "9706c3e63dee41cc11e331b3057f885b8772eb66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-Middleware-clientbundle/zipball/ae0912254c4090de400a84a76db387e76e896c4d", - "reference": "ae0912254c4090de400a84a76db387e76e896c4d", + "url": "https://api.github.com/repos/OpenConext/Stepup-Middleware-clientbundle/zipball/9706c3e63dee41cc11e331b3057f885b8772eb66", + "reference": "9706c3e63dee41cc11e331b3057f885b8772eb66", "shasum": "" }, "require": { @@ -2220,6 +2221,7 @@ "php": "^5.6|^7.0", "psr/log": "~1.0", "ramsey/uuid": "^3.4", + "surfnet/stepup-bundle": "^3.0", "symfony/config": "^2.7", "symfony/dependency-injection": "^2.7", "symfony/http-kernel": "^2.7", @@ -2250,20 +2252,20 @@ "Apache-2.0" ], "description": "Symfony2 bundle for consuming the Step-up Middleware API.", - "time": "2018-01-18T08:54:37+00:00" + "time": "2018-03-08T15:25:18+00:00" }, { "name": "surfnet/stepup-saml-bundle", - "version": "3.0.0", + "version": "dev-feature/specific-error-pages", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-saml-bundle.git", - "reference": "67e24599a6402fdf602304851bfff915c0c4609c" + "reference": "322378f48a168d8d1eb9281af4772ba61c63ca6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-saml-bundle/zipball/67e24599a6402fdf602304851bfff915c0c4609c", - "reference": "67e24599a6402fdf602304851bfff915c0c4609c", + "url": "https://api.github.com/repos/OpenConext/Stepup-saml-bundle/zipball/322378f48a168d8d1eb9281af4772ba61c63ca6a", + "reference": "322378f48a168d8d1eb9281af4772ba61c63ca6a", "shasum": "" }, "require": { @@ -2298,7 +2300,7 @@ "stepup", "surfnet" ], - "time": "2018-01-17T12:59:03+00:00" + "time": "2018-03-15T08:14:44+00:00" }, { "name": "surfnet/stepup-u2f-bundle", @@ -2306,12 +2308,12 @@ "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-u2f-bundle.git", - "reference": "b28737d7b8df5ecbdf7a1e952ecfb530a2951c05" + "reference": "67d8400160c5c9048cdd4354303d59243edbb7bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-u2f-bundle/zipball/b28737d7b8df5ecbdf7a1e952ecfb530a2951c05", - "reference": "b28737d7b8df5ecbdf7a1e952ecfb530a2951c05", + "url": "https://api.github.com/repos/OpenConext/Stepup-u2f-bundle/zipball/67d8400160c5c9048cdd4354303d59243edbb7bf", + "reference": "67d8400160c5c9048cdd4354303d59243edbb7bf", "shasum": "" }, "require": { @@ -2340,7 +2342,7 @@ "Apache-2.0" ], "description": "The SURFnet Step-up U2F bundle contains server-side device verification, and the necessary forms and resources to enable client-side U2F interaction with Step-up Identities", - "time": "2015-09-17T15:02:04+00:00" + "time": "2017-01-27T08:45:00+00:00" }, { "name": "symfony/assetic-bundle", @@ -4547,11 +4549,25 @@ "alias_normalized": "3.0.0.0-beta5", "version": "9999999-dev", "package": "mopa/bootstrap-bundle" + }, + { + "alias": "3.0.0", + "alias_normalized": "3.0.0.0", + "version": "dev-feature/specific-error-pages", + "package": "surfnet/stepup-saml-bundle" + }, + { + "alias": "3.0.0", + "alias_normalized": "3.0.0.0", + "version": "dev-feature/specific-error-pages", + "package": "surfnet/stepup-bundle" } ], "minimum-stability": "stable", "stability-flags": { "mopa/bootstrap-bundle": 20, + "surfnet/stepup-saml-bundle": 20, + "surfnet/stepup-bundle": 20, "surfnet/stepup-u2f-bundle": 20 }, "prefer-stable": false, diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php new file mode 100644 index 000000000..8593d1815 --- /dev/null +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/ExceptionController.php @@ -0,0 +1,49 @@ +getTranslator(); + + if ($exception instanceof MissingRequiredAttributeException) { + $title = $translator->trans('stepup.error.missing_required_attribute.title'); + $description = $exception->getMessage(); + } + + if (isset($title) && isset($description)) { + return [ + 'title' => $title, + 'description' => $description, + ]; + } + + return parent::getPageTitleAndDescription($exception); + } +} diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Exception/MissingRequiredAttributeException.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Exception/MissingRequiredAttributeException.php new file mode 100644 index 000000000..cf0d17949 --- /dev/null +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Exception/MissingRequiredAttributeException.php @@ -0,0 +1,25 @@ +{{ block('page_title') }} - -

{{ 'ss.error.saml_authn_failed.text.authn_failed'|trans }}

- - {{ 'ss.error.saml_authn_failed.button.try_again'|trans }} - -{% endblock %} diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/preconditionNotMet.html.twig b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/preconditionNotMet.html.twig deleted file mode 100644 index c02a8acee..000000000 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Saml/Exception/preconditionNotMet.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% extends '::base.html.twig' %} - -{% block page_title %}{{ 'ss.error.saml_precondition_not_met.title'|trans }}{% endblock %} - -{% block content %} -

{{ block('page_title') }}

- -

{{ 'ss.error.saml_precondition_not_met.text.precondition_not_met'|trans }}

-{% endblock %} diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Handler/ProcessSamlAuthenticationHandler.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Handler/ProcessSamlAuthenticationHandler.php index fea07b282..9f393de1e 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Handler/ProcessSamlAuthenticationHandler.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Handler/ProcessSamlAuthenticationHandler.php @@ -18,9 +18,6 @@ namespace Surfnet\StepupSelfService\SelfServiceBundle\Security\Authentication\Handler; -use Exception; -use SAML2\Response\Exception\PreconditionNotMetException; -use Surfnet\SamlBundle\Http\Exception\AuthnFailedSamlResponseException; use Surfnet\SamlBundle\Monolog\SamlAuthenticationLogger; use Surfnet\SamlBundle\SAML2\Response\Assertion\InResponseTo; use Surfnet\StepupSelfService\SelfServiceBundle\Security\Authentication\AuthenticatedSessionStateHandler; @@ -29,7 +26,6 @@ use Surfnet\StepupSelfService\SelfServiceBundle\Security\Authentication\Token\SamlToken; use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; @@ -109,37 +105,9 @@ public function process(GetResponseEvent $event) $logger->notice('No authenticated user and AuthnRequest pending, attempting to process SamlResponse'); - try { - $assertion = $this->samlInteractionProvider->processSamlResponse($event->getRequest()); - } catch (AuthnFailedSamlResponseException $exception) { - $logger->notice(sprintf('SAML Authentication failed at IdP: "%s"', $exception->getMessage())); - $responseBody = $this->templating->render( - 'SurfnetStepupSelfServiceSelfServiceBundle:Saml/Exception:authnFailed.html.twig', - ['exception' => $exception] - ); - - $event->setResponse(new Response($responseBody, Response::HTTP_UNAUTHORIZED)); - - return; - } catch (PreconditionNotMetException $exception) { - $logger->notice(sprintf('SAMLResponse precondition not met: "%s"', $exception->getMessage())); - $responseBody = $this->templating->render( - 'SurfnetStepupSelfServiceSelfServiceBundle:Saml/Exception:preconditionNotMet.html.twig', - ['exception' => $exception] - ); - - $event->setResponse(new Response($responseBody, Response::HTTP_UNAUTHORIZED)); - - return; - } catch (Exception $exception) { - $logger->error(sprintf('Failed SAMLResponse Parsing: "%s"', $exception->getMessage())); - - throw new AuthenticationException('Failed SAMLResponse parsing', 0, $exception); - } + $assertion = $this->samlInteractionProvider->processSamlResponse($event->getRequest()); if (!InResponseTo::assertEquals($assertion, $expectedInResponseTo)) { - $logger->error('Unknown or unexpected InResponseTo in SAMLResponse'); - throw new AuthenticationException('Unknown or unexpected InResponseTo in SAMLResponse'); } @@ -148,16 +116,7 @@ public function process(GetResponseEvent $event) $token = new SamlToken(); $token->assertion = $assertion; - try { - $authToken = $this->authenticationManager->authenticate($token); - } catch (AuthenticationException $failed) { - $logger->error(sprintf('Authentication Failed, reason: "%s"', $failed->getMessage())); - - // By default deny authorization - $event->setResponse(new Response('', Response::HTTP_FORBIDDEN)); - - return; - } + $authToken = $this->authenticationManager->authenticate($token); $this->authenticatedSession->logAuthenticationMoment(); $this->tokenStorage->setToken($authToken); diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Provider/SamlProvider.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Provider/SamlProvider.php index bfaf0ab7a..1918d6394 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Provider/SamlProvider.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Provider/SamlProvider.php @@ -23,6 +23,7 @@ use Surfnet\SamlBundle\SAML2\Response\AssertionAdapter; use Surfnet\StepupMiddlewareClientBundle\Identity\Dto\Identity; use Surfnet\StepupMiddlewareClientBundle\Uuid\Uuid; +use Surfnet\StepupSelfService\SelfServiceBundle\Exception\MissingRequiredAttributeException; use Surfnet\StepupSelfService\SelfServiceBundle\Locale\PreferredLocaleProvider; use Surfnet\StepupSelfService\SelfServiceBundle\Security\Authentication\Token\SamlToken; use Surfnet\StepupSelfService\SelfServiceBundle\Service\IdentityService; @@ -118,7 +119,7 @@ private function getSingleStringValue($attribute, AssertionAdapter $translatedAs $values = $translatedAssertion->getAttributeValue($attribute); if (empty($values)) { - throw new BadCredentialsException(sprintf('Missing value for required attribute "%s"', $attribute)); + throw new MissingRequiredAttributeException(sprintf('Missing value for required attribute "%s"', $attribute)); } // see https://www.pivotaltracker.com/story/show/121296389 @@ -141,7 +142,7 @@ private function getSingleStringValue($attribute, AssertionAdapter $translatedAs $this->logger->warning($message); - throw new BadCredentialsException($message); + throw new MissingRequiredAttributeException($message); } return $value; From 176bfff57969b4627c10f5c9ad8bc2b2a5c0d3fd Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Wed, 21 Mar 2018 14:03:16 +0100 Subject: [PATCH 06/29] Update of Stepup-saml-bundle and Stepup-bundle Versions where bumped to version 4.0.0 for the stepup-saml-bundle and 3.2.0 for the stepup-bundle. --- composer.json | 4 ++-- composer.lock | 38 ++++++++++++-------------------------- 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/composer.json b/composer.json index 3d6ebd214..2b92007cb 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,8 @@ "jms/di-extra-bundle": "~1.4.0", "surfnet/stepup-middleware-client-bundle": "^2.0", "guzzlehttp/guzzle": "^6", - "surfnet/stepup-saml-bundle": "dev-feature/specific-error-pages as 3.0.0", - "surfnet/stepup-bundle": "dev-feature/specific-error-pages as 3.0.0", + "surfnet/stepup-saml-bundle": "^4.0", + "surfnet/stepup-bundle": "^3.3", "surfnet/stepup-u2f-bundle": "dev-develop", "mopa/composer-bridge": "~1.5", "openconext/monitor-bundle": "^1.0", diff --git a/composer.lock b/composer.lock index a94f87749..486a69a13 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "5fdc668061995778751ba2a62b22d443", + "content-hash": "25b06d1f3bac31fa01b5fec0fd811713", "packages": [ { "name": "beberlei/assert", @@ -2144,16 +2144,16 @@ }, { "name": "surfnet/stepup-bundle", - "version": "dev-feature/specific-error-pages", + "version": "3.3.3", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-bundle.git", - "reference": "ece8c34dfdefa24f266b11ae9afadc595429ba3b" + "reference": "6ac86cdcf6bbc2e0c50408fff7cafa7a5445a8fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/ece8c34dfdefa24f266b11ae9afadc595429ba3b", - "reference": "ece8c34dfdefa24f266b11ae9afadc595429ba3b", + "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/6ac86cdcf6bbc2e0c50408fff7cafa7a5445a8fb", + "reference": "6ac86cdcf6bbc2e0c50408fff7cafa7a5445a8fb", "shasum": "" }, "require": { @@ -2164,7 +2164,7 @@ "monolog/monolog": "~1.11", "php": "^5.6|^7.0", "sensio/framework-extra-bundle": "~3", - "surfnet/stepup-saml-bundle": "dev-feature/specific-error-pages as 3.0.0", + "surfnet/stepup-saml-bundle": "^4.0", "symfony/config": "^2.7", "symfony/dependency-injection": "^2.7", "symfony/form": "^2.7", @@ -2198,7 +2198,7 @@ "suaas", "surfnet" ], - "time": "2018-03-15T14:23:07+00:00" + "time": "2018-03-22T14:15:12+00:00" }, { "name": "surfnet/stepup-middleware-client-bundle", @@ -2256,16 +2256,16 @@ }, { "name": "surfnet/stepup-saml-bundle", - "version": "dev-feature/specific-error-pages", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-saml-bundle.git", - "reference": "322378f48a168d8d1eb9281af4772ba61c63ca6a" + "reference": "9bb7098248c7b60c8b2cbc74d996b027de69e68a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-saml-bundle/zipball/322378f48a168d8d1eb9281af4772ba61c63ca6a", - "reference": "322378f48a168d8d1eb9281af4772ba61c63ca6a", + "url": "https://api.github.com/repos/OpenConext/Stepup-saml-bundle/zipball/9bb7098248c7b60c8b2cbc74d996b027de69e68a", + "reference": "9bb7098248c7b60c8b2cbc74d996b027de69e68a", "shasum": "" }, "require": { @@ -2300,7 +2300,7 @@ "stepup", "surfnet" ], - "time": "2018-03-15T08:14:44+00:00" + "time": "2018-03-21T09:35:58+00:00" }, { "name": "surfnet/stepup-u2f-bundle", @@ -4549,25 +4549,11 @@ "alias_normalized": "3.0.0.0-beta5", "version": "9999999-dev", "package": "mopa/bootstrap-bundle" - }, - { - "alias": "3.0.0", - "alias_normalized": "3.0.0.0", - "version": "dev-feature/specific-error-pages", - "package": "surfnet/stepup-saml-bundle" - }, - { - "alias": "3.0.0", - "alias_normalized": "3.0.0.0", - "version": "dev-feature/specific-error-pages", - "package": "surfnet/stepup-bundle" } ], "minimum-stability": "stable", "stability-flags": { "mopa/bootstrap-bundle": 20, - "surfnet/stepup-saml-bundle": 20, - "surfnet/stepup-bundle": 20, "surfnet/stepup-u2f-bundle": 20 }, "prefer-stable": false, From f463690979d3f56a9c56af569027a0156c3084bc Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 22 Mar 2018 13:28:35 +0100 Subject: [PATCH 07/29] Translate English translation to Dutch --- app/Resources/translations/messages.nl_NL.xliff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index 7979b8c9c..0ecbe5647 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -44,7 +44,7 @@
ss.flash.error_while_switching_locale - Due to an unknown reason, switching locales failed. + Door een onbekende oorzaak is het wisselen van taal mislukt. /../src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/LocaleController.php @@ -576,7 +576,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.verify_yubikey_command.otp.verification_error - Het verifiëren van de YubiKey-code is wegens een onbekende reden niet gelukt. Probeer het opnieuw. + Het verifiëren van de YubiKey-code is wegens een onbekende reden nigelukt. Probeer het opnieuw. /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig @@ -613,7 +613,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.generic_error.description - Something went wrong. Please try again. + Er is iets mis gegaan, Probeer het opnieuw. /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php From 1986a14aff0ee6bb0d5ca1b8eed982f39b4e89a5 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 22 Mar 2018 13:36:59 +0100 Subject: [PATCH 08/29] Remove app.subname from base.html.twig --- .../translations/messages.en_GB.xliff | 28 ++++++------------- .../translations/messages.nl_NL.xliff | 28 ++++++------------- app/Resources/views/base.html.twig | 1 - 3 files changed, 18 insertions(+), 39 deletions(-) diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index deb2500bc..794402eeb 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -17,15 +17,10 @@ /Resources/views/base.html.twig /Resources/views/base.html.twig - - app.subname - Authentication in two steps - /Resources/views/base.html.twig - button.logout Sign out - /Resources/views/base.html.twig + /Resources/views/base.html.twig country code @@ -559,7 +554,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.support_url_text Help - /Resources/views/base.html.twig + /Resources/views/base.html.twig ss.test_second_factor.verification_failed @@ -603,15 +598,10 @@ An e-mail with your activation code has been sent to the e-mail address %email%. Sign in /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php - - stepup.error.back_button - Back - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig - stepup.error.error_code Error code - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.generic_error.description @@ -631,7 +621,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.ip_address IP address - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.missing_required_attribute.title @@ -661,7 +651,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.request_id Request ID - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.signature_validation_failed.description @@ -676,8 +666,8 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.support_page.text the support page if this does not fix your problem. On this page you will find more information about possible causes of the error and how to contact the support team.]]> - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig stepup.error.timestamp @@ -712,7 +702,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.user_agent User agent - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup_middleware_client.form.switch_locale.switch diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index 0ecbe5647..3817aa5e3 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -17,15 +17,10 @@ /Resources/views/base.html.twig /Resources/views/base.html.twig - - app.subname - Inloggen in twee stappen - /Resources/views/base.html.twig - button.logout Uitloggen - /Resources/views/base.html.twig + /Resources/views/base.html.twig country code @@ -557,7 +552,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.support_url_text Help - /Resources/views/base.html.twig + /Resources/views/base.html.twig ss.test_second_factor.verification_failed @@ -601,15 +596,10 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d Inloggen /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php - - stepup.error.back_button - Terug - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig - stepup.error.error_code Foutcode - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.generic_error.description @@ -629,7 +619,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.ip_address IP-adres - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.missing_required_attribute.title @@ -659,7 +649,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.request_id Request ID - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.signature_validation_failed.description @@ -674,8 +664,8 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.support_page.text de support pagina als dit je probleem niet oplost. Op deze pagina vind je meer informatie over de mogelijk oorzaken en hoe je contact kan opnemen met het supportteam.]]> - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig stepup.error.timestamp @@ -710,7 +700,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.user_agent User agent - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup_middleware_client.form.switch_locale.switch diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index 93597688b..3f1cda9b6 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -24,7 +24,6 @@ {% if app.user %}
From c8d2131edf20064b7ab84078d27a336a64400271 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 29 Mar 2018 11:56:44 +0200 Subject: [PATCH 09/29] Simplify the 'add token' UI section The add token button was accompanied by a text that did not render very neatly together. Creating a possibly confusing UI for the end user. By simplifying the desing, the intent of the button is made much clearer. --- .../translations/messages.en_GB.xliff | 29 ++++++++----------- .../translations/messages.nl_NL.xliff | 29 ++++++++----------- .../views/SecondFactor/list.html.twig | 10 +++---- 3 files changed, 28 insertions(+), 40 deletions(-) diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index 794402eeb..e8af81e87 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -419,13 +419,8 @@ For all devices with a USB port. ss.second_factor.list.button.register_second_factor - Register token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig - - - ss.second_factor.list.text.add_second_factor - Add new token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + Add token + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.list.text.no_second_factors @@ -469,12 +464,12 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.second_factor.revoke.button.revoke Remove - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.button.test Test - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.second_factor_type.sms @@ -529,12 +524,12 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.second_factor_list.header.second_factor_identifier ID - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor_list.header.type Token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.security.session_expired.click_to_login @@ -601,7 +596,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.error_code Error code - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.generic_error.description @@ -621,7 +616,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.ip_address IP address - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.missing_required_attribute.title @@ -651,7 +646,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.request_id Request ID - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.signature_validation_failed.description @@ -666,7 +661,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.support_page.text the support page if this does not fix your problem. On this page you will find more information about possible causes of the error and how to contact the support team.]]> - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig @@ -702,7 +697,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. stepup.error.user_agent User agent - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup_middleware_client.form.switch_locale.switch diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index 3817aa5e3..28bdc489c 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -419,13 +419,8 @@ Geschikt voor alle devices met een USB-poort. ss.second_factor.list.button.register_second_factor - Registreer token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig - - - ss.second_factor.list.text.add_second_factor - Registreer nieuw token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + Token toevoegen + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.list.text.no_second_factors @@ -467,12 +462,12 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.second_factor.revoke.button.revoke Verwijderen - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.button.test Testen - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.second_factor_type.sms @@ -527,12 +522,12 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.second_factor_list.header.second_factor_identifier ID - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor_list.header.type Token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.security.session_expired.click_to_login @@ -599,7 +594,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.error_code Foutcode - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.generic_error.description @@ -619,7 +614,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.ip_address IP-adres - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.missing_required_attribute.title @@ -649,7 +644,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.request_id Request ID - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup.error.signature_validation_failed.description @@ -664,7 +659,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.support_page.text de support pagina als dit je probleem niet oplost. Op deze pagina vind je meer informatie over de mogelijk oorzaken en hoe je contact kan opnemen met het supportteam.]]> - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error404.html.twig @@ -700,7 +695,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.user_agent User agent - /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig + /../vendor/surfnet/stepup-bundle/src/Resources/views/Exception/error.html.twig stepup_middleware_client.form.switch_locale.switch diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig index 8f6388805..bfe9d3458 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig @@ -16,13 +16,11 @@ %} {% if (unverifiedSecondFactors.elements is empty and verifiedSecondFactors.elements is empty and vettedSecondFactors.elements is empty) %}

{{ 'ss.second_factor.list.text.no_second_factors'|trans }}

- {% else %} -

{{ 'ss.second_factor.list.text.add_second_factor'|trans }}

{% endif %} - - {{ 'ss.second_factor.list.button.register_second_factor'|trans }} - + + {{ 'ss.second_factor.list.button.register_second_factor'|trans }} + {% endif %} {% endblock %} From 8c7c4f05c35be00d1a5c46aeaccdf6eefddbb106 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Wed, 28 Mar 2018 15:09:27 +0200 Subject: [PATCH 10/29] Update the testSecondFactorAction This action no longer requres a SecondFactorId to test. The token to test is selected by the authenticating user in the WAYG. Some restyling of the code was applied during this update. --- .../Controller/SamlController.php | 24 +++++++++---------- .../Resources/config/routing.yml | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SamlController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SamlController.php index e73be9428..c2726c6b5 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SamlController.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SamlController.php @@ -21,7 +21,7 @@ use Exception; use Surfnet\SamlBundle\Http\XMLResponse; use Surfnet\SamlBundle\SAML2\Response\Assertion\InResponseTo; -use Surfnet\StepupBundle\Value\SecondFactorType; +use Surfnet\StepupBundle\Value\Loa; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -30,41 +30,39 @@ class SamlController extends Controller { /** - * @param string $secondFactorId + * A SelfService user is able to test it's token in this endpoint * * @return \Symfony\Component\HttpFoundation\RedirectResponse * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @throws \Symfony\Component\Security\Core\Exception\AccessDeniedException */ - public function testSecondFactorAction($secondFactorId) + public function testSecondFactorAction() { $logger = $this->get('logger'); $logger->notice('Starting second factor test'); $secondFactorService = $this->get('surfnet_stepup_self_service_self_service.service.second_factor'); - $identity = $this->getIdentity(); + $loaResolutionService = $this->get('surfnet_stepup.service.loa_resolution'); + $identity = $this->getIdentity(); - if (!$secondFactorService->identityHasSecondFactorOfStateWithId($identity->id, 'vetted', $secondFactorId)) { + $vettedSecondFactors = $secondFactorService->findVettedByIdentity($identity->id); + if (!$vettedSecondFactors || $vettedSecondFactors->getTotalItems() === 0) { $logger->error( sprintf( - 'Identity "%s" tried to test second factor "%s", but does not own that second factor or it is not vetted', - $identity->id, - $secondFactorId + 'Identity "%s" tried to test a second factor, but does not own a suitable vetted token.', + $identity->id ) ); throw new NotFoundHttpException(); } - $loaResolutionService = $this->get('surfnet_stepup.service.loa_resolution'); $authenticationRequestFactory = $this->get('self_service.test_second_factor_authentication_request_factory'); - $secondFactorTypeService = $this->get('surfnet_stepup.service.second_factor_type'); - $secondFactor = $secondFactorService->findOneVetted($secondFactorId); - $secondFactorType = new SecondFactorType($secondFactor->type); + // By requesting LoA 2 any relevant token can be tested (LoA 2 and 3) $authenticationRequest = $authenticationRequestFactory->createSecondFactorTestRequest( $identity->nameId, - $loaResolutionService->getLoaByLevel($secondFactorTypeService->getLevel($secondFactorType)) + $loaResolutionService->getLoaByLevel(Loa::LOA_2) ); $this->get('session')->set('second_factor_test_request_id', $authenticationRequest->getRequestId()); diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/routing.yml b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/routing.yml index 9dad338f8..27e9a390d 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/routing.yml +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/routing.yml @@ -9,7 +9,7 @@ ss_second_factor_list: defaults: { _controller: SurfnetStepupSelfServiceSelfServiceBundle:SecondFactor:list } ss_second_factor_test: - path: /second-factor/{secondFactorId}/test + path: /second-factor/test methods: [GET] defaults: { _controller: SurfnetStepupSelfServiceSelfServiceBundle:Saml:testSecondFactor } From c5edf5411e9634c37a4603a00b857cec1e3c6a81 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Wed, 28 Mar 2018 15:30:34 +0200 Subject: [PATCH 11/29] Move the test buttons to the table footer The vetted token overview no longer has a token test button per token. A single test button is placed in the footer of the table instead. The button text was modified to make the intent of the button clearer. --- app/Resources/translations/messages.en_GB.xliff | 8 ++++---- app/Resources/translations/messages.nl_NL.xliff | 8 ++++---- .../Resources/views/SecondFactor/list.html.twig | 16 +++++++++++----- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index e8af81e87..298372f84 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -464,12 +464,12 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.second_factor.revoke.button.revoke Remove - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.button.test - Test - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + Test a token + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.second_factor_type.sms diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index 28bdc489c..adc9dca99 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -462,12 +462,12 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.second_factor.revoke.button.revoke Verwijderen - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.button.test - Testen - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + Test een token + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.second_factor_type.sms diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig index bfe9d3458..9c191560d 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig @@ -45,11 +45,6 @@ {{ secondFactor.secondFactorIdentifier }}
From 5e0682de570be18ae354ec5891ed986fcf371c26 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Tue, 3 Apr 2018 12:10:13 +0200 Subject: [PATCH 12/29] Collect Available tokens in a collection When displaying the second factor tokens in the registration overview, we want them to be sorted in LoA, alphabetical order. This was not possible without sorting them in a collection as hard coded and gssp tokens where passed individually to the template. The new collection stores AvailableTokenInterface implementations. And contains sorting logic. --- .../Value/AvailableTokenCollectionTest.php | 78 +++++++++++++ .../Value/AvailableTokenCollection.php | 72 ++++++++++++ .../Value/AvailableTokenInterface.php | 42 +++++++ .../SelfServiceBundle/Value/GsspToken.php | 104 ++++++++++++++++++ .../Value/HardcodedToken.php | 90 +++++++++++++++ 5 files changed, 386 insertions(+) create mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Tests/Value/AvailableTokenCollectionTest.php create mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php create mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenInterface.php create mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Value/GsspToken.php create mode 100644 src/Surfnet/StepupSelfService/SelfServiceBundle/Value/HardcodedToken.php diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Tests/Value/AvailableTokenCollectionTest.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Tests/Value/AvailableTokenCollectionTest.php new file mode 100644 index 000000000..bd8e2466c --- /dev/null +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Tests/Value/AvailableTokenCollectionTest.php @@ -0,0 +1,78 @@ + 'sms', 'yubikey' => 'yubikey']; + $gssp = [ + 'fatima' => $this->getViewConfig('fatima', 2), + 'tiqr' => $this->getViewConfig('tiqr', 3), + 'biometric' => $this->getViewConfig('biometric', 3), + ]; + $collection = AvailableTokenCollection::from($nonGssp, $gssp); + + $this->assertCount(5, $collection->getData()); + + $expextedSortOrder = ['fatima', 'sms', 'biometric', 'tiqr', 'yubikey']; + $this->assertEquals($expextedSortOrder, array_keys($collection->getData())); + } + + public function test_create_from_empty_input() + { + $nonGssp = []; + $gssp = []; + $collection = AvailableTokenCollection::from($nonGssp, $gssp); + + $this->assertCount(0, $collection->getData()); + } + + public function test_create_from_only_gssp() + { + $nonGssp = []; + $gssp = [ + 'irma' => $this->getViewConfig('irma', 2), + 'tiqr' => $this->getViewConfig('tiqr', 3), + 'aauth' => $this->getViewConfig('aauth', 3), + 'xerxes' => $this->getViewConfig('xerxes', 2), + 'biometric' => $this->getViewConfig('biometric', 3), + 'fatima' => $this->getViewConfig('fatima', 2), + ]; + $collection = AvailableTokenCollection::from($nonGssp, $gssp); + + $this->assertCount(6, $collection->getData()); + + $expextedSortOrder = ['fatima', 'irma', 'xerxes', 'aauth', 'biometric', 'tiqr']; + $this->assertEquals($expextedSortOrder, array_keys($collection->getData())); + } + + private function getViewConfig($tokenType, $loa) + { + $mock = \Mockery::mock(ViewConfig::class); + $mock->shouldReceive('getLoa')->andReturn($loa); + $mock->shouldReceive('getType')->andReturn($tokenType); + return $mock; + } +} diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php new file mode 100644 index 000000000..d106c6be3 --- /dev/null +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php @@ -0,0 +1,72 @@ +collection[$token] = HardcodedToken::fromSecondFactorType($token); + } + + foreach ($gsspTokens as $type => $token) { + $collection->collection[$type] = GsspToken::fromViewConfig($token, $type); + } + + return $collection; + } + + /** + * Sorts and returns the available tokens + * @return AvailableTokenInterface[] + */ + public function getData() + { + $this->sortCollection(); + return $this->collection; + } + + private function sortCollection() + { + // The collection is first sorted by LoA level and then in alphabetic order. + uasort($this->collection, function (AvailableTokenInterface $a, AvailableTokenInterface $b) { + if ($a->getLoaLevel() === $b->getLoaLevel()) { + return strcmp($a->getType(), $b->getType()); + } + return $a->getLoaLevel() > $b->getLoaLevel(); + }); + } +} diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenInterface.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenInterface.php new file mode 100644 index 000000000..6454969c5 --- /dev/null +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenInterface.php @@ -0,0 +1,42 @@ +viewConfig = $viewConfig; + $this->type = $type; + } + + /** + * @return string + */ + public function getRoute() + { + return 'ss_registration_gssf_initiate'; + } + + /** + * @return mixed + */ + public function getType() + { + return $this->type; + } + + /** + * @return int + */ + public function getLoaLevel() + { + return (int) $this->viewConfig->getLoa(); + } + + /** + * @return boolean + */ + public function isGssp() + { + return true; + } + + public function getRouteParams() + { + return [ + 'provider' => $this->type, + ]; + } + + public function getViewConfig() + { + return $this->viewConfig; + } +} diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/HardcodedToken.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/HardcodedToken.php new file mode 100644 index 000000000..1a921cc74 --- /dev/null +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/HardcodedToken.php @@ -0,0 +1,90 @@ + [ + 'loaLevel' => 2, + 'route' => 'ss_registration_sms_send_challenge' + ], + 'u2f' => [ + 'loaLevel' => 3, + 'route' => 'ss_registration_u2f_registration' + ], + 'yubikey' => [ + 'loaLevel' => 3, + 'route' => 'ss_registration_yubikey_prove_possession' + ], + ]; + + private $type; + + /** + * @param $type + * @return HardcodedToken + */ + public static function fromSecondFactorType($type) + { + if (!isset(self::$supportedTypes[$type])) { + throw InvalidArgumentException::invalidType('valid second factor type', 'type', $type); + } + return new self($type); + } + + private function __construct($type) + { + $this->type = $type; + } + + /** + * @return string + */ + public function getRoute() + { + return self::$supportedTypes[$this->type]['route']; + } + + /** + * @return mixed + */ + public function getType() + { + return $this->type; + } + + /** + * @return int + */ + public function getLoaLevel() + { + return self::$supportedTypes[$this->type]['loaLevel']; + } + + /** + * @return boolean + */ + public function isGssp() + { + return false; + } +} From d3274c003ce0463de538d0a0a982bb54f596cb52 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Tue, 3 Apr 2018 12:10:43 +0200 Subject: [PATCH 13/29] Implement the usage of AvailableTokenCollection --- .../Controller/RegistrationController.php | 7 ++- .../displaySecondFactorTypes.html.twig | 47 +++++++------------ 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RegistrationController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RegistrationController.php index 070779135..c8032caa4 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RegistrationController.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RegistrationController.php @@ -23,6 +23,7 @@ use Mpdf\Output\Destination as MpdfDestination; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Surfnet\StepupSelfService\SelfServiceBundle\Service\SecondFactorService; +use Surfnet\StepupSelfService\SelfServiceBundle\Value\AvailableTokenCollection; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -70,10 +71,12 @@ public function displaySecondFactorTypesAction() unset($secondFactors->available[$index]); } } + + $availableTokens = AvailableTokenCollection::from($secondFactors->available, $availableGsspSecondFactors); + return [ 'commonName' => $this->getIdentity()->commonName, - 'availableSecondFactors' => $secondFactors->available, - 'availableGsspSecondFactors' => $availableGsspSecondFactors, + 'availableSecondFactors' => $availableTokens, 'verifyEmail' => $this->emailVerificationIsRequired(), ]; } diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Registration/displaySecondFactorTypes.html.twig b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Registration/displaySecondFactorTypes.html.twig index 905c9974f..b0c593846 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Registration/displaySecondFactorTypes.html.twig +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/Registration/displaySecondFactorTypes.html.twig @@ -12,36 +12,23 @@

{{ block('page_title') }}

- {% if availableSecondFactors.sms is defined %} - {% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with { - 'type': 'sms', - 'security': 2, - 'url': path('ss_registration_sms_send_challenge'), - } only %} - {% endif %} - {% if availableSecondFactors.yubikey is defined %} - {% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with { - 'type': 'yubikey', - 'security': 3, - 'url': path('ss_registration_yubikey_prove_possession'), - } only %} - {% endif %} - {% if availableSecondFactors.u2f is defined %} - {% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with { - 'type': 'u2f', - 'security': 3, - 'url': path('ss_registration_u2f_registration'), - } only %} - {% endif %} - {% for type, secondFactor in availableGsspSecondFactors %} - {% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/genericSecondFactor.html.twig' with { - 'type': type, - 'security': secondFactor.loa, - 'url': path('ss_registration_gssf_initiate', {'provider': type}), - 'appAndroidUrl': secondFactor.androidUrl, - 'appIosUrl': secondFactor.iosUrl, - 'secondFactor': secondFactor - } only %} + {% for type, secondFactor in availableSecondFactors.data %} + {% if secondFactor.isGssp %} + {% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/genericSecondFactor.html.twig' with { + 'type': type, + 'security': secondFactor.loaLevel, + 'url': path(secondFactor.route, secondFactor.routeParams), + 'appAndroidUrl': secondFactor.viewConfig.androidUrl, + 'appIosUrl': secondFactor.viewConfig.iosUrl, + 'secondFactor': secondFactor.viewConfig + } only %} + {% else %} + {% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with { + 'type': type, + 'security': secondFactor.loaLevel, + 'url': path(secondFactor.route), + } only %} + {% endif %} {% endfor %}
{% endblock %} From aa1553458daaa2e2557af939ad218c5269495e4f Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 5 Apr 2018 14:26:07 +0200 Subject: [PATCH 14/29] Rename HardcodedToken to BuiltInToken BuiltIn sounds less hacky. And in the process the static private variable has been moved out of its static context. --- .../Tests/Value/AvailableTokenCollectionTest.php | 5 +++-- .../Value/AvailableTokenCollection.php | 8 ++++---- .../{HardcodedToken.php => BuiltInToken.php} | 16 ++++++++-------- 3 files changed, 15 insertions(+), 14 deletions(-) rename src/Surfnet/StepupSelfService/SelfServiceBundle/Value/{HardcodedToken.php => BuiltInToken.php} (86%) diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Tests/Value/AvailableTokenCollectionTest.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Tests/Value/AvailableTokenCollectionTest.php index bd8e2466c..0022fffa5 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Tests/Value/AvailableTokenCollectionTest.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Tests/Value/AvailableTokenCollectionTest.php @@ -31,12 +31,13 @@ public function test_create_from() 'fatima' => $this->getViewConfig('fatima', 2), 'tiqr' => $this->getViewConfig('tiqr', 3), 'biometric' => $this->getViewConfig('biometric', 3), + 'intrinsic' => $this->getViewConfig('intrinsic', 1), ]; $collection = AvailableTokenCollection::from($nonGssp, $gssp); - $this->assertCount(5, $collection->getData()); + $this->assertCount(6, $collection->getData()); - $expextedSortOrder = ['fatima', 'sms', 'biometric', 'tiqr', 'yubikey']; + $expextedSortOrder = ['intrinsic', 'fatima', 'sms', 'biometric', 'tiqr', 'yubikey']; $this->assertEquals($expextedSortOrder, array_keys($collection->getData())); } diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php index d106c6be3..897c30c75 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php @@ -30,16 +30,16 @@ class AvailableTokenCollection private $collection = []; /** - * @param array $hardcodedTokens + * @param array $builtInTokens * @param array $gsspTokens * @return AvailableTokenCollection */ - public static function from(array $hardcodedTokens, array $gsspTokens) + public static function from(array $builtInTokens, array $gsspTokens) { $collection = new self(); - foreach ($hardcodedTokens as $token) { - $collection->collection[$token] = HardcodedToken::fromSecondFactorType($token); + foreach ($builtInTokens as $token) { + $collection->collection[$token] = BuiltInToken::fromSecondFactorType($token); } foreach ($gsspTokens as $type => $token) { diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/HardcodedToken.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/BuiltInToken.php similarity index 86% rename from src/Surfnet/StepupSelfService/SelfServiceBundle/Value/HardcodedToken.php rename to src/Surfnet/StepupSelfService/SelfServiceBundle/Value/BuiltInToken.php index 1a921cc74..b639b5af2 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/HardcodedToken.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/BuiltInToken.php @@ -20,9 +20,9 @@ use Surfnet\StepupSelfService\SelfServiceBundle\Exception\InvalidArgumentException; -class HardcodedToken implements AvailableTokenInterface +class BuiltInToken implements AvailableTokenInterface { - private static $supportedTypes = [ + private $supportedTypes = [ 'sms' => [ 'loaLevel' => 2, 'route' => 'ss_registration_sms_send_challenge' @@ -41,18 +41,18 @@ class HardcodedToken implements AvailableTokenInterface /** * @param $type - * @return HardcodedToken + * @return BuiltInToken */ public static function fromSecondFactorType($type) { - if (!isset(self::$supportedTypes[$type])) { - throw InvalidArgumentException::invalidType('valid second factor type', 'type', $type); - } return new self($type); } private function __construct($type) { + if (!isset($this->supportedTypes[$type])) { + throw InvalidArgumentException::invalidType('valid second factor type', 'type', $type); + } $this->type = $type; } @@ -61,7 +61,7 @@ private function __construct($type) */ public function getRoute() { - return self::$supportedTypes[$this->type]['route']; + return $this->supportedTypes[$this->type]['route']; } /** @@ -77,7 +77,7 @@ public function getType() */ public function getLoaLevel() { - return self::$supportedTypes[$this->type]['loaLevel']; + return $this->supportedTypes[$this->type]['loaLevel']; } /** From 0c6e4d40e8a04ddf6d01a3d523bb875ced62540a Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 5 Apr 2018 14:29:50 +0200 Subject: [PATCH 15/29] Fix return value of order callback function The LoA comparison returned a boolean value where a numeric value is in order. This is not an actual problem as PHP is very forgiving. --- .../SelfServiceBundle/Value/AvailableTokenCollection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php index 897c30c75..c635ae9cc 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Value/AvailableTokenCollection.php @@ -66,7 +66,7 @@ private function sortCollection() if ($a->getLoaLevel() === $b->getLoaLevel()) { return strcmp($a->getType(), $b->getType()); } - return $a->getLoaLevel() > $b->getLoaLevel(); + return $a->getLoaLevel() > $b->getLoaLevel() ? 1 : -1; }); } } From 6801dccf7c3a980e921e0bbeb431188bff283870 Mon Sep 17 00:00:00 2001 From: Pieter van der Meulen Date: Wed, 14 Mar 2018 17:50:34 +0100 Subject: [PATCH 16/29] Change dev logging configuration to use syslog instead of graylog --- app/config/config_dev.yml | 47 ++++++++++----------------------------- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index 9d9254b05..a01868173 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -11,45 +11,22 @@ web_profiler: toolbar: "%debug_toolbar%" intercept_redirects: "%debug_redirects%" -# Be careful not to remove the prod-signaler handler, which overwrites -# the prod-signaler handler defined in logging.yml. The handler defined -# in logging.yml disables bubbling which means that none of the handlers -# below are invoked. Since the current dev setup is incompatible with the -# prod setup defined in logging.yml, this means we won't see any logs in -# the infrastructure currently used (graylog). Overwriting the handler -# here resolves that and reinstates the dev logging setup. -# -# this configuration must be replaced to reflect production setup -# see https://www.pivotaltracker.com/story/show/96056010 -# +# The monolog configuration below overwrites the in logging.yml that +# is normally used for production. monolog: handlers: prod-signaler: - type: group - members: - - main_graylog - - main_logfile - - main_debuglog - main_graylog: - type: buffer - handler: graylog - level: NOTICE - main_logfile: - type: stream - handler: logfile - level: NOTICE - path: %kernel.logs_dir%/%kernel.environment%.log + type: fingers_crossed + action_level: ERROR + passthru_level: DEBUG # DEV setting: this means that all message of level DEBUG or higher are always logged + #passthru_level: NOTICE # PROD setting this means that all message of level NOTICE or higher are always logged + handler: main_syslog + bubble: false # if we handle it, nothing else should + main_syslog: + type: syslog + ident: stepup-selfservice + facility: user formatter: surfnet_stepup.monolog.json_formatter - main_debuglog: - type: stream - handler: logfile - level: DEBUG - path: "%kernel.logs_dir%/%kernel.environment%.debug.log" - formatter: surfnet_stepup.monolog.json_formatter - graylog: - type: gelf - publisher: { hostname: %graylog_hostname% } - formatter: surfnet_stepup.monolog.full_message_exception_gelf_message_formatter assetic: use_controller: "%use_assetic_controller%" From f9cf305efb9eb568d84f0da70c59440696c7ac02 Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Mon, 9 Apr 2018 12:26:12 +0200 Subject: [PATCH 17/29] Remove unused production configuration for monolog Logging for production is configured in logging.yml. The configuration in config.yml had no effect in production because the prod-signaler in logging.yml is configured to not bubble messages to other handlers. --- app/config/config.yml | 21 --------------------- app/config/parameters.yml.dist | 1 - 2 files changed, 22 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index 963820e1b..28d5a042a 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -67,27 +67,6 @@ nelmio_security: # Content types: default, script, object, style, img, media, frame, font, connect default: [ self ] -monolog: - handlers: - main: - type: group - members: - - main_graylog - - main_logfile - main_graylog: - type: buffer - handler: graylog - level: NOTICE - main_logfile: - type: stream - handler: logfile - level: NOTICE - path: %kernel.logs_dir%/%kernel.environment%.log - graylog: - type: gelf - publisher: { hostname: %graylog_hostname% } - formatter: surfnet_stepup.monolog.full_message_exception_gelf_message_formatter - mopa_bootstrap: form: show_legend: false diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index d7ec31215..2ed2fe296 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -32,7 +32,6 @@ parameters: saml_remote_idp_entity_id: saml_remote_idp_sso_url: saml_remote_idp_certificate: 'FOR CI ONLY, REPLACE WITH ACTUAL VALUE' - graylog_hostname: g2-dev.stepup.coin.surf.net asset_version: 1 second_factor_test_idp_entity_id: ~ From 020c12803b8d368a49c53d23d679efdb4ce245c4 Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Mon, 9 Apr 2018 12:30:42 +0200 Subject: [PATCH 18/29] Enable file logging for development The development configuration now logs to two destinations: - fingers crossed to syslog (DEBUG and higher, action leven ERROR) - log all notices and higher to app/logs/dev.log --- app/config/config_dev.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index a01868173..08ca0450c 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -21,12 +21,17 @@ monolog: passthru_level: DEBUG # DEV setting: this means that all message of level DEBUG or higher are always logged #passthru_level: NOTICE # PROD setting this means that all message of level NOTICE or higher are always logged handler: main_syslog - bubble: false # if we handle it, nothing else should + bubble: true main_syslog: type: syslog ident: stepup-selfservice facility: user formatter: surfnet_stepup.monolog.json_formatter + main_logfile: + type: stream + handler: logfile + level: NOTICE + path: %kernel.logs_dir%/%kernel.environment%.log assetic: use_controller: "%use_assetic_controller%" From b0344519b76e2fd57d2939728017d9c9e8d1774a Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Mon, 9 Apr 2018 13:19:58 +0200 Subject: [PATCH 19/29] Update stepup-bundle to 3.4.0 --- composer.json | 2 +- composer.lock | 67 +++++---------------------------------------------- 2 files changed, 7 insertions(+), 62 deletions(-) diff --git a/composer.json b/composer.json index 2b92007cb..dc541c3b2 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "surfnet/stepup-middleware-client-bundle": "^2.0", "guzzlehttp/guzzle": "^6", "surfnet/stepup-saml-bundle": "^4.0", - "surfnet/stepup-bundle": "^3.3", + "surfnet/stepup-bundle": "^3.4.0", "surfnet/stepup-u2f-bundle": "dev-develop", "mopa/composer-bridge": "~1.5", "openconext/monitor-bundle": "^1.0", diff --git a/composer.lock b/composer.lock index 486a69a13..23e41bc62 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "25b06d1f3bac31fa01b5fec0fd811713", + "content-hash": "c2782be1c2cb93499ebb9d04d40b1b58", "packages": [ { "name": "beberlei/assert", @@ -511,59 +511,6 @@ ], "time": "2014-08-26T16:36:44+00:00" }, - { - "name": "graylog2/gelf-php", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/bzikarsky/gelf-php.git", - "reference": "bc1175a5b40f585e69a017647286d84211e82544" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bzikarsky/gelf-php/zipball/bc1175a5b40f585e69a017647286d84211e82544", - "reference": "bc1175a5b40f585e69a017647286d84211e82544", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.3", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-4": { - "Gelf\\": "src/Gelf" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Benjamin Zikarsky", - "email": "benjamin@zikarsky.de" - }, - { - "name": "gelf-php contributors", - "homepage": "https://github.com/bzikarsky/gelf-php/contributors" - } - ], - "description": "A php implementation to send log-messages to a GELF compatible backend like Graylog2.", - "time": "2016-06-02T06:04:56+00:00" - }, { "name": "guzzlehttp/guzzle", "version": "6.2.3", @@ -2144,22 +2091,21 @@ }, { "name": "surfnet/stepup-bundle", - "version": "3.3.3", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-bundle.git", - "reference": "6ac86cdcf6bbc2e0c50408fff7cafa7a5445a8fb" + "reference": "e0afaa26ffd0a38bb89b55e95761fe9555b6670f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/6ac86cdcf6bbc2e0c50408fff7cafa7a5445a8fb", - "reference": "6ac86cdcf6bbc2e0c50408fff7cafa7a5445a8fb", + "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/e0afaa26ffd0a38bb89b55e95761fe9555b6670f", + "reference": "e0afaa26ffd0a38bb89b55e95761fe9555b6670f", "shasum": "" }, "require": { "ext-gmp": "*", "ext-openssl": "*", - "graylog2/gelf-php": "^1.5", "guzzlehttp/guzzle": "^6.0", "monolog/monolog": "~1.11", "php": "^5.6|^7.0", @@ -2174,7 +2120,6 @@ "symfony/validator": "^2.7" }, "require-dev": { - "liip/rmt": "1.1.*", "mockery/mockery": "0.9.*", "phpmd/phpmd": "^2.0", "phpunit/phpunit": "^4.0", @@ -2198,7 +2143,7 @@ "suaas", "surfnet" ], - "time": "2018-03-22T14:15:12+00:00" + "time": "2018-04-09T11:13:53+00:00" }, { "name": "surfnet/stepup-middleware-client-bundle", From 29d5d7c9344eef53bfdd50138d2670d8b8de218b Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Tue, 10 Apr 2018 16:17:05 +0200 Subject: [PATCH 20/29] Remove the max_number_of_tokens setting The global max_number_of_tokens / number_of_tokens_per_identity setting is now configured in Middleware. It's no longer practical to also track this configuration option in SelfService. Any number_of_tokens_per_identity related settings will be loaded from the Middleware api. --- app/config/config.yml | 1 - app/config/parameters.yml.dist | 3 --- .../SelfServiceBundle/DependencyInjection/Configuration.php | 3 --- .../SurfnetStepupSelfServiceSelfServiceExtension.php | 5 ----- 4 files changed, 12 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index 28d5a042a..5cd1481f0 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -144,7 +144,6 @@ jms_translation: extractors: [] surfnet_stepup_self_service_self_service: - max_number_of_tokens: %number_of_tokens_per_identity% enabled_second_factors: %enabled_second_factors% enabled_generic_second_factors: %enabled_generic_second_factors% second_factor_test_identity_provider: diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 2ed2fe296..d6efd89ac 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -60,6 +60,3 @@ parameters: session_max_absolute_lifetime: 3600 # 1 hours * 60 minutes * 60 seconds session_max_relative_lifetime: 600 # 10 minutes * 60 seconds - - # The maximum number of tokens each identity (person) can register. - number_of_tokens_per_identity: 2 diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/DependencyInjection/Configuration.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/DependencyInjection/Configuration.php index 0e423ac29..3cf42db72 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/DependencyInjection/Configuration.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/DependencyInjection/Configuration.php @@ -34,9 +34,6 @@ public function getConfigTreeBuilder() $this->appendSecondFactorTestIdentityProvider($childNodes); $this->appendSessionConfiguration($childNodes); - $childNodes->integerNode('max_number_of_tokens') - ->isRequired(); - return $treeBuilder; } diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/DependencyInjection/SurfnetStepupSelfServiceSelfServiceExtension.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/DependencyInjection/SurfnetStepupSelfServiceSelfServiceExtension.php index 81384ed63..5d7acafe5 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/DependencyInjection/SurfnetStepupSelfServiceSelfServiceExtension.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/DependencyInjection/SurfnetStepupSelfServiceSelfServiceExtension.php @@ -63,11 +63,6 @@ public function load(array $configs, ContainerBuilder $container) 'self_service.security.authentication.session.maximum_relative_lifetime_in_seconds', $config['session_lifetimes']['max_relative_lifetime'] ); - $container->setParameter( - 'self_service.second_factor.max_tokens_per_identity', - $config['max_number_of_tokens'] - ); - $this->parseSecondFactorTestIdentityProviderConfiguration( $config['second_factor_test_identity_provider'], $container From 64fd80b65142c0ab55a07a47ad48dd6837a6d8c1 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Tue, 10 Apr 2018 16:19:41 +0200 Subject: [PATCH 21/29] Read 'numberOfTokensPerIdentity' from institution config As described in the previous commit, the numberOfTokensPerIdentity config value is no longer read from the YAML config but from the middleware configuration api. This commit updates the old usage of the YAML config to the new API results based solution. --- .../SelfServiceBundle/Controller/RegistrationController.php | 2 +- .../SelfServiceBundle/Controller/SecondFactorController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RegistrationController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RegistrationController.php index c8032caa4..acc8ad401 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RegistrationController.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RegistrationController.php @@ -50,7 +50,7 @@ public function displaySecondFactorTypesAction() $identity, $allSecondFactors, $institutionConfigurationOptions->allowedSecondFactors, - $this->getParameter('self_service.second_factor.max_tokens_per_identity') + $institutionConfigurationOptions->numberOfTokensPerIdentity ); if ($secondFactors->getRegistrationsLeft() <= 0) { diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SecondFactorController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SecondFactorController.php index 14c70d6e0..3602c5c61 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SecondFactorController.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SecondFactorController.php @@ -45,7 +45,7 @@ public function listAction() $identity, $allSecondFactors, $institutionConfigurationOptions->allowedSecondFactors, - $this->getParameter('self_service.second_factor.max_tokens_per_identity') + $institutionConfigurationOptions->numberOfTokensPerIdentity ); return [ From 3888b890f1f1ea97ae6c65b21fb369f5fd0f1623 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Wed, 11 Apr 2018 09:26:58 +0200 Subject: [PATCH 22/29] Update middleware client bundle to version 2.4 --- composer.json | 2 +- composer.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index dc541c3b2..bdb951de8 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "fortawesome/font-awesome": "~4.2.0", "jms/translation-bundle": "~1.3.0", "jms/di-extra-bundle": "~1.4.0", - "surfnet/stepup-middleware-client-bundle": "^2.0", + "surfnet/stepup-middleware-client-bundle": "^2.4", "guzzlehttp/guzzle": "^6", "surfnet/stepup-saml-bundle": "^4.0", "surfnet/stepup-bundle": "^3.4.0", diff --git a/composer.lock b/composer.lock index 23e41bc62..1ad10fe10 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "c2782be1c2cb93499ebb9d04d40b1b58", + "content-hash": "9fad25912e1c03a983366445cb4510f8", "packages": [ { "name": "beberlei/assert", @@ -2147,16 +2147,16 @@ }, { "name": "surfnet/stepup-middleware-client-bundle", - "version": "2.3.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-Middleware-clientbundle.git", - "reference": "9706c3e63dee41cc11e331b3057f885b8772eb66" + "reference": "83aa482f74d290167d8d4713484c6882fd4983c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-Middleware-clientbundle/zipball/9706c3e63dee41cc11e331b3057f885b8772eb66", - "reference": "9706c3e63dee41cc11e331b3057f885b8772eb66", + "url": "https://api.github.com/repos/OpenConext/Stepup-Middleware-clientbundle/zipball/83aa482f74d290167d8d4713484c6882fd4983c0", + "reference": "83aa482f74d290167d8d4713484c6882fd4983c0", "shasum": "" }, "require": { @@ -2197,7 +2197,7 @@ "Apache-2.0" ], "description": "Symfony2 bundle for consuming the Step-up Middleware API.", - "time": "2018-03-08T15:25:18+00:00" + "time": "2018-04-11T07:19:11+00:00" }, { "name": "surfnet/stepup-saml-bundle", From 5f873e383750712438b5cdcccf85d9b3c7cda272 Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Thu, 12 Apr 2018 10:14:19 +0200 Subject: [PATCH 23/29] Ignore unknown attributes in attribute dictionary Prevents UnknownUrnExceptions when IDP sends an attribute not defined in the stepup-saml-bundle. Gateway already does this: https://github.com/OpenConext/Stepup-Gateway/pull/147/files --- app/config/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/config/config.yml b/app/config/config.yml index 963820e1b..bcc15833f 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -114,6 +114,8 @@ surfnet_stepup_middleware_client: surfnet_saml: hosted: + attribute_dictionary: + ignore_unknown_attributes: true service_provider: enabled: true assertion_consumer_route: selfservice_serviceprovider_consume_assertion From b740313ffb98b1202efce05b6b1f5ca7c41f2aa7 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Fri, 6 Apr 2018 15:13:54 +0200 Subject: [PATCH 24/29] Add expiration date to token overview The expiration date is only shown on the verified tokens. When the expiration date is met, a label and explanation is added to instruct the user how to restart the registration of his token. --- .../translations/messages.en_GB.xliff | 25 ++++++++++++---- .../translations/messages.nl_NL.xliff | 25 ++++++++++++---- composer.lock | 10 +++---- .../Controller/SecondFactorController.php | 3 ++ .../views/SecondFactor/list.html.twig | 29 +++++++++++++++---- 5 files changed, 71 insertions(+), 21 deletions(-) diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index 298372f84..68912eef5 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -464,12 +464,12 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.second_factor.revoke.button.revoke Remove - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.button.test Test a token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.second_factor_type.sms @@ -521,15 +521,30 @@ An e-mail with your activation code has been sent to the e-mail address %email%. YubiKey /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig + + ss.second_factor_list.header.expiration_date + Expiration date + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + + + ss.second_factor_list.header.expired_explanation + The token registration period has expired. Please remove your token and restart the registration process. + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + + + ss.second_factor_list.header.expired_warning + Expired! + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + ss.second_factor_list.header.second_factor_identifier ID - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor_list.header.type Token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.security.session_expired.click_to_login diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index adc9dca99..c8098b9fd 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -462,12 +462,12 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.second_factor.revoke.button.revoke Verwijderen - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.button.test Test een token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor.revoke.second_factor_type.sms @@ -519,15 +519,30 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d YubiKey /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/translations.twig + + ss.second_factor_list.header.expiration_date + Verloopdatum + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + + + ss.second_factor_list.header.expired_explanation + De uiterste registratiedatum is verlopen. Registreer het token opnieuw door deze te verwijderen en het registratieproces opnieuw te starten. + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + + + ss.second_factor_list.header.expired_warning + Verlopen! + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + ss.second_factor_list.header.second_factor_identifier ID - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.second_factor_list.header.type Token - /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig + /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig ss.security.session_expired.click_to_login diff --git a/composer.lock b/composer.lock index 23e41bc62..dca90e09f 100644 --- a/composer.lock +++ b/composer.lock @@ -2091,16 +2091,16 @@ }, { "name": "surfnet/stepup-bundle", - "version": "3.4.0", + "version": "3.4.2", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-bundle.git", - "reference": "e0afaa26ffd0a38bb89b55e95761fe9555b6670f" + "reference": "2542a5f0d3032bc8c995b995dcc029999007393f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/e0afaa26ffd0a38bb89b55e95761fe9555b6670f", - "reference": "e0afaa26ffd0a38bb89b55e95761fe9555b6670f", + "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/2542a5f0d3032bc8c995b995dcc029999007393f", + "reference": "2542a5f0d3032bc8c995b995dcc029999007393f", "shasum": "" }, "require": { @@ -2143,7 +2143,7 @@ "suaas", "surfnet" ], - "time": "2018-04-09T11:13:53+00:00" + "time": "2018-04-12T14:02:19+00:00" }, { "name": "surfnet/stepup-middleware-client-bundle", diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SecondFactorController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SecondFactorController.php index 14c70d6e0..32a622b1e 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SecondFactorController.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/SecondFactorController.php @@ -41,6 +41,8 @@ public function listAction() // Get all available second factors from the config. $allSecondFactors = $this->getParameter('ss.enabled_second_factors'); + $expirationHelper = $this->get('surfnet_stepup.registration_expiration_helper'); + $secondFactors = $service->getSecondFactorsForIdentity( $identity, $allSecondFactors, @@ -56,6 +58,7 @@ public function listAction() 'verifiedSecondFactors' => $secondFactors->verified, 'vettedSecondFactors' => $secondFactors->vetted, 'availableSecondFactors' => $secondFactors->available, + 'expirationHelper' => $expirationHelper, ]; } diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig index 9c191560d..58a968b87 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig @@ -6,9 +6,9 @@ {% block content %}

{{ block('page_title') }}

- {{ macro.secondFactorTable(vettedSecondFactors, 'ss.second_factor.list.text.vetted', 'vetted', email) }} - {{ macro.secondFactorTable(verifiedSecondFactors, 'ss.second_factor.list.text.verified', 'verified', email) }} - {{ macro.secondFactorTable(unverifiedSecondFactors, 'ss.second_factor.list.text.unverified', 'unverified', email) }} + {{ macro.secondFactorTable(vettedSecondFactors, 'ss.second_factor.list.text.vetted', 'vetted', email, expirationHelper) }} + {{ macro.secondFactorTable(verifiedSecondFactors, 'ss.second_factor.list.text.verified', 'verified', email, expirationHelper) }} + {{ macro.secondFactorTable(unverifiedSecondFactors, 'ss.second_factor.list.text.unverified', 'unverified', email, expirationHelper) }} {% if registrationsLeft > 0 and ((unverifiedSecondFactors.elements is empty and verifiedSecondFactors.elements is empty and vettedSecondFactors.elements is empty) @@ -18,15 +18,16 @@

{{ 'ss.second_factor.list.text.no_second_factors'|trans }}

{% endif %} + class="btn btn-primary m-t-2"> {{ 'ss.second_factor.list.button.register_second_factor'|trans }} {% endif %} {% endblock %} -{% macro secondFactorTable(secondFactorCollection, text, state, email) %} +{% macro secondFactorTable(secondFactorCollection, text, state, email, expirationHelper, locale) %} {% if secondFactorCollection.elements is not empty %} + {% set hasExpired = false %}

{{ text|trans({'%email%': email}) }}

@@ -35,6 +36,9 @@ {{ 'ss.second_factor_list.header.type'|trans }} {{ 'ss.second_factor_list.header.second_factor_identifier'|trans }} + {% if state == 'verified' %} + {{ 'ss.second_factor_list.header.expiration_date'|trans }} + {% endif %} {# Action button #} @@ -43,6 +47,15 @@ {{ secondFactor.type|trans_second_factor_type }} {{ secondFactor.secondFactorIdentifier }} + {% if state == 'verified' %} + + {{ expirationHelper.expiresAt(secondFactor.registrationRequestedAt)|localizeddate('full', 'none', locale) }} + {% if expirationHelper.hasExpired(secondFactor.registrationRequestedAt) %} + {% set hasExpired = true %} + {{ 'ss.second_factor_list.header.expired_warning'|trans }} + {% endif %} + + {% endif %}
- + {{ 'ss.second_factor.revoke.button.test'|trans }} @@ -66,6 +79,10 @@ {% endif %} + + {% if hasExpired %} +

{{ 'ss.second_factor_list.header.expired_warning'|trans }} {{ 'ss.second_factor_list.header.expired_explanation'|trans }} + {% endif %}

{% endif %} From 1e21d876ef8ad62043ca4fba2c18685b100a8d7e Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Fri, 6 Apr 2018 15:15:29 +0200 Subject: [PATCH 25/29] Add margin top style rule This rule adds 2rem margin top to any element that is specified with this class. --- .../SelfServiceBundle/Resources/public/less/style.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/public/less/style.less b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/public/less/style.less index b15965741..1350b18fe 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/public/less/style.less +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/public/less/style.less @@ -110,6 +110,9 @@ select[name="stepup_switch_locale[locale]"] { margin-right: 5px; } } +.m-t-2 { + margin-top: 2em; +} @media print { footer, From fa5da6d9527e3d1bafc9919de09d87e3c23291e4 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 12 Apr 2018 09:33:06 +0200 Subject: [PATCH 26/29] Removed exclamation marks from expiration label --- app/Resources/translations/messages.en_GB.xliff | 2 +- app/Resources/translations/messages.nl_NL.xliff | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index 68912eef5..cf6b2e66d 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -533,7 +533,7 @@ An e-mail with your activation code has been sent to the e-mail address %email%. ss.second_factor_list.header.expired_warning - Expired! + Expired /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index c8098b9fd..c33f7709e 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -531,7 +531,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d ss.second_factor_list.header.expired_warning - Verlopen! + Verlopen /../src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/views/SecondFactor/list.html.twig From 457376acd554467ec697f117599d63c6b2da2e8e Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 12 Apr 2018 15:35:54 +0200 Subject: [PATCH 27/29] Align table data vertically in the middle Text, labels and buttons where not aligned correctly. This commit changes the vertical alignment of table data elements to the middle. In addition the padding of the bootstrap label component was updated to be more consistent all round. --- .../SelfServiceBundle/Resources/public/less/style.less | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/public/less/style.less b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/public/less/style.less index 1350b18fe..48476fa8a 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/public/less/style.less +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/public/less/style.less @@ -114,6 +114,16 @@ select[name="stepup_switch_locale[locale]"] { margin-top: 2em; } +.table-striped tbody td { + vertical-align: middle !important; +} + +span.label { + display: inline-block; + line-height: 2em; + padding: .2em .6em .1em; +} + @media print { footer, .page-header-user, From 780ed585c976d21f52dcc11980d11daf7c19c736 Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Fri, 13 Apr 2018 14:12:40 +0200 Subject: [PATCH 28/29] Update middleware-client-bundle to 2.4.0 Previously installed 2.3.1 can trigger the following error: The Choice constraint expects a valid callback --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 23e41bc62..9fc4a59e9 100644 --- a/composer.lock +++ b/composer.lock @@ -2147,16 +2147,16 @@ }, { "name": "surfnet/stepup-middleware-client-bundle", - "version": "2.3.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-Middleware-clientbundle.git", - "reference": "9706c3e63dee41cc11e331b3057f885b8772eb66" + "reference": "83aa482f74d290167d8d4713484c6882fd4983c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-Middleware-clientbundle/zipball/9706c3e63dee41cc11e331b3057f885b8772eb66", - "reference": "9706c3e63dee41cc11e331b3057f885b8772eb66", + "url": "https://api.github.com/repos/OpenConext/Stepup-Middleware-clientbundle/zipball/83aa482f74d290167d8d4713484c6882fd4983c0", + "reference": "83aa482f74d290167d8d4713484c6882fd4983c0", "shasum": "" }, "require": { @@ -2197,7 +2197,7 @@ "Apache-2.0" ], "description": "Symfony2 bundle for consuming the Step-up Middleware API.", - "time": "2018-03-08T15:25:18+00:00" + "time": "2018-04-11T07:19:11+00:00" }, { "name": "surfnet/stepup-saml-bundle", From ffef1a74c8a8b6e32f7acb0dfc7a69afbdbdebee Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Wed, 18 Apr 2018 14:34:16 +0200 Subject: [PATCH 29/29] Fine-tune generic error page translation --- app/Resources/translations/messages.nl_NL.xliff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index c33f7709e..a5cdfb70d 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -613,7 +613,7 @@ Er is een e-mail met activatiecode gestuurd naar het e-mailadres %email%. Volg d stepup.error.generic_error.description - Er is iets mis gegaan, Probeer het opnieuw. + Er is iets mis gegaan. Probeer het opnieuw. /../vendor/surfnet/stepup-bundle/src/Controller/ExceptionController.php