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

Add Data Protection services #460

Merged
merged 7 commits into from
Sep 3, 2024
Merged

Conversation

DrizzlyOwl
Copy link
Collaborator

@DrizzlyOwl DrizzlyOwl commented Aug 22, 2024

The purpose of this Pull Request is to add aspnet Data Protection services to the webapp. This will ensure that user sessions are secured and persistent across multiple 'instances' of the web app. This is particularly important in Azure where the app is running in containers.

As you will see in the logic of the patch, this is not testable on a local machine due to requiring access to a linux file path and Azure Key Vault Key.

Mounting a network-attached File Share to all the containers that run the app, then storing the session key ring key.xml on the shared file path, will ensure all instances of the app can use the same key for encrypting/decrypting user sessions.

NB. Changes to DfE.FindInformationAcademiesTrusts.csproj were done by dotnet CLI when adding the new packages. The diff shows spacing on otherwise untouched lines. I would suggest this is a discrepancy between what the CLI does and what Visual Studio does.

Changes

  • Registers Data Protection services to the app
  • Allows operators to deploy a File Share using Terraform
  • Allows operators to deploy a Key Vault and associated cryptographic Key used to further encrypt the aspnet key ring on the File Share.

Checklist

  • Pull request attached to the appropriate user story in Azure DevOps
  • ADR decision log updated (if needed)
  • Release notes added to CHANGELOG.md
  • Testing complete - all manual and automated tests pass

@DrizzlyOwl DrizzlyOwl force-pushed the feature/data-protection-aspnet branch from 5494ade to ddff33c Compare August 30, 2024 09:53
@DrizzlyOwl DrizzlyOwl force-pushed the feature/data-protection-aspnet branch from e2bdd6d to ccbe845 Compare September 2, 2024 11:14
DrizzlyOwl and others added 7 commits September 3, 2024 15:51
* When running the app across multiple containers it is important to ensure that the session key ring is persistent across instances. Storing the key.xml on a shared filesystem ensures all instances of the app can use the same key ring.
* Using an Azure Key Vault Key, the keys.xml can be encrypted at rest further improving the security of the stored key ring
Copy link

sonarqubecloud bot commented Sep 3, 2024

@DrizzlyOwl DrizzlyOwl merged commit bea4f51 into main Sep 3, 2024
11 checks passed
@DrizzlyOwl DrizzlyOwl deleted the feature/data-protection-aspnet branch September 3, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants