ockam icon indicating copy to clipboard operation
ockam copied to clipboard

Make `ockam identity show` command work without creating nodes

Open mrinalwadhwa opened this issue 2 years ago • 3 comments

Currently:

> ockam enroll
...
> ockam identity show
No such node available. Run `ockam node list` to list available nodes

After enroll there is already an identity and it is stored in the default_identity key of our config file.

Desired:

In the above case > ockam identity show should show the default identity.


We love helping new contributors! If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion. If you're looking for other issues to contribute to, checkout this discussion and labels - https://github.com/build-trust/ockam/labels/good%20first%20issue or https://github.com/build-trust/ockam/labels/help%20wanted

mrinalwadhwa avatar Sep 11 '22 21:09 mrinalwadhwa

I made a start at this in https://github.com/rtsuk/ockam/tree/default_identity. I think it is correct for the command's full option, but I'm not sure how to covert the identity in the config file into a identity ID.

rtsuk avatar Sep 17 '22 15:09 rtsuk

@rtsuk thank you for spending time on this! Would you mind turning your branch into a draft pull request? I'll try to help with comments there.

Roughly, something like this should work:

let vault = Vault::create();
let identity = PublicIdentity::import(&serialized_identity, &vault);

https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_identity/src/public_identity.rs

mrinalwadhwa avatar Sep 17 '22 20:09 mrinalwadhwa

Will do. The pull request template had a lot of text and the coffee hadn't quite kicked in enough for me to parse it all. 😀

rtsuk avatar Sep 17 '22 20:09 rtsuk

Hey @rtsuk, let me know if you need any help with this, looking forward to that PR! :rocket:

adrianbenavides avatar Oct 03 '22 12:10 adrianbenavides

Done

adrianbenavides avatar Apr 10 '23 11:04 adrianbenavides