Skip to content

Commit

Permalink
Add encrypted file upload to gossip ring
Browse files Browse the repository at this point in the history
- ServiceGroup now has an organization component, and it's from_str
  can parse strings in "foo.bar" and "foo.bar@baz" format
- ConfigFile renamed to GossipFile
- ConfigFileList renamed to GossipFileList
- remove dead key tests in sup
- add retry + exponential backoff for decrypt file writes
- add FileWriteRetries to /gossip sidecar

Signed-off-by: Dave Parfitt <[email protected]>

Pull request: #452
Approved by: metadave
  • Loading branch information
Dave Parfitt authored and Nathan L Smith committed Apr 30, 2016
1 parent 17ac9f6 commit 2d8456b
Show file tree
Hide file tree
Showing 24 changed files with 970 additions and 551 deletions.
1 change: 1 addition & 0 deletions components/common/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions components/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Adam Jacob <[email protected]>", "Jamie Winsor <[email protected]>", "Fletche
[dependencies]
log = "*"
openssl = "*"
regex = "*"
rustc-serialize = "*"
time = "*"

Expand Down
404 changes: 0 additions & 404 deletions components/common/src/config_file.rs

This file was deleted.

13 changes: 9 additions & 4 deletions components/common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ pub type Result<T> = result::Result<T, Error>;

#[derive(Debug)]
pub enum Error {
ConfigFileRelativePath(String),
CryptoKeyError(String),
GossipFileRelativePath(String),
DepotClient(depot_client::Error),
FileNameError,
HabitatCore(hcore::Error),
Expand All @@ -28,8 +29,11 @@ pub enum Error {
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let msg = match *self {
Error::ConfigFileRelativePath(ref s) => {
format!("Path for configuration file cannot have relative components (eg: ..): {}",
Error::CryptoKeyError(ref s) => {
format!("Missing or invalid key: {}", s)
}
Error::GossipFileRelativePath(ref s) => {
format!("Path for gossip file cannot have relative components (eg: ..): {}",
s)
}
Error::DepotClient(ref err) => format!("{}", err),
Expand All @@ -44,7 +48,8 @@ impl fmt::Display for Error {
impl error::Error for Error {
fn description(&self) -> &str {
match *self {
Error::ConfigFileRelativePath(_) => "Path for configuration file cannot have relative components (eg: ..)",
Error::CryptoKeyError(_) => "Missing or invalid key",
Error::GossipFileRelativePath(_) => "Path for gossip file cannot have relative components (eg: ..)",
Error::DepotClient(ref err) => err.description(),
Error::FileNameError => "Failed to extract a filename from a path",
Error::IO(ref err) => err.description(),
Expand Down
Loading

0 comments on commit 2d8456b

Please sign in to comment.