Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 118 additions & 11 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async-bb8-diesel = { git = "https://github.com/oxidecomputer/async-bb8-diesel",
async-trait = "0.1.60"
authz-macros = { path = "nexus/authz-macros" }
backoff = { version = "0.4.0", features = [ "tokio" ] }
base64 = "0.20.0"
base64 = "0.21.0"
bb8 = "0.8.0"
bcs = "0.1.4"
bincode = "1.3.3"
Expand Down Expand Up @@ -185,7 +185,7 @@ pretty-hex = "0.3.0"
proc-macro2 = "1.0"
progenitor = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
progenitor-client = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "666ded451b13bba0895485c0b34515c0e59c2c6e", features = [ "generated-migration" ] }
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "92508d573529a1ee50a9422fbca045a5e980a2b5", features = [ "generated-migration" ] }
proptest = "1.0.0"
quote = "1.0"
rand = "0.8.5"
Expand Down
9 changes: 7 additions & 2 deletions end-to-end-tests/src/instance_launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,13 @@ async fn instance_launch() -> Result<()> {
.and_then(|line| line.split_whitespace().nth(1))
.context("failed to get SSH host key from serial console")?;
eprintln!("host key: ssh-ed25519 {}", host_key);
let host_key =
PublicKey::parse(b"ssh-ed25519", &base64::decode(host_key)?)?;
let host_key = PublicKey::parse(
b"ssh-ed25519",
&base64::Engine::decode(
&base64::engine::general_purpose::STANDARD,
host_key,
)?,
)?;

eprintln!("connecting ssh");
let mut session = russh::client::connect(
Expand Down
3 changes: 2 additions & 1 deletion nexus/src/app/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,8 @@ impl super::Nexus {
external_ips,
firewall_rules,
disks: disk_reqs,
cloud_init_bytes: Some(base64::encode(
cloud_init_bytes: Some(base64::Engine::encode(
&base64::engine::general_purpose::STANDARD,
db_instance.generate_cidata(&public_keys)?,
)),
};
Expand Down
19 changes: 11 additions & 8 deletions nexus/src/app/sagas/disk_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,17 @@ async fn sdc_regions_ensure(
flush_timeout: None,

// all downstairs will expect encrypted blocks
key: Some(base64::encode({
// TODO the current encryption key
// requirement is 32 bytes, what if that
// changes?
let mut random_bytes: [u8; 32] = [0; 32];
rng.fill_bytes(&mut random_bytes);
random_bytes
})),
key: Some(base64::Engine::encode(
&base64::engine::general_purpose::STANDARD,
{
// TODO the current encryption key
// requirement is 32 bytes, what if that
// changes?
let mut random_bytes: [u8; 32] = [0; 32];
rng.fill_bytes(&mut random_bytes);
random_bytes
},
)),

// TODO TLS, which requires sending X509 stuff during
// downstairs region allocation too.
Expand Down
19 changes: 11 additions & 8 deletions nexus/src/app/sagas/snapshot_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,17 @@ async fn ssc_regions_ensure(
flush_timeout: None,

// all downstairs will expect encrypted blocks
key: Some(base64::encode({
// TODO the current encryption key
// requirement is 32 bytes, what if that
// changes?
let mut random_bytes: [u8; 32] = [0; 32];
rng.fill_bytes(&mut random_bytes);
random_bytes
})),
key: Some(base64::Engine::encode(
&base64::engine::general_purpose::STANDARD,
{
// TODO the current encryption key
// requirement is 32 bytes, what if that
// changes?
let mut random_bytes: [u8; 32] = [0; 32];
rng.fill_bytes(&mut random_bytes);
random_bytes
},
)),

// TODO TLS, which requires sending X509 stuff during
// downstairs region allocation too.
Expand Down
Loading