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

Feature/eyqb 319 no public access #182

Merged
merged 33 commits into from
Jun 14, 2024
Merged

Conversation

RobertGHippo
Copy link
Collaborator

@RobertGHippo RobertGHippo commented Jun 11, 2024

Description

All endpoints except Error and Health guarded behind configurable secrets. Can be turned off altogether through configuration, which will be done only in production once the service has achieved Authority to Operate.

There is an opportunity to extract this functionality into a reusable Nuget package if it is deemed more generally useful.

Ticket number (if applicable)

EYQB-319

How Has This Been Tested?

All runs as expected locally. Lots of new unit tests too. All end-to-end tests and accessibility tests pass also on the GitHub PR check action.

Screenshots

If user has not entered the secret, any page redirects them to a challenge page:
image

Once an acceptable key has been submitted on this page, the site works as if all the pages are public.

Checklist:

  • My code follows the standards used within this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests (Unit, E2E) that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

RobertGHippo and others added 30 commits June 5, 2024 12:25
Only relative path addresses are considered "local" URLs.
Secret values configurable.
New no-op "no challenge" filter if service access unchallenged.
Move Error endpoint to its own new unguarded controller.
Doc comments (point to no-op filter for public access).
More tests.
Will come from pipeline.
...or can come from command line on dev machines.
Tf added variables for access challenge.
Tf configure service on deployment for access challenge.
Secret values will come from command line / pipeline.
@RobertGHippo RobertGHippo marked this pull request as ready for review June 13, 2024 13:10
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Health
Dfe.EarlyYearsQualification.Content 84% 91%
Dfe.EarlyYearsQualification.Mock 91% 100%
Dfe.EarlyYearsQualification.Web 96% 84%
Summary 90% (1175 / 1307) 88% (139 / 158)

Minimum allowed line rate is 75%

@RobertGHippo RobertGHippo merged commit 9367fb2 into main Jun 14, 2024
@RobertGHippo RobertGHippo deleted the feature/eyqb-319-no-public-access branch June 14, 2024 08:15
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.

2 participants