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

Update Client Keys Permissions to 0700 #3733

Merged
merged 4 commits into from
Feb 26, 2019

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Feb 25, 2019

The "short-term" approach to #3716.

I initially attempted to set chmod -R 0700 on the parent Keybase directory and recursively on all its contents after any NewGoLevelDB call (see commit: dfd9dee).

However, I am able to use the Keybase just fine, but some tests fail on CI because a ldb file is missing? Strange. So, I opted to only set 0700 on the parent Keybase directory (keys). This should be good enough. Correct me if I'm wrong @alessio or @mircea-c.


  • Targeted PR against correct branch (see CONTRIBUTING.md)

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.

  • Wrote tests

  • Updated relevant documentation (docs/)

  • Added entries in PENDING.md with issue #

  • rereviewed 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)

@alexanderbez alexanderbez added T: Security WIP C:Keys Keybase, KMS and HSMs labels Feb 25, 2019
@alexanderbez
Copy link
Contributor Author

Seems that setting permission on tmp files manually is causing some of them to disappear in the CLI tests.

@codecov
Copy link

codecov bot commented Feb 25, 2019

Codecov Report

Merging #3733 into develop will increase coverage by <.01%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##           develop    #3733      +/-   ##
===========================================
+ Coverage    61.18%   61.18%   +<.01%     
===========================================
  Files          190      190              
  Lines        14042    14044       +2     
===========================================
+ Hits          8591     8593       +2     
  Misses        4913     4913              
  Partials       538      538

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

Code changes look fine to me. I'm not very familiar with Unix permission structure - will other processes still be unable to read the files if the parent directory is 0700 (even if they know the file path)?

@alexanderbez
Copy link
Contributor Author

alexanderbez commented Feb 26, 2019

@cwgoes other processes will not be able to read the files I think. However, this shouldn't be a problem because everything should be run under the user process anyway to which 0700 allows.

@mircea-c
Copy link

@cwgoes, @alexanderbez with 0700 only the file owner has any permissions on it. If a directory has 0700, no one but the owner is permitted to read the contents of the directory. So even with a full file path, any other user will just get the "file not found"

@cwgoes
Copy link
Contributor

cwgoes commented Feb 26, 2019

@cwgoes, @alexanderbez with 0700 only the file owner has any permissions on it. If a directory has 0700, no one but the owner is permitted to read the contents of the directory. So even with a full file path, any other user will just get the "file not found"

Thanks @mircea-c!

@alexanderbez
Copy link
Contributor Author

Perfect, thanks @mircea-c

@jackzampolin jackzampolin merged commit d1573a1 into develop Feb 26, 2019
@jackzampolin jackzampolin deleted the bez/3716-keys-db-perm-fixes branch February 26, 2019 19:36
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 T: Security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants