-
Notifications
You must be signed in to change notification settings - Fork 129
[WAL-896] feat(wallet): finalize authenticated OpenID4VP presentation flow #1885
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
Open
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f755377
fix(dcql): enforce complete query and disclosure matching
szijpeter b587413
fix(oid4vp): enforce authenticated request and response flow
szijpeter ffd8271
fix(x509): validate client chains on native platforms
szijpeter 5a55031
feat(mobile): expose response mode in presentation previews
szijpeter 77b1345
fix(oid4vp): propagate request object audience policy
szijpeter 1805a1c
test(oid4vp): cover deterministic response encryption selection
szijpeter 7cb3005
test(mobile): cover app-hosted x509 request objects
szijpeter e73edab
fix(oid4vp): preserve legacy resolver compatibility
szijpeter 3295a47
fix(wallet): use typed DCQL and key-specific request metadata
szijpeter bcf6217
test(mobile): cover x509 and crypto2 presentation paths
szijpeter d445a39
fix(x509): fail closed on unsupported client authentication
szijpeter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
waltid-applications/mobile-e2e-fixtures/ios/TestHelpers/X509RequestObjectFixture.swift
This file contains hidden or 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,39 @@ | ||
| import Foundation | ||
|
|
||
| public enum X509RequestObjectFixture { | ||
| /// SHA-256 Base64URL hash of the leaf certificate in `signedRequestObject`. | ||
| public static let clientID = "x509_hash:IT2EMOaIMUTx1zj0yteLZyOgkXF6Siw2t_K42tsKT_I" | ||
|
|
||
| /// Test-only CA for the leaf in `signedRequestObject`, valid until July 2036. | ||
| public static let trustAnchorPEM = """ | ||
| -----BEGIN CERTIFICATE----- | ||
| MIIB6zCCAZGgAwIBAgIUSFgRXRcRirEjuPvPM38K5ZGrPpcwCgYIKoZIzj0EAwIw | ||
| QzEvMC0GA1UEAwwmd2FsdC5pZCBBcHAtSG9zdGVkIFg1MDkgSGFzaCBUZXN0IFJv | ||
| b3QxEDAOBgNVBAoMB3dhbHQuaWQwHhcNMjYwNzI3MDkyMDIwWhcNMzYwNzI0MDky | ||
| MDIwWjBDMS8wLQYDVQQDDCZ3YWx0LmlkIEFwcC1Ib3N0ZWQgWDUwOSBIYXNoIFRl | ||
| c3QgUm9vdDEQMA4GA1UECgwHd2FsdC5pZDBZMBMGByqGSM49AgEGCCqGSM49AwEH | ||
| A0IABFqSCpC466BkSl98zsxgt63FTIjBltCCxhDCHcTZ1+T8ljrbYGHxEVWAiq/T | ||
| XFvAE971gsSm/3lZSgE0lk5pfrijYzBhMB0GA1UdDgQWBBTk0sEWqbKG1u+e8nSa | ||
| +01kr6XitDAfBgNVHSMEGDAWgBTk0sEWqbKG1u+e8nSa+01kr6XitDAPBgNVHRMB | ||
| Af8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAgNIADBFAiBPP37V | ||
| E9U0V2Uax6E9uI00qAtm+feze/eCEtuMs3fRlwIhAP96ce+J+6kuWRvUSZPYISuf | ||
| 2JhW6xQPYQbAK6L6nIeR | ||
| -----END CERTIFICATE----- | ||
| """ | ||
|
|
||
| /// Fixed ES256 `x509_hash` Request Object with a matching `x5c` leaf. | ||
| public static let signedRequestObject = [ | ||
| "eyJhbGciOiJFUzI1NiIsInR5cCI6Im9hdXRoLWF1dGh6LXJlcStqd3QiLCJ4NWMiOlsiTUlJQjdUQ0NBWktnQXdJQkFnSVVMQ3QwbGllc2tseVpnMGxsLyt2M0NVWXAwQ2N3Q2dZSUtvWkl6ajBFQXdJd1F6RXZNQzBHQTFVRUF3d21kMkZzZEM1cFpDQkJjSEF0U0c5emRHVmtJRmcxTURrZ1NHR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6ImFwcC1ob3N0ZWQteDUwOS1oYXNoLXRlc3QiLCJzdGF0ZSI6ImFwcC1ob3N0ZWQteDUwOS1oYXNoLXRlc3QiLCJkY3FsX3F1ZXJ5Ijp7ImNyZWRlbnRpYWxzIjpbeyJpZCI6InRlc3RfY3JlZGVudGlhbCIsImZvcm1hdCI6ImRjK3NkLWp3dCIsIm1ldGEiOnsidmN0X3ZhbHVlcyI6WyJ1cm46ZXhhbXBsZTp0ZXN0Il19fV0sImNyZWRlbnRpYWxfc2V0cyI6W3sib3B0aW9ucyI6W1sidGVzdF9jcmVkZW50aWFsIl1dLCJyZXF1aXJlZCI6ZmFsc2V9XX0sImNsaWVudF9tZXRhZGF0YSI6e319", | ||
| ".2qQUOrCDfL2SVBHa4z-KbkhjrzRFUft-jto17Mq3p4XhSyUOhlcl_FQlGNGJLHrLri06MGnVoO8dM8mCUofRPg", | ||
| ].joined() | ||
|
|
||
| public static let authorizationRequestURL: URL = { | ||
| var components = URLComponents(string: "openid4vp://authorize")! | ||
| components.queryItems = [ | ||
| URLQueryItem(name: "client_id", value: clientID), | ||
| URLQueryItem(name: "request", value: signedRequestObject), | ||
| ] | ||
| return components.url! | ||
| }() | ||
| } |
This file contains hidden or 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 hidden or 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
11 changes: 10 additions & 1 deletion
11
...ibraries/credentials/waltid-dcql/src/commonMain/kotlin/id/walt/dcql/DcqlMatchException.kt
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,13 @@ | ||
| package id.walt.dcql | ||
|
|
||
| // Custom exception for match failures | ||
| class DcqlMatchException(message: String) : Exception(message) | ||
| open class DcqlMatchException(message: String) : Exception(message) | ||
|
|
||
| /** A well-formed request asks for a credential that is not available locally. */ | ||
| class RequiredCredentialUnavailableException( | ||
| val queryIds: List<String>, | ||
| message: String, | ||
| ) : DcqlMatchException(message) | ||
|
|
||
| /** The request contains a constraint that this matcher cannot evaluate safely. */ | ||
| class UnsupportedDcqlConstraintException(message: String) : DcqlMatchException(message) |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.