Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keys migrate command #5097

Merged
merged 16 commits into from
Sep 30, 2019
Merged

Add keys migrate command #5097

merged 16 commits into from
Sep 30, 2019

Conversation

alessio
Copy link
Contributor

@alessio alessio commented Sep 24, 2019

Add new command to assist users migrate their keys from the legacy
on-disk keybase to the new OS keyring-based implementation.

Ref #4754

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@alessio alessio marked this pull request as ready for review September 24, 2019 15:51
@alessio alessio requested review from jleni and tnachen September 24, 2019 15:51
@alessio alessio added R4R C:Keys Keybase, KMS and HSMs labels Sep 24, 2019
@fedekunze
Copy link
Collaborator

@alessio tests are failing

@alexanderbez alexanderbez mentioned this pull request Sep 24, 2019
5 tasks
@alessio
Copy link
Contributor Author

alessio commented Sep 24, 2019

Fixed @fedekunze, thanks!

@codecov
Copy link

codecov bot commented Sep 24, 2019

Codecov Report

Merging #5097 into master will increase coverage by 0.01%.
The diff coverage is 57.35%.

@@            Coverage Diff             @@
##           master    #5097      +/-   ##
==========================================
+ Coverage   54.86%   54.87%   +0.01%     
==========================================
  Files         295      296       +1     
  Lines       18261    18336      +75     
==========================================
+ Hits        10019    10062      +43     
- Misses       7493     7524      +31     
- Partials      749      750       +1

@alessio alessio force-pushed the alessio/keys-migrate branch from 841576d to 5ab4d2a Compare September 24, 2019 18:15
types/config.go Show resolved Hide resolved
@alessio alessio requested a review from fedekunze September 24, 2019 18:31
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

thanks @alessio

@alessio
Copy link
Contributor Author

alessio commented Sep 25, 2019

Once this is merged, I'll add all remaining commands in an ensuing PR. Once the latter is done, then I'll get on with the following (note: this comment was added by @alexanderbez):

// 1. Remove lazyKeybaseKeyring and make keyringKeybase useable by the outside
// world.
// 2. Mark all keyringKeybase methods private and remove the compile time
// Keybase interface assertion.

EDIT: @alexanderbez comment is now being addressed in #5104

return err
}

armoredPriv, err := legacykb.ExportPrivKey(keyName, passwd, "abc")
Copy link
Contributor

Choose a reason for hiding this comment

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

huh? Shouldn't we export with a user's encryption passphrase instead of hard-codec "abc"?

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

tested ACK 🎉

@alexanderbez alexanderbez merged commit 3e6562c into master Sep 30, 2019
@alexanderbez alexanderbez deleted the alessio/keys-migrate branch September 30, 2019 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Keys Keybase, KMS and HSMs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants