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

Uml 3764 remove one login feature flag #3032

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cb48f1f
UML-3619 wip
allenannom Sep 30, 2024
7377fe5
UML-3619 Convert incoming LPAs to combined format (repository layer)
allenannom Oct 3, 2024
56a1031
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Oct 8, 2024
0f3b45c
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Oct 9, 2024
3aa9414
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Oct 9, 2024
22f452c
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Oct 30, 2024
8730ec4
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Nov 4, 2024
7afb712
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Nov 4, 2024
fc8454e
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Nov 5, 2024
1629499
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Nov 11, 2024
cee3917
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Nov 14, 2024
0062994
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Nov 19, 2024
2d37ddb
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Nov 28, 2024
1b93935
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Nov 29, 2024
e0f99c0
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Dec 3, 2024
15738ef
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Dec 4, 2024
8cf35a9
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Dec 6, 2024
4761d20
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Dec 9, 2024
5eff5ef
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Dec 12, 2024
6d68dc2
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Dec 13, 2024
1b7c21f
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Dec 16, 2024
7ffd278
UML-3764 removing one login FF
allenannom Jan 2, 2025
9138344
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Jan 2, 2025
ce25dbd
UML-3764 removing one login FF and related tests
allenannom Jan 6, 2025
5ad3528
Merge branch 'main' of github.com:ministryofjustice/opg-use-an-lpa
allenannom Jan 6, 2025
bc8a154
Merge branch 'main' into UML-3764-remove-one-login-feature-flag
allenannom Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/_run-behat-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ jobs:
use_fqdn=$(cat ./terraform/environment/cluster_config.json | jq .use_fqdn | xargs)
public_facing_view_fqdn=$(cat ./terraform/environment/cluster_config.json | jq .public_facing_view_fqdn | xargs)
public_facing_use_fqdn=$(cat ./terraform/environment/cluster_config.json | jq .public_facing_use_fqdn | xargs)
ff_allow_gov_one_login=$(cat ./terraform/environment/cluster_config.json | jq .ff_allow_gov_one_login | xargs)

ln -sf ../features tests/smoke/features

Expand All @@ -90,7 +89,6 @@ jobs:
BEHAT_ACTOR_URL=https://$public_facing_use_fqdn \
BEHAT_OLD_VIEWER_URL=https://$viewer_fqdn \
BEHAT_OLD_ACTOR_URL=https://$use_fqdn \
BEHAT_FF_ALLOW_GOV_ONE_LOGIN=$ff_allow_gov_one_login \
vendor/bin/behat

- name: archive failed test screenshots
Expand Down
2 changes: 1 addition & 1 deletion .idea/phpunit.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ services:
# Feature flags
DELETE_LPA_FEATURE: "true"
ALLOW_MERIS_LPAS: "false"
ALLOW_GOV_ONE_LOGIN: "true"
SUPPORT_DATASTORE_LPAS: "false"

# Local only
Expand Down Expand Up @@ -188,7 +187,6 @@ services:

# Feature flags
ALLOW_MERIS_LPAS: "false"
ALLOW_GOV_ONE_LOGIN: "true"
SUPPORT_DATASTORE_LPAS: "false"

# Local only
Expand Down
17 changes: 0 additions & 17 deletions service-api/app/features/actor-delete-account.feature

This file was deleted.

2 changes: 1 addition & 1 deletion service-api/app/features/actor-logout.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: A user of the system is able to logout
Given I am a user of the lpa application
And I have been given access to use an LPA via credentials

@acceptance @ff:allow_gov_one_login:true
@acceptance
Scenario: A user can logout
Given I am currently signed in
When I logout of the application
Expand Down
26 changes: 0 additions & 26 deletions service-api/app/features/actor-password-change.feature

This file was deleted.

4 changes: 1 addition & 3 deletions service-api/app/features/bootstrap/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,5 @@
'discovery_url' => 'http://one-login-mock/.well-known/openid-configuration',
'identity_issuer' => 'http://identity.one-login-mock/',
],
'feature_flags' => [
'allow_gov_one_login' => true,
],
'feature_flags' => [],
];
6 changes: 1 addition & 5 deletions service-front/app/config/autoload/features.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
getenv('ALLOW_MERIS_LPAS'),
FILTER_VALIDATE_BOOLEAN
) ?: false,
'allow_gov_one_login' => filter_var(
getenv('ALLOW_GOV_ONE_LOGIN'),
FILTER_VALIDATE_BOOLEAN
) ?: false,
'support_datastore_lpas' => filter_var(
'support_datastore_lpas' => filter_var(
getenv('SUPPORT_DATASTORE_LPAS'),
FILTER_VALIDATE_BOOLEAN
) ?: false,
Expand Down
122 changes: 12 additions & 110 deletions service-front/app/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,10 @@

$actorRoutes = function (Application $app, MiddlewareFactory $factory, ContainerInterface $container): void {
$DELETE_LPA_FEATURE = 'delete_lpa_feature';
$ALLOW_GOV_ONE_LOGIN = 'allow_gov_one_login';

$defaultNotFoundPage = Actor\Handler\LpaDashboardHandler::class;

$config = $container->get("config");
$feature_flags = $config["feature_flags"];

$app->route('/home', [
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Actor\Handler\AuthenticateOneLoginHandler::class,
Actor\Handler\ActorTriagePageHandler::class
)
], ['GET', 'POST'], 'home');
$app->route('/home', Actor\Handler\AuthenticateOneLoginHandler::class, ['GET', 'POST'], 'home');
$app->route('/', Actor\Handler\ActorTriagePageHandler::class, ['GET', 'POST'], 'home-trial');
$app->get('/healthcheck', Common\Handler\HealthcheckHandler::class, 'healthcheck');
$app->get('/stats', Actor\Handler\StatsPageHandler::class, 'actor-stats');
Expand All @@ -94,64 +82,22 @@
$app->get('/contact-us', Common\Handler\ContactUsPageHandler::class, 'contact-us');

// User creation
$app->route(
'/create-account',
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Common\Handler\GoneHandler::class,
Actor\Handler\CreateAccountHandler::class,
),
['GET', 'POST'],
'create-account'
);
$app->get(
'/create-account-success',
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Common\Handler\GoneHandler::class,
Actor\Handler\CreateAccountSuccessHandler::class,
),
'create-account-success'
);
$app->route('/create-account',Common\Handler\GoneHandler::class,['GET', 'POST'],'create-account');

$app->get('/create-account-success',Common\Handler\GoneHandler::class,'create-account-success');
$app->get(
'/activate-account/{token}',
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
fn () => new \Laminas\Diactoros\Response\RedirectResponse('/home'),
Actor\Handler\ActivateAccountHandler::class,
),
fn () => new \Laminas\Diactoros\Response\RedirectResponse('/home'),
'activate-account'
);

// User auth
$app->route('/login', [
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
fn () => new \Laminas\Diactoros\Response\RedirectResponse('/home'),
Actor\Handler\LoginPageHandler::class
)
], ['GET', 'POST'], 'login');
$app->route('/login', fn () => new \Laminas\Diactoros\Response\RedirectResponse('/home'), ['GET', 'POST'], 'login');

$app->get('/session-expired', Actor\Handler\ActorSessionExpiredHandler::class, 'session-expired');
$app->get('/session-check', Actor\Handler\ActorSessionCheckHandler::class, 'session-check');
$app->get('/session-refresh', Common\Handler\SessionRefreshHandler::class, 'session-refresh');
$app->get('/home/login', [
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Actor\Handler\OneLoginCallbackHandler::class,
Common\Handler\GoneHandler::class
)
], 'auth-redirect');
$app->get('/home/login', Actor\Handler\OneLoginCallbackHandler::class, 'auth-redirect');

$app->get(
'/logout',
Expand All @@ -163,42 +109,19 @@
);

// User management
$app->route(
'/reset-password',
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Common\Handler\GoneHandler::class,
Actor\Handler\PasswordResetRequestPageHandler::class
),
['GET', 'POST'],
'password-reset'
);
$app->route('/reset-password', Common\Handler\GoneHandler::class, ['GET', 'POST'], 'password-reset');


$app->route(
'/reset-password/{token}',
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Common\Handler\GoneHandler::class,
Actor\Handler\PasswordResetPageHandler::class
),
Common\Handler\GoneHandler::class,
['GET', 'POST'],
'password-reset-token'
);

$app->get(
'/verify-new-email/{token}',
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Common\Handler\GoneHandler::class,
Actor\Handler\CompleteChangeEmailHandler::class
),
Common\Handler\GoneHandler::class,
'verify-new-email'
);

Expand All @@ -217,29 +140,8 @@
Actor\Handler\SettingsHandler::class,
], 'settings');

$app->route('/change-password',
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Common\Handler\GoneHandler::class,
Actor\Handler\ChangePasswordHandler::class
),
['GET','POST'],
'change-password'
);

$app->route('/change-email',
new ConditionalRoutingMiddleware(
$container,
$factory,
$ALLOW_GOV_ONE_LOGIN,
Common\Handler\GoneHandler::class,
Actor\Handler\RequestChangeEmailHandler::class
),
['GET','POST'],
'change-email'
);
$app->route('/change-password', Common\Handler\GoneHandler::class, ['GET','POST'], 'change-password');
$app->route('/change-email', Common\Handler\GoneHandler::class, ['GET','POST'], 'change-email');

$app->get('/lpa/change-details', [
Common\Middleware\Authentication\AuthenticationMiddleware::class,
Expand Down
82 changes: 0 additions & 82 deletions service-front/app/features/actor-account-creation.feature

This file was deleted.

17 changes: 0 additions & 17 deletions service-front/app/features/actor-back-navigation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,6 @@ Feature: Back navigation
I want the back function to take me to an appropriate page for where I am in the journey
So that I can easily navigate the service

@ui @ff:allow_gov_one_login:false
Scenario: Check back function on reset password page
Given I access the login form
And I have forgotten my password
And I am on the password reset page
When I click the Back link on the page
Then I should be taken to the <login> page

@ui @ff:allow_gov_one_login:false
Scenario: Check back function on change password page
Given I am a user of the lpa application
And I am currently signed in
And I view my user details
And I ask to change my password
When I click the Back link on the page
Then I should be taken to the <settings> page

@ui
Scenario: Check back function on add LPA page
Given I am a user of the lpa application
Expand Down
Loading
Loading