Skip to content

Commit 7c62ee0

Browse files
authored
Document the GSSP Fallback feature (#551)
Add comments in the code to link the name of the feature to the internally used "sso registration bypass" for this feature.
1 parent 79d018c commit 7c62ee0

7 files changed

Lines changed: 25 additions & 3 deletions

File tree

docs/MiddlewareConfiguration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,9 @@ The options must have the following keys:
414414
* `number_of_tokens_per_identity` (integer) The number of tokens an identity is allowed to vet. If the option is not set, the default value of `1` is set.
415415
* `allowed_second_factors`: (string[]) a list of second factor types that are allowed to be registered by users of this institution. This option only affects the registration of new second factors, it does not affect second factors that have been registered or vetted. If the list is empty all supported second factors are allowed. The supported second factors are found in the [Stepup-bundle](https://github.com/OpenConext/Stepup-bundle/blob/develop/src/Value/SecondFactorType.php#L31-L37). Default: empty list (all available second factors are allowed).
416416
* `self_vet`: (boolean) Are users allowed to vet their other tokens with a previously vetted token?
417+
* `allow_self_asserted_tokens`: (boolean) Are users of this institution allowed to register self asserted tokens (SAT)?
417418
* `sso_on_2fa`: (boolean) Are identities of the institution allowed to use SSO on 2FA?
419+
* `sso_registration_bypass`: (boolean) Enables or disabled "GSSP fallback" for this institution. Is it allowed for SFO authentications for this institution to "bypass" the Stepup authentication when they have no active tokens, passing the authentication directly to the fallback GSSP (see: fallback_gssp configuration in the gateway).
418420

419421
And optionally the configuration can have these authorization related options:
420422

src/Surfnet/Migrations/Version20250501121457.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ public function up(Schema $schema): void
3636
'Migration can only be executed safely on \'mysql\'.',
3737
);
3838
// Create the new sso_on_2fa option, note the name conversion 'error' made by doctrine.
39+
/*
40+
* The sso_registration_bypass_option enables and disables the "GSSP fallback" option in the Stepup-Gateway for an institution.
41+
* "GSSP fallback" forwards the second factor authentications at LoA 1.5 to the fallback GSSP when a user does not have
42+
* any active tokens
43+
*/
3944
$this->addSql('ALTER TABLE institution_configuration_options ADD sso_registration_bypass_option INT DEFAULT \'0\' NOT NULL');
4045
// Create the institution_configuration gateway schema
4146
$gatewaySchema = $this->getGatewaySchema();

src/Surfnet/Stepup/Configuration/Event/NewInstitutionConfigurationCreatedEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function deserialize(array $data): self
6666
if (!isset($data['sso_on_2fa_option'])) {
6767
$data['sso_on_2fa_option'] = false;
6868
}
69-
// If sso registration bypass option is not yet present, default to false
69+
// If GSSP fallback (sso registration bypass) option is not yet present, default to false
7070
if (!isset($data['sso_registration_bypass_option'])) {
7171
$data['sso_registration_bypass_option'] = false;
7272
}
@@ -86,7 +86,7 @@ public static function deserialize(array $data): self
8686
new VerifyEmailOption($data['verify_email_option']),
8787
new NumberOfTokensPerIdentityOption($data['number_of_tokens_per_identity_option']),
8888
new SsoOn2faOption($data['sso_on_2fa_option']),
89-
new SsoRegistrationBypassOption($data['sso_registration_bypass_option']),
89+
new SsoRegistrationBypassOption($data['sso_registration_bypass_option']), // Fallback authentication
9090
new SelfVetOption($data['self_vet_option']),
9191
new SelfAssertedTokensOption($data['self_asserted_tokens_option']),
9292
);

src/Surfnet/Stepup/Configuration/Event/SsoRegistrationBypassOptionChangedEvent.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId;
2626
use Surfnet\Stepup\Configuration\Value\SsoRegistrationBypassOption;
2727

28+
/*
29+
* This option enables and disables the "GSSP fallback" option in the Stepup-Gateway for an institution.
30+
* "GSSP fallback" forwards the second factor authentications at LoA 1.5 to the fallback GSSP when a user does not have
31+
* any active tokens
32+
*/
2833
final class SsoRegistrationBypassOptionChangedEvent implements SerializableInterface
2934
{
3035
public function __construct(

src/Surfnet/Stepup/Configuration/Value/SsoRegistrationBypassOption.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222

2323
use JsonSerializable;
2424

25+
/*
26+
* The SsoRegistrationBypassOption is the "GSSP fallback" option in the Stepup-Gateway for an institution that
27+
* forwards the second factor authentications at LoA 1.5 to the fallback GSSP when a user does not have
28+
* any active tokens
29+
*/
30+
2531
final readonly class SsoRegistrationBypassOption implements JsonSerializable
2632
{
2733
public static function getDefault(): self

src/Surfnet/StepupMiddleware/ApiBundle/Doctrine/Type/SsoRegistrationBypassOptionType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626

2727
/**
2828
* Custom Type for the SsoRegistrationBypassOption Value Object
29+
*
30+
* This option enables and disables the "GSSP fallback" option in the Stepup-Gateway for an institution.
31+
* "GSSP fallback" forwards the second factor authentications at LoA 1.5 to the fallback GSSP when a user does not have
32+
* any active tokens
2933
*/
3034
class SsoRegistrationBypassOptionType extends IntegerType
3135
{

src/Surfnet/StepupMiddleware/GatewayBundle/Entity/InstitutionConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(
3636
#[ORM\Column(type: 'boolean')]
3737
public bool $ssoOn2faEnabled,
3838
/**
39-
* @var bool is the SSO registration bypass feature enabled?
39+
* @var bool is the GSSP fallback (SSO registration bypass) feature enabled?
4040
*/
4141
#[ORM\Column(type: 'boolean')]
4242
public bool $ssoRegistrationBypass,

0 commit comments

Comments
 (0)