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

Add mDoc auth Reader auth #75

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add mDoc auth Reader auth #75

wants to merge 4 commits into from

Conversation

justAnIdentity
Copy link
Contributor

No description provided.

Copy link
Contributor

@cobward cobward left a comment

Choose a reason for hiding this comment

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

Preliminary suggestions to improve the code. I think we need a couple of iterations to make this clearer. Since this is very security sensitive code it is really important that it is obvious what it is doing, it is easy to follow, and it is well documented. That way we can have confidence that it is implemented correctly.

To that effect encapsulating code so that we don't have multi-hundred line validation functions, and adding lots of comments would be very welcome.

src/issuance/x5chain.rs Outdated Show resolved Hide resolved
src/issuance/x5chain.rs Outdated Show resolved Hide resolved
src/issuance/x5chain.rs Outdated Show resolved Hide resolved
src/presentation/mdoc_auth.rs Outdated Show resolved Hide resolved
src/presentation/reader.rs Outdated Show resolved Hide resolved
src/presentation/trust_anchor.rs Outdated Show resolved Hide resolved
src/presentation/trust_anchor.rs Outdated Show resolved Hide resolved
src/presentation/reader.rs Outdated Show resolved Hide resolved
src/presentation/reader.rs Outdated Show resolved Hide resolved
src/presentation/trust_anchor.rs Outdated Show resolved Hide resolved
@sbihel sbihel changed the title Feat/mdoc auth Add mDoc auth and iaca validation Nov 27, 2023
src/definitions/x509/extensions.rs Outdated Show resolved Hide resolved
src/definitions/x509/error.rs Outdated Show resolved Hide resolved
src/definitions/x509/extensions.rs Show resolved Hide resolved
pub mod test {

#[test]
fn test_key_usage() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you write some unit tests or just remove this. Ideally adding some unit tests would be great if you have time.

src/definitions/x509/mod.rs Outdated Show resolved Hide resolved
src/definitions/x509/x5chain.rs Outdated Show resolved Hide resolved
src/definitions/x509/x5chain.rs Outdated Show resolved Hide resolved
src/presentation/reader.rs Outdated Show resolved Hide resolved
src/presentation/reader.rs Outdated Show resolved Hide resolved
src/presentation/reader.rs Outdated Show resolved Hide resolved
@justAnIdentity justAnIdentity changed the title Add mDoc auth and iaca validation Add mDoc auth Reader auth Mar 25, 2024
author Arjen van Veen <arjen.van.veen@spruceid.com> 1701187280 +0100
committer Arjen van Veen <arjen.van.veen@spruceid.com> 1717744754 +0200

refactor for readability WIP

clean up comments and duplicates

clean up, add some comments

cargo fmt

clippy fix

fmt

assert on tests

address pr comments

refactor handle_response to return a validated_response, submit parsing and decryption errors under errors

support creating a trust_anchor_registry from pem strings

Fix x5chain encoding.

X5Chain decoding fixes and version checking

Improve reader validation code.

- Also add a CLI tool for validating issuer certificates.

Fix public key parsing

Feat/reader auth cn (#79)

* rebase onto feat/mdoc-auth

* rebase and use mdoc-auth functions

* wip experiment with cert building

* small clean up

* Fix inconsistency. (#78)

* validated request improvements

---------

Co-authored-by: Jacob <jacob.ward@spruceid.com>

remove duplicate code

clippy fix
Ryanmtate and others added 2 commits November 16, 2024 12:14
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Co-authored-by: Jacob <jacob.ward@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants