ockam
ockam copied to clipboard
ockam enroll identity fixes
Current behavior
Currently running ockam enroll handles identity re-use and creation differently depending on what the local state is. Here are the 3 states that are possible.
--identity option not used. And no prior enrollment, ~/.ockam is empty. Running ockam enroll creates a new identity, marks it as default, and saves it to a vault, and then uses that w/ Orchestrator.
--identity option not used. Default identity already exists in ~/.ockam and is used. A new identity is not created. This is the result of a previous successful enrollment, or, someone creating a new identity and marking it as the default using ockam identity create, etc.
—-identity my_id option is used. Where my_id has already been created and is on disk. Eg using ockam identity create my_id.
Proposed changes
Added correct error handling
Checks
- [x] All commits in this Pull Request are signed and Verified by Github.
- [x] All commits in this Pull Request follow the Ockam commit message convention.
- [x] There are no Merge commits in this Pull Request. Ockam repo maintains a linear commit history. We merge Pull Requests by rebasing them onto the develop branch. Rebasing to the latest develop branch and force pushing to your Pull Request branch is okay.
- [x] I have read and accept the Ockam Community Code of Conduct.
- [x] I have read and accepted the Ockam Contributor License Agreement by adding my Git/Github details in a row at the end of the CONTRIBUTORS.csv file in a separate pull request to the build-trust/ockam repository. The easiest way to do this is to edit the CONTRIBUTORS.csv file in the github web UI and create a separate Pull Request, this will mark the commit as verified.
@nazmulidris
Hi @nazmulidris, Hope you are doing well. Could you take a look at this PR?
Hello @YorickdeJong ! I'll be reviewing your PR, nazmul is not available until next week. To make things easier on our side, could you:
- Squash your commits into a single one
- Use the commit message convention
- Remove the
.vscode
files from the PR?
I'll get with the review as soon as I can, thanks for submitting it!
Thanks! Will take a look in about 1-2 days if that's ok :)
Thanks! Will take a look in about 1-2 days if that's ok :)
Sure, whenever you can. Thanks 🙏
This PR https://github.com/build-trust/ockam/pull/7616 actually closes this issue. We had to make some architectural changes to support this here
@YorickdeJong Thank you for taking a look at this. We had a to make some architectural changes to CliState and ended up resolving this issue for a release version of the command. Sorry that we had to close it, and thank you for contributing to all the other issues as well.