Skip to content

Check already registered on prove possession#550

Merged
pablothedude merged 1 commit into
mainfrom
bugfix/add-prove-possession-for-already-registered-tokens
Aug 21, 2025
Merged

Check already registered on prove possession#550
pablothedude merged 1 commit into
mainfrom
bugfix/add-prove-possession-for-already-registered-tokens

Conversation

@pablothedude
Copy link
Copy Markdown
Contributor

We add a check to prevent the same token having multiple in flight registration processes for the same token.

OpenConext/Stepup-Gateway#462
OpenConext/Stepup-SelfService#463

@pablothedude pablothedude force-pushed the bugfix/add-prove-possession-for-already-registered-tokens branch from 3266b81 to 2043383 Compare August 19, 2025 15:06
@pmeulen
Copy link
Copy Markdown
Member

pmeulen commented Aug 20, 2025

As discussed: the business rule is no registration of a second token of en existing type allowed. Only the type of the token counts, not the token_id, so two Yubikeys with different token_is are still not allowed. The goal is to prevent a user from having two tokens of the same type. Reason: prevent confusion and make token sharing less attractive. (Token sharing as poorly executed delegation; link a second token to your account and give that and your password to your secretary)

@pablothedude pablothedude force-pushed the bugfix/add-prove-possession-for-already-registered-tokens branch from 2043383 to b8c5768 Compare August 20, 2025 08:31
@pmeulen pmeulen added the bug label Aug 20, 2025
@pmeulen pmeulen moved this from New to In Progress in PHP development Aug 20, 2025
@pmeulen pmeulen moved this from In Progress to Delivered in PHP development Aug 20, 2025
@pablothedude pablothedude force-pushed the bugfix/add-prove-possession-for-already-registered-tokens branch from b8c5768 to 83c5fe4 Compare August 20, 2025 08:48
@pmeulen pmeulen modified the milestones: 6.1.0, 2.1.0 Aug 20, 2025
@pmeulen pmeulen linked an issue Aug 20, 2025 that may be closed by this pull request
We add a check to prevent the same token having multiple
in flight registration processes for the same token.
@pablothedude pablothedude force-pushed the bugfix/add-prove-possession-for-already-registered-tokens branch from 83c5fe4 to 0f7f8fd Compare August 20, 2025 09:39
@pablothedude
Copy link
Copy Markdown
Contributor Author

I've also added this check in the Identity aggregate in the move token logic (which is used by a console command) to comply with this business rule.

@pablothedude pablothedude requested a review from johanib August 20, 2025 09:42
Copy link
Copy Markdown
Contributor

@johanib johanib left a comment

Choose a reason for hiding this comment

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

After discussion: LGTM.

@pablothedude pablothedude merged commit 79d018c into main Aug 21, 2025
2 of 3 checks passed
@pablothedude pablothedude deleted the bugfix/add-prove-possession-for-already-registered-tokens branch August 21, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Delivered

Development

Successfully merging this pull request may close these issues.

Middleware allows registration of two tokens of the same type

3 participants