From 9d0d271d0943f95d4ed6ce35c7a3d9e5413d651b Mon Sep 17 00:00:00 2001 From: Bas Strooband Date: Fri, 18 Jan 2019 10:58:26 +0100 Subject: [PATCH 1/5] Fix setting entityId --- src/Surfnet/ServiceProviderDashboard/Domain/Entity/Entity.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Surfnet/ServiceProviderDashboard/Domain/Entity/Entity.php b/src/Surfnet/ServiceProviderDashboard/Domain/Entity/Entity.php index 87cffbad9..d053b29d7 100644 --- a/src/Surfnet/ServiceProviderDashboard/Domain/Entity/Entity.php +++ b/src/Surfnet/ServiceProviderDashboard/Domain/Entity/Entity.php @@ -442,7 +442,6 @@ public static function fromManageResponse( $entity->setClientSecret($oidcClient->getClientSecret()); $entity->setRedirectUris($oidcClient->getRedirectUris()); $entity->setGrantType(new OidcGrantType($oidcClient->getGrantType())); - $entity->setEntityId($oidcClient->getClientId()); $entity->setProtocol(Entity::TYPE_OPENID_CONNECT); self::setRedirectUrisFromManageResponse($entity, $manageEntity, $environment, $playGroundUriTest, $playGroundUriProd); } From de0636b415789ea25e57706871f26bd8142d1bfb Mon Sep 17 00:00:00 2001 From: Bas Strooband Date: Fri, 18 Jan 2019 13:36:22 +0100 Subject: [PATCH 2/5] Fix the dump method in twig template for prod In the mail template to notify the support desk when a publication has failed there is a `dump` method. However this method is not supported in the prod environment. So this is removed. --- .../Resources/views/Mail/jiraPublicationFailed.html.twig | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/views/Mail/jiraPublicationFailed.html.twig b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/views/Mail/jiraPublicationFailed.html.twig index d482e88bb..d602d392b 100644 --- a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/views/Mail/jiraPublicationFailed.html.twig +++ b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/views/Mail/jiraPublicationFailed.html.twig @@ -8,7 +8,6 @@ Hi,
     {{ exception.message }}
-    {{ dump(exception.trace) }}
 

From 7a4f434ca74d6910b11b8c29ad0d70cd64fa2e87 Mon Sep 17 00:00:00 2001 From: Bas Strooband Date: Mon, 21 Jan 2019 10:26:12 +0100 Subject: [PATCH 3/5] Update changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 630858132..723b0ce1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ ## Next release +## 2.0.1 + +The main focus of this release was to fix some minor bugs to make a production ready release. + +**Bugfixes:** + - Fix use of dump method in twig template + - Fix setting entityId from clientId for OIDC entities from manage response. + + ## 2.0.0 This release sees the actual addition of OpenID Connect support (OIDC) in SP Dashboard. In release 1.5.x we already From 53e1ff512efabec3d3807871739f6324b470e11f Mon Sep 17 00:00:00 2001 From: Bas Strooband Date: Thu, 17 Jan 2019 12:36:50 +0100 Subject: [PATCH 4/5] Fix tests after merging PR #223 --- tests/webtests/EntityCreateOidcTest.php | 14 ++++++------- tests/webtests/EntityCreateSamlTest.php | 26 ++++++++++++------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/webtests/EntityCreateOidcTest.php b/tests/webtests/EntityCreateOidcTest.php index c8adce368..1f3c0af37 100644 --- a/tests/webtests/EntityCreateOidcTest.php +++ b/tests/webtests/EntityCreateOidcTest.php @@ -48,7 +48,7 @@ public function setUp() public function test_it_renders_the_form() { - $crawler = $this->client->request('GET', "/entity/create/oidc/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/oidc/test"); $form = $crawler->filter('.page-container') ->selectButton('Save') ->form(); @@ -64,7 +64,7 @@ public function test_it_renders_the_form() public function test_it_can_cancel_out_of_the_form() { - $crawler = $this->client->request('GET', "/entity/create/oidc/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/oidc/test"); $form = $crawler ->selectButton('Cancel') ->form(); @@ -92,7 +92,7 @@ public function test_it_can_save_the_form() { $formData = $this->buildValidFormData(); - $crawler = $this->client->request('GET', "/entity/create/oidc/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/oidc/test"); $form = $crawler ->selectButton('Save') @@ -121,7 +121,7 @@ public function test_it_can_publish_the_form() { $formData = $this->buildValidFormData(); - $crawler = $this->client->request('GET', "/entity/create/oidc/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/oidc/test"); $form = $crawler ->selectButton('Publish') @@ -161,7 +161,7 @@ public function test_it_forwards_to_edit_action_when_publish_failed() { $formData = $this->buildValidFormData(); - $crawler = $this->client->request('GET', "/entity/create/oidc/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/oidc/test"); $form = $crawler ->selectButton('Publish') @@ -202,7 +202,7 @@ public function test_creating_draft_for_production_is_not_allowed() $this->getServiceRepository()->findByName('SURFnet')->getId() ); - $crawler = $this->client->request('GET', "/entity/create/oidc/1/production"); + $crawler = $this->client->request('GET', "/entity/create/1/oidc/production"); $this->assertEquals(403, $this->client->getResponse()->getStatusCode()); } @@ -211,7 +211,7 @@ public function test_a_privileged_user_can_create_a_production_draft() { $formData = $this->buildValidFormData(); - $crawler = $this->client->request('GET', "/entity/create/oidc/2/production"); + $crawler = $this->client->request('GET', "/entity/create/2/oidc/production"); $form = $crawler ->selectButton('Save') diff --git a/tests/webtests/EntityCreateSamlTest.php b/tests/webtests/EntityCreateSamlTest.php index 3e4e6c8c2..7426d796a 100644 --- a/tests/webtests/EntityCreateSamlTest.php +++ b/tests/webtests/EntityCreateSamlTest.php @@ -40,7 +40,7 @@ public function setUp() public function test_it_renders_the_form() { - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler->filter('.page-container') ->selectButton('Save') ->form(); @@ -70,7 +70,7 @@ public function test_it_imports_metadata() ], ]; - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Import') @@ -93,7 +93,7 @@ public function test_it_imports_metadata() public function test_it_can_cancel_out_of_the_form() { - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Cancel') ->form(); @@ -121,7 +121,7 @@ public function test_it_can_save_the_form() { $formData = $this->buildValidFormData(); - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Save') @@ -153,7 +153,7 @@ public function test_it_can_save_the_form_without_name_id_format() // manually (not using the import feature). unset($formData['dashboard_bundle_entity_type']['nameIdFormat']); - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Save') @@ -178,7 +178,7 @@ public function test_it_can_publish_the_form() { $formData = $this->buildValidFormData(); - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Publish') @@ -211,7 +211,7 @@ public function test_it_forwards_to_edit_action_when_publish_failed() { $formData = $this->buildValidFormData(); - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Publish') @@ -254,7 +254,7 @@ public function test_it_shows_flash_message_on_importing_invalid_metadata() ], ]; - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Import') @@ -297,9 +297,9 @@ public function test_creating_draft_for_production_is_not_allowed() $this->getServiceRepository()->findByName('SURFnet')->getId() ); - $crawler = $this->client->request('GET', '/entity/create/saml20/1/production'); + $crawler = $this->client->request('GET', '/entity/create/1/saml20production'); - $this->assertEquals(403, $this->client->getResponse()->getStatusCode()); + $this->assertEquals(404, $this->client->getResponse()->getStatusCode()); } public function test_a_privileged_user_can_create_a_production_draft() @@ -311,7 +311,7 @@ public function test_a_privileged_user_can_create_a_production_draft() $formData = $this->buildValidFormData(); - $crawler = $this->client->request('GET', '/entity/create/saml20/2/production'); + $crawler = $this->client->request('GET', '/entity/create/2/saml20/production'); $form = $crawler ->selectButton('Save') @@ -348,7 +348,7 @@ public function test_it_imports_multiple_entity_descriptor_metadata_with_a_singl ], ], ]; - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Import') @@ -376,7 +376,7 @@ public function test_it_does_not_import_multiple_entity_descriptor_metadata_with ], ], ]; - $crawler = $this->client->request('GET', "/entity/create/saml20/2/test"); + $crawler = $this->client->request('GET', "/entity/create/2/saml20/test"); $form = $crawler ->selectButton('Import') From ad8760009947d8d25c7251958cb1ab6b6a13f772 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 17 Jan 2019 13:40:35 +0100 Subject: [PATCH 5/5] Update CHANGELOG.md and README.md To cover the most notable changes in release 2.0.0 --- CHANGELOG.md | 19 +++++++++++++++++-- README.md | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe36ee3a1..630858132 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,22 @@ ## Next release +## 2.0.0 + +This release sees the actual addition of OpenID Connect support (OIDC) in SP Dashboard. In release 1.5.x we already +hinted to the OIDC addition but this release finally adds support for said protocol. In addition to adding OIDC support, +some security related chores have been undertaken. Most notable is the addition of Yarn Audit to the QA (build) tooling. + **New feature** - - Publishing of production entities results in Jira ticket + - Add OIDC support #189 #204 #206 + - Create Jira issue after publishing to manage prod #221 #225 + - Split the entity overview page on environment #207 + +**Bugfixes:** + - OpenID Connect related bugfixes: #205 #209 #216 #217 #219 #220 #203 #223 + +**Chores** + - Upgrade npm dependencies #218 + - Improve security tests #224 ## 1.5.2 @@ -9,7 +24,7 @@ The main focus of this release was to fix some minor bugs to make a production r **Bugfixes:** - Fix route after session timeout - - Temporarily disable the oidc entity type in modal + - Temporarily disable the OIDC entity type in modal ## 1.5.1 diff --git a/README.md b/README.md index b3ebd1033..365d7d0cd 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The Service Provider Dashboard is a dashboard application where [SURFconext](https://www.surf.nl/diensten-en-producten/surfconext/index.html) Service Providers can register and manage -their services. +their services. This can be both SAML 2.0 and OpenID Connect entities. ## Prerequisites