-
-
Notifications
You must be signed in to change notification settings - Fork 963
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(security): code credential does not respect `highest_available` setting This patch fixes a security vulnerability which prevents the `code` method to properly report it's credentials count to the `highest_available` mechanism. For more details on this issue please refer to the [security advisory](GHSA-wc43-73w7-x2f5). * fix: normalize code credentials and deprecate via parameter Before this, code credentials for passwordless and mfa login were incorrectly stored and normalized. This could cause issues where the system would not detect the user's phone number, and where SMS/email MFA would not properly work with the `highest_available` setting. Breaking changes: Please note that the `via` parameter is deprecated when performing SMS 2FA. It will be removed in a future version. If the parameter is not included in the request, the user will see all their phone/email addresses from which to perform the flow. Before upgrading, ensure that your identity schema has the appropriate code configuration when using the code method for passwordless or 2fa login. If you are using the code method for 2FA login already, or you are using it for 1FA login but have not yet configured the code identifier, set `selfservice.methods.code.config.missing_credential_fallback_enabled` to `true` to prevent users from being locked out.
- Loading branch information
Showing
165 changed files
with
4,854 additions
and
1,442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
identity/.snapshots/TestSchemaExtensionCredentials-case=0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "password", | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
6 changes: 6 additions & 0 deletions
6
identity/.snapshots/TestSchemaExtensionCredentials-case=1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "password", | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
18 changes: 18 additions & 0 deletions
18
identity/.snapshots/TestSchemaExtensionCredentials-case=10.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"type": "code", | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"channel": "sms", | ||
"address": "+4917667111638" | ||
}, | ||
{ | ||
"channel": "email", | ||
"address": "[email protected]" | ||
} | ||
] | ||
}, | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
18 changes: 18 additions & 0 deletions
18
identity/.snapshots/TestSchemaExtensionCredentials-case=11.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"type": "code", | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"channel": "sms", | ||
"address": "+4917667111638" | ||
}, | ||
{ | ||
"channel": "email", | ||
"address": "[email protected]" | ||
} | ||
] | ||
}, | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
6 changes: 6 additions & 0 deletions
6
identity/.snapshots/TestSchemaExtensionCredentials-case=2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "webauthn", | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
6 changes: 6 additions & 0 deletions
6
identity/.snapshots/TestSchemaExtensionCredentials-case=3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "password", | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
6 changes: 6 additions & 0 deletions
6
identity/.snapshots/TestSchemaExtensionCredentials-case=4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "webauthn", | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
6 changes: 6 additions & 0 deletions
6
identity/.snapshots/TestSchemaExtensionCredentials-case=5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "webauthn", | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
14 changes: 14 additions & 0 deletions
14
identity/.snapshots/TestSchemaExtensionCredentials-case=6.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"type": "code", | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"channel": "email", | ||
"address": "[email protected]" | ||
} | ||
] | ||
}, | ||
"version": 1, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
14 changes: 14 additions & 0 deletions
14
identity/.snapshots/TestSchemaExtensionCredentials-case=7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"type": "code", | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"channel": "email", | ||
"address": "[email protected]" | ||
} | ||
] | ||
}, | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
14 changes: 14 additions & 0 deletions
14
identity/.snapshots/TestSchemaExtensionCredentials-case=8.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"type": "code", | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"channel": "email", | ||
"address": "[email protected]" | ||
} | ||
] | ||
}, | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
18 changes: 18 additions & 0 deletions
18
identity/.snapshots/TestSchemaExtensionCredentials-case=9.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"type": "code", | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"channel": "sms", | ||
"address": "+4917667111638" | ||
}, | ||
{ | ||
"channel": "email", | ||
"address": "[email protected]" | ||
} | ||
] | ||
}, | ||
"version": 0, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} |
30 changes: 30 additions & 0 deletions
30
identity/.snapshots/TestUpgradeCredentials-type=code-from=v0_with_correct_value.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"id": "4d64fa08-20fc-450d-bebd-ebd7c7b6e249", | ||
"credentials": { | ||
"code": { | ||
"type": "code", | ||
"identifiers": [ | ||
"[email protected]" | ||
], | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"address": "[email protected]", | ||
"channel": "email" | ||
} | ||
] | ||
}, | ||
"version": 1, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} | ||
}, | ||
"schema_id": "", | ||
"schema_url": "", | ||
"state": "", | ||
"traits": null, | ||
"metadata_public": null, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z", | ||
"organization_id": null | ||
} |
30 changes: 30 additions & 0 deletions
30
...pgradeCredentials-type=code-from=v0_with_email_empty_space_value-with_one_identifier.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"id": "4d64fa08-20fc-450d-bebd-ebd7c7b6e249", | ||
"credentials": { | ||
"code": { | ||
"type": "code", | ||
"identifiers": [ | ||
"[email protected]" | ||
], | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"address": "[email protected]", | ||
"channel": "email" | ||
} | ||
] | ||
}, | ||
"version": 1, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} | ||
}, | ||
"schema_id": "", | ||
"schema_url": "", | ||
"state": "", | ||
"traits": null, | ||
"metadata_public": null, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z", | ||
"organization_id": null | ||
} |
35 changes: 35 additions & 0 deletions
35
...gradeCredentials-type=code-from=v0_with_email_empty_space_value-with_two_identifiers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"id": "4d64fa08-20fc-450d-bebd-ebd7c7b6e249", | ||
"credentials": { | ||
"code": { | ||
"type": "code", | ||
"identifiers": [ | ||
"[email protected]", | ||
"[email protected]" | ||
], | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"address": "[email protected]", | ||
"channel": "email" | ||
}, | ||
{ | ||
"address": "[email protected]", | ||
"channel": "email" | ||
} | ||
] | ||
}, | ||
"version": 1, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} | ||
}, | ||
"schema_id": "", | ||
"schema_url": "", | ||
"state": "", | ||
"traits": null, | ||
"metadata_public": null, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z", | ||
"organization_id": null | ||
} |
30 changes: 30 additions & 0 deletions
30
identity/.snapshots/TestUpgradeCredentials-type=code-from=v0_with_empty_value.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"id": "4d64fa08-20fc-450d-bebd-ebd7c7b6e249", | ||
"credentials": { | ||
"code": { | ||
"type": "code", | ||
"identifiers": [ | ||
"[email protected]" | ||
], | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"address": "[email protected]", | ||
"channel": "email" | ||
} | ||
] | ||
}, | ||
"version": 1, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} | ||
}, | ||
"schema_id": "", | ||
"schema_url": "", | ||
"state": "", | ||
"traits": null, | ||
"metadata_public": null, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z", | ||
"organization_id": null | ||
} |
30 changes: 30 additions & 0 deletions
30
identity/.snapshots/TestUpgradeCredentials-type=code-from=v0_with_unknown_value.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"id": "4d64fa08-20fc-450d-bebd-ebd7c7b6e249", | ||
"credentials": { | ||
"code": { | ||
"type": "code", | ||
"identifiers": [ | ||
"[email protected]" | ||
], | ||
"config": { | ||
"addresses": [ | ||
{ | ||
"address": "[email protected]", | ||
"channel": "email" | ||
} | ||
] | ||
}, | ||
"version": 1, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z" | ||
} | ||
}, | ||
"schema_id": "", | ||
"schema_url": "", | ||
"state": "", | ||
"traits": null, | ||
"metadata_public": null, | ||
"created_at": "0001-01-01T00:00:00Z", | ||
"updated_at": "0001-01-01T00:00:00Z", | ||
"organization_id": null | ||
} |
Oops, something went wrong.