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

Secure key storage #290

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

Secure key storage #290

wants to merge 20 commits into from

Conversation

Christiantyemele
Copy link
Collaborator

No description provided.

@Christiantyemele Christiantyemele requested review from Blindspot22, Hermann-Core and ndefokou and removed request for Blindspot22 and Hermann-Core January 13, 2025 10:21
@IngridPuppet
Copy link
Collaborator

I had a look at one of the failing tests:

──── STDERR:             did-endpoint web::tests::verify_didpop
thread 'web::tests::verify_didpop' panicked at crates/web-plugins/did-endpoint/src/plugin.rs:39:50:
Secrets Mastet_KEY env variable required: NotPresent

I ran a troubleshooting locally and can confirm that it is indeed because a MASTER_KEY env variable is not fed to the test. I am not fully aware of your current setup for setting those variables during tests, but make sure you're also setting this one your changes expect.

The other failure message also appears related to your changes introducing a call to a find_by_key method. Do you have that properly mocked?

 ──── STDERR:             did-endpoint didgen::tests::test_did_validation
thread 'didgen::tests::test_did_validation' panicked at crates/web-plugins/did-endpoint/src/didgen.rs:267:5:
MockKeystore::find_key_by(Document({"kid": String("did:peer:123#key-1")}), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]): No matching expectation found

Overall, I have another question: are all tests consistently passing on your local environments in the team, or you just expect them to pass on the pipeline? I'm asking because I feel something got broken in the meantime.

@Christiantyemele
Copy link
Collaborator Author

I had a look at one of the failing tests:

──── STDERR:             did-endpoint web::tests::verify_didpop
thread 'web::tests::verify_didpop' panicked at crates/web-plugins/did-endpoint/src/plugin.rs:39:50:
Secrets Mastet_KEY env variable required: NotPresent

I ran a troubleshooting locally and can confirm that it is indeed because a MASTER_KEY env variable is not fed to the test. I am not fully aware of your current setup for setting those variables during tests, but make sure you're also setting this one your changes expect.

The other failure message also appears related to your changes introducing a call to a find_by_key method. Do you have that properly mocked?

 ──── STDERR:             did-endpoint didgen::tests::test_did_validation
thread 'didgen::tests::test_did_validation' panicked at crates/web-plugins/did-endpoint/src/didgen.rs:267:5:
MockKeystore::find_key_by(Document({"kid": String("did:peer:123#key-1")}), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]): No matching expectation found

Overall, I have another question: are all tests consistently passing on your local environments in the team, or you just expect them to pass on the pipeline? I'm asking because I feel something got broken in the meantime.

the pipeline runs the tests with all the features enable while locally we run with the default features that's why cargo test might run locally and fail online because of some features

crates/database/src/lib.rs Outdated Show resolved Hide resolved
crates/keystore/src/lib.rs Outdated Show resolved Hide resolved
crates/keystore/src/lib.rs Show resolved Hide resolved
crates/keystore/src/lib.rs Show resolved Hide resolved
.github/scripts/test_config.sh Show resolved Hide resolved
storage/did.json Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mean to commit this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

NO

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mean to commit this file?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mean to commit this file?

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.

implement a secure key storage functionality for the pop-server E3
2 participants