Go to file
Jeff Wendling 30f790a040
Create and use an encryption.Store (#2293)
* add path implementation

This commit adds a pkg/paths package which contains two types,
Encrypted and Unencrypted, to statically enforce what is contained
in a path. It's part of a refactoring of the code base to be more
clear about what is contained in a storj.Path at all the layers.

Change-Id: Ifc4d4932da26a97ea99749b8356b4543496a8864

* add encryption store

This change adds an encryption.Store type to keep a collection
of root keys for arbitrary locations in some buckets. It allows
one to look up all of the necessary information to encrypt paths,
decrypt paths and decrypt list operations.

It adds some exported functions to perform encryption on paths
using a Store.

Change-Id: I1a3d230c521d65f0ede727f93e1cb389f8be9497

* add shim around streams store

This commit changes no functionality, but just reorganizes the code
so that changes can be made directly to the streams store
implementation without affecting callers.

It also adds a Path type that will be used at the interface boundary
for the streams store so that it can be sure that it's getting well
formed paths that it expects.

Change-Id: I50bd682995b185beb653b00562fab62ef11f1ab5

* refactor streams to use encryption store

This commit changes the streams store to use the path type as
well as the encryption store to handle all of it's encryption
and decryption.

Some changes were made to how the default key is returned in
the encryption store to have it include the case when the bucket
exists but no paths matched. The path iterator could also be
simplified to not report if a consume was valid: that information
is no longer necessary.

The kvmetainfo tests were changed to appropriately pass the
subtests *testing.T rather than having the closure it executes
use the parent one. The test framework now correctly reports
which test did the failing.

There are still some latent issues with listing in that listing
for "a/" and listing for "a" are not the same operation, but we
treat them as such. I suspect that there are also issues with
paths like "/" or "//foo", but that's for another time.

Change-Id: I81cad4ba2850c3d14ba7e632777c4cac93db9472

* use an encryption store at the upper layers

Change-Id: Id9b4dd5f27b3ecac863de586e9ae076f4f927f6f

* fix linting failures

Change-Id: Ifb8378879ad308d4d047a0483850156371a41280

* fix linting in encryption test

Change-Id: Ia35647dfe18b0f20fe13763b28e53294f75c38fa

* get rid of kvmetainfo rootKey

Change-Id: Id795ca03d9417e3fe9634365a121430eb678d6d5

* Fix linting failure for return with else

Change-Id: I0b9ffd92be42ffcd8fef7ea735c5fc114a55d3b5

* fix some bugs adding enc store to kvmetainfo

Change-Id: I8e765970ba817289c65ec62971ae3bfa2c53a1ba

* respond to review feedback

Change-Id: I43e2ce29ce2fb6677b1cd6b9469838d80ec92c86
2019-06-24 19:23:07 +00:00
.github Update pr template (#2237) 2019-06-19 22:11:48 +03:00
bootstrap Add email to self node info (#2171) 2019-06-11 16:30:28 +03:00
cmd Don't require encryption keys for project or bucket management (#2291) 2019-06-23 22:06:14 -04:00
docs/design initial design doc for SN graceful exit (#2077) 2019-06-24 10:28:53 -04:00
examples Repair should not corrupt files (#2194) 2019-06-14 12:16:31 +03:00
internal Mask IP Addresses to subnets (#2305) 2019-06-24 17:33:18 +02:00
lib Create and use an encryption.Store (#2293) 2019-06-24 19:23:07 +00:00
mobile Don't require encryption keys for project or bucket management (#2291) 2019-06-23 22:06:14 -04:00
pkg Create and use an encryption.Store (#2293) 2019-06-24 19:23:07 +00:00
resources Add LE CA to satellite and storagenode images (#1688) 2019-04-08 13:06:01 -04:00
satellite metainfo: add project info rpc for getting a project salt using an api key (#2311) 2019-06-24 11:15:45 -06:00
scripts scripts/tag-release.sh: libuplink release tagging (#2256) 2019-06-24 19:53:17 +02:00
storage Use zap.Stringer instead of zap.String (#2223) 2019-06-18 01:37:43 +02:00
storagenode SNO Dshboard initial api endpoint added (#2284) 2019-06-24 18:15:31 +03:00
uplink Create and use an encryption.Store (#2293) 2019-06-24 19:23:07 +00:00
versioncontrol Add Identity to Version Control Server (#1876) 2019-05-01 18:21:51 +02:00
web web/satellite: create ReferralStats component (#2309) 2019-06-24 13:40:59 -04:00
.clabot Adding Andrew Harding (#2254) 2019-06-19 22:40:09 +02:00
.dockerignore Forward-port release-alpha8 build script issues (#1726) 2019-04-09 23:01:10 -06:00
.gitignore gitignore: cleanup old things (#2197) 2019-06-14 12:42:37 +03:00
.golangci.yml Update golangci-lint (#2159) 2019-06-10 11:52:09 +03:00
CODE_OF_CONDUCT.md Adding CODE_OF_CONDUCT to storj/storj repo (#779) 2018-12-07 15:10:02 -05:00
docker-compose.yaml testplanet.Run (#1222) 2019-02-04 22:37:46 +02:00
Dockerfile.jenkins jenkins: capability to use leakcheck (#2179) 2019-06-21 17:57:38 +03:00
go.mod Expand the inspector tool to provide node id's for each segment, rather than just numeric totals (#2205) 2019-06-18 18:22:14 -04:00
go.sum V3-1819 Storage node operator server and service started (#2112) 2019-06-20 14:52:32 +03:00
Jenkinsfile Fix Jenkins master builds (#1889) 2019-05-03 14:14:38 -04:00
Jenkinsfile.gerrit jenkins: capability to use leakcheck (#2179) 2019-06-21 17:57:38 +03:00
Jenkinsfile.public jenkins: capability to use leakcheck (#2179) 2019-06-21 17:57:38 +03:00
LICENSE license code with agplv3 (#126) 2018-07-05 10:24:26 -04:00
Makefile jenkins: capability to use leakcheck (#2179) 2019-06-21 17:57:38 +03:00
package-lock.json Satellite api keys frontend (#1039) 2019-02-01 18:19:30 +02:00
proto.lock metainfo: add project info rpc for getting a project salt using an api key (#2311) 2019-06-24 11:15:45 -06:00
README.md Direct suggestions to ideas.storj.io (#1891) 2019-05-07 22:14:25 +02:00

Storj V3 Network

Go Report Card Go Doc Coverage Status Alpha

Storj is building a decentralized cloud storage network. Check out our white paper for more info!


Storj is an S3-compatible platform and suite of decentralized applications that allows you to store data in a secure and decentralized manner. Your files are encrypted, broken into little pieces and stored in a global decentralized network of computers. Luckily, we also support allowing you (and only you) to retrieve those files!

Table of Contents

Contributing to Storj

All of our code for Storj v3 is open source. Have a code change you think would make Storj better? Please send a pull request along! Make sure to sign our Contributor License Agreement (CLA) first. See our license section for more details.

Have comments or bug reports? Want to propose a PR before hand-crafting it? Jump on to our Rocketchat and join the #dev channel to say hi to the developer community and to talk to the Storj core team.

Want to vote on or suggest new features? Post it on ideas.storj.io.

Issue tracking and roadmap

See the breakdown of what we're building by checking out the following resources:

Install required packages

To get started running Storj locally, download and install the latest release of Go (at least Go 1.11) at golang.org.

You will also need Git. (brew install git, apt-get install git, etc). If you're building on Windows, you also need to install and have gcc setup correctly.

We support Linux, Mac, and Windows operating systems. Other operating systems supported by Go should also be able to run Storj.

Download and compile Storj

Aside about GOPATH: Go 1.11 supports a new feature called Go modules, and Storj has adopted Go module support. If you've used previous Go versions, Go modules no longer require a GOPATH environment variable. Go by default falls back to the old behavior if you check out code inside of the directory referenced by your GOPATH variable, so make sure to use another directory, unset GOPATH entirely, or set GO111MODULE=on before continuing with these instructions.

First, fork our repo and clone your copy of our repository.

git clone git@github.com:<your-username>/storj storj
cd storj

Then, let's install Storj.

go install -v ./cmd/...

Make changes and test

Make the changes you want to see! Once you're done, you can run all of the unit tests:

go test -v ./...

You can also execute only a single test package if you like. For example: go test ./pkg/kademlia. Add -v for more informations about the executed unit tests.

Push up a pull request

Use Git to push your changes to your fork:

git commit -a -m 'my changes!'
git push origin master

Use Github to open a pull request!

Start using Storj

Our wiki has documentation and tutorials. Check out these three tutorials:

License

The network under construction (this repo) is currently licensed with the AGPLv3 license. Once the network reaches beta phase, we will be licensing all client-side code via the Apache v2 license.

For code released under the AGPLv3, we request that contributors sign our Contributor License Agreement (CLA) so that we can relicense the code under Apache v2, or other licenses in the future.

Support

If you have any questions or suggestions please reach out to us on Rocketchat or email us at support@tardigrade.io.