Skip to content

Persist ohttp keys - #616

Merged
DanGould merged 2 commits into
payjoin:masterfrom
DanGould:persist-ohttp-keys
Apr 1, 2025
Merged

DanGould merged 2 commits into
payjoin:masterfrom
DanGould:persist-ohttp-keys

Conversation

@DanGould

Copy link
Copy Markdown
Member

Fix #614

OHTTP KeyConfig management is about to get more complex.
@DanGould
DanGould force-pushed the persist-ohttp-keys branch 2 times, most recently from d187f20 to 4240876 Compare March 31, 2025 19:13
@coveralls

coveralls commented Mar 31, 2025 •

Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 14183175036

Details

  • 54 of 76 (71.05%) changed or added relevant lines in 4 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.1%) to 81.577%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin-directory/src/lib.rs 5 9 55.56%
payjoin-directory/src/main.rs 0 18 0.0%
Files with Coverage Reduction New Missed Lines %
payjoin-directory/src/main.rs 1 0.0%
payjoin/src/send/mod.rs 2 94.46%
Totals Coverage Status
Change from base Build 14175113914: -0.1%
Covered Lines: 5256
Relevant Lines: 6443

💛 - Coveralls

@DanGould
DanGould force-pushed the persist-ohttp-keys branch 5 times, most recently from 59ef0e8 to 999d418 Compare March 31, 2025 19:56
@DanGould
DanGould marked this pull request as ready for review March 31, 2025 20:24
@DanGould
DanGould requested a review from spacebear21 March 31, 2025 20:24
@DanGould

Copy link
Copy Markdown
Member Author

@spacebear21: @nothingmuch and I paired this, so would you help us out and provide third party review?

Comment thread payjoin-directory/src/key_config.rs Resolved
Comment thread payjoin-directory/src/main.rs Resolved
Comment thread payjoin-directory/src/main.rs Resolved
Comment thread payjoin-directory/src/key_config.rs Resolved
@DanGould
DanGould force-pushed the persist-ohttp-keys branch 4 times, most recently from 9297ee4 to 21972ae Compare March 31, 2025 21:16
@DanGould
DanGould requested a review from spacebear21 March 31, 2025 21:20
Comment thread payjoin-directory/src/lib.rs Resolved

@spacebear21 spacebear21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

utACK 21972ae

Does the Dockerfile need to be updated to generate keys if none exist since they're not made automatically? If it's a required manual step it should be documented somewhere.

Include functions for generation and reading from persistence. Note KeyId = 1
Is still used and there is no function for key rotation yet.

Persist a key on first run if none already exists.

The OHTTP Server configuration is now an argument to listen functions.
For now, a default path of `ohttp_keys/1.ikm` is used to persist the key
material. "1" is the KeyId. The default path is relative to where the
binary is run.
@DanGould

Copy link
Copy Markdown
Member Author

Does the Dockerfile need to be updated to generate keys if none exist since they're not made automatically? If it's a required manual step it should be documented somewhere.

No, and we wouldn't want it to because that's really a docker compose matter. In order to keep the compose functionality working I've changed this to generate on first use and read from the specified or default key configuration directory.

@DanGould
DanGould requested a review from spacebear21 March 31, 2025 23:06

@spacebear21 spacebear21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

utack c26bea6

@DanGould
DanGould merged commit 4357f3b into payjoin:master Apr 1, 2025
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.

Payjoin directory should persist OHTTP keys

3 participants