Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Remote Vetting cleanup #220

Merged
merged 8 commits into from
Feb 26, 2021

Conversation

pablothedude
Copy link
Contributor

@pablothedude pablothedude commented Feb 23, 2021

Some cleanup needed to be done in order to remove some shortcuts made
during development of the RV POC.

This refactoring consists of:

  • Remove double escaping from identity log
  • Make the RV SP configuration static (acs endpoint and entityId)
  • Remove double escaping from the RV process session data
  • Use dedicated mock endpoint for testing instead of relying on Irma configuration
  • Move the mock services out of the production service configuration
  • Add assertion to the session test to get rid of risky tests
  • Use a dedicated encryption key-pair in tests to ease maintenance
  • Use the ApplicationHelper itself instead of a mock in the integration test to test it's behavior.

@pablothedude pablothedude force-pushed the feature/initial-remote-vetting-cleanup branch 7 times, most recently from 0ddb55c to 24564d9 Compare February 24, 2021 09:59
This is done to ease analysing the identity data.
@pablothedude pablothedude force-pushed the feature/initial-remote-vetting-cleanup branch 2 times, most recently from 01cd693 to b436890 Compare February 24, 2021 10:28
Copy link
Member

@MKodde MKodde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like what I see here! See some feedback in the code review section below. I think this is good to ship. But maybe you want to address some of my points. It's up to you.

- '%remote_vetting_sp%'
$router: '@router'
$entityId: "%remote_vetting_entity_id%"
$assertionConsumerUrlSlug: "ss_second_factor_remote_vet_acs"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hard-code it in the service container? Might be more predictable to hard code it in code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The slug of the route itself isn't hardcoded either so the slug is dependency of the ServiceProviderFactory and that's why i used DI.

Comment on lines +65 to +66
remote_vetting_entity_id: https://selfservice.stepup.example.com/rv/metadata

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I lack context, but isn't the RV configuration not still configurable? Albeit it became less pronounced, but you can still configure the entitiy id in parameters.yml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the entityid and keys, but not the endpoint anymore, that seemed to be confusing because of the multiple acs endpoints that exist.

@@ -83,32 +33,58 @@ surfnet_stepup_self_service_saml_stepup_provider:
pop_failed: "%gssp_webauthn_pop_failed%"
app_android_url: "%gssp_webauthn_app_android_url%"
app_ios_url: "%gssp_webauthn_app_ios_url%"
azuremfa:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might lead to issues when building the dev environment. The application provisioning first composer-installs with scripts using the VCS provided parameters. It then dumps the StepupDeploy specific parameters. And again composer installs them. IIRC the first run requires the azuremfa gssp to be in config. I do not have time to re-provision my SelfService at this moment. But maybe this warning rings a bell with you? It might well be, I'm mistaken here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to change the config in order to get my dedicated RV Stepup-VM up and running with the config in the remote-vetting branch in Deploy. Not all GSSP's were and will be configured for RV so this was done to just reflect that config. This indeed should be addressed to reflect develop in Deploy but I think this should be addressed just before (and only if) RV lands back in develop. But because that could happen in a while and a lot of Deploy's config could have been changed in the meantime I'll prefer to keep this config in sync with the RV branch in Deploy.

Make the acs location static for remote vetting.
This doesn't need to be configurable.
Remove the double escaping of objects in the process DTO so
it would be easier to maintain later on.
Use dedicated mock endpoint for testing instead of relying on Irma
configuration. So this won't conflict when using Deploy.
@pablothedude pablothedude force-pushed the feature/initial-remote-vetting-cleanup branch 2 times, most recently from d37d020 to d1fada0 Compare February 24, 2021 16:36
Move the mock services out of the production service configuration.
This is better in terms of defence-in-depth.
Add assertion to the session test to get rid of risky tests.
Use a dedicated encryption key-pair in tests to ease maintenance.
Use the ApplicationHelper itself instead of a mock in the integration
test to test it's behavior.
@pablothedude pablothedude force-pushed the feature/initial-remote-vetting-cleanup branch from d1fada0 to c49e1c1 Compare February 24, 2021 17:20
@pmeulen pmeulen merged commit 9b6a174 into remote-vetting Feb 26, 2021
@pablothedude pablothedude deleted the feature/initial-remote-vetting-cleanup branch March 1, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants