[cdk-mintd] insecure local-only RPC server never started #1282

Closed
opened 2025-11-15 16:34:41 +00:00 by jblachly · 1 comment
jblachly commented 2025-11-15 16:34:41 +00:00 (Migrated from github.com)

Enabling

[mint_management_rpc]
enabled = true

without specifying a TLS directory (with cert file, etc.) should in theory start an insecure server:

github.com/cashubtc/cdk@24d397d10b/crates/cdk-mint-rpc/src/proto/server.rs (L141-L144)

However, this code path is never taken because a default value is initialized as <workdir>/tls here:

github.com/cashubtc/cdk@24d397d10b/crates/cdk-mintd/src/lib.rs (L887)

And cdk-mintd fails to startup with "TLS directory does not exist"

Enabling ``` [mint_management_rpc] enabled = true ``` without specifying a TLS directory (with cert file, etc.) should in theory start an insecure server: https://github.com/cashubtc/cdk/blob/24d397d10be8bfb5b3382137d743c8601e63f75b/crates/cdk-mint-rpc/src/proto/server.rs#L141-L144 However, this code path is never taken because a default value is initialized as `<workdir>/tls` here: https://github.com/cashubtc/cdk/blob/24d397d10be8bfb5b3382137d743c8601e63f75b/crates/cdk-mintd/src/lib.rs#L887 And `cdk-mintd` fails to startup with "TLS directory does not exist"
thesimplekid commented 2025-11-17 13:26:16 +00:00 (Migrated from github.com)

Thank you I think we left this in somewhat intentionally and did not update comments thinking we should enforce tls. However, I don't think this makes sense as it might be comment to use over localhost where there is no need for tls, I'll take a looks should be an easy enough fix.

Thank you I think we left this in somewhat intentionally and did not update comments thinking we should enforce tls. However, I don't think this makes sense as it might be comment to use over localhost where there is no need for tls, I'll take a looks should be an easy enough fix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk#1282
No description provided.