zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

`transport/auth/pubkey/known_keys_file` is ignored

Open fuzzypixelz opened this issue 1 year ago • 1 comments

Describe the bug

https://github.com/eclipse-zenoh/zenoh/blob/3579f12e8d8d12b30305a9801c8dfda6b4d8ecc2/io/zenoh-transport/src/unicast/establishment/ext/auth/pubkey.rs#L123

To reproduce

N/A

System info

  • ref: 3579f12e8d8d12b30305a9801c8dfda6b4d8ecc2

fuzzypixelz avatar Aug 29 '24 10:08 fuzzypixelz

I saw you tagged this as a "good first issue" and I would like to get involved a little bit.

My understanding of the expected behavior is that it would parse a "known_keys_file" which contains a list of public keys and adds them into the "lookup" HashSet and returns the AuthPubKey.

I am a bit unsure how to treat the missing pri_key and pub_key to construct the AuthPubKey. Can I simply leave them blank, as they are not wrapped in an Option as is lookup?

cramke avatar Oct 03 '25 07:10 cramke

I am a bit unsure how to treat the missing pri_key and pub_key to construct the AuthPubKey. Can I simply leave them blank, as they are not wrapped in an Option as is lookup?

Hi @cramke, The pri_key and pub_key fields are still mandatory, pubkey authentication in Zenoh (as it is today) must be mutual, so both instances must each have their own key-pair. I believe these two fields are already initialized from the config, but I could be wrong since I haven't looked at this code in a while.

Also it seems that someone else has already opened a PR for this. Sorry for the late response 😅

oteffahi avatar Dec 16 '25 13:12 oteffahi