From 358efab8567af18d5d2bf4bf228f9d5d985f0113 Mon Sep 17 00:00:00 2001 From: Matthew Geddes Date: Thu, 15 Aug 2024 12:07:32 -0700 Subject: [PATCH 1/2] Updated for V3 config support --- Cargo.lock | 4 ++-- client/Cargo.toml | 4 ++-- client/src/main.rs | 12 ++++++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6ae973..6b76ef5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1983,7 +1983,7 @@ dependencies = [ [[package]] name = "hpos-config-core" version = "0.2.1" -source = "git+https://github.com/Holo-Host/hpos-config?rev=6125ac11e83c618746d181faceb4ec5f981bce9f#6125ac11e83c618746d181faceb4ec5f981bce9f" +source = "git+https://github.com/Holo-Host/hpos-config?rev=c17067b6a4214f9646316fa681651b73c72bf7e1#c17067b6a4214f9646316fa681651b73c72bf7e1" dependencies = [ "argon2min", "arrayref", @@ -2001,7 +2001,7 @@ dependencies = [ [[package]] name = "hpos-config-seed-bundle-explorer" version = "0.2.1" -source = "git+https://github.com/Holo-Host/hpos-config?rev=6125ac11e83c618746d181faceb4ec5f981bce9f#6125ac11e83c618746d181faceb4ec5f981bce9f" +source = "git+https://github.com/Holo-Host/hpos-config?rev=c17067b6a4214f9646316fa681651b73c72bf7e1#c17067b6a4214f9646316fa681651b73c72bf7e1" dependencies = [ "base36", "base64 0.13.1", diff --git a/client/Cargo.toml b/client/Cargo.toml index 786530e..dc109bb 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -21,8 +21,8 @@ holochain_types = "0.3.2" [dependencies.hpos-config-core] git = "https://github.com/Holo-Host/hpos-config" -rev = "6125ac11e83c618746d181faceb4ec5f981bce9f" +rev = "c17067b6a4214f9646316fa681651b73c72bf7e1" [dependencies.hpos-config-seed-bundle-explorer] git = "https://github.com/Holo-Host/hpos-config" -rev = "6125ac11e83c618746d181faceb4ec5f981bce9f" \ No newline at end of file +rev = "c17067b6a4214f9646316fa681651b73c72bf7e1" diff --git a/client/src/main.rs b/client/src/main.rs index 00c9b27..e3392af 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -117,7 +117,7 @@ struct ZTPayload { async fn try_zerotier_auth(config: &Config, holochain_public_key: VerifyingKey) -> Fallible<()> { match config { - Config::V2 { settings, .. } => { + Config::V3 { settings, .. } | Config::V2 { settings, .. } => { let zerotier_identity = Identity::read_default()?; let data = ZTData { @@ -210,7 +210,12 @@ async fn try_registration_auth( holochain_public_key: VerifyingKey, ) -> Fallible<()> { match config { - Config::V2 { + Config::V3 { + registration_code, + settings, + .. + } + | Config::V2 { registration_code, settings, .. @@ -245,8 +250,7 @@ async fn try_registration_auth( } } } - // todo: update to use v3 soon - Config::V3 { settings, .. } | Config::V1 { settings, .. } => { + Config::V1 { settings, .. } => { send_failure_email( settings.admin.email.clone(), AuthError::ConfigVersionError.to_string(), From d49e78243b61be693979839f99dd9a7b96ed398e Mon Sep 17 00:00:00 2001 From: Matthew Geddes Date: Mon, 19 Aug 2024 11:14:24 -0700 Subject: [PATCH 2/2] Bumped hpos-config hash --- Cargo.lock | 4 ++-- client/Cargo.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b76ef5..75c828f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1983,7 +1983,7 @@ dependencies = [ [[package]] name = "hpos-config-core" version = "0.2.1" -source = "git+https://github.com/Holo-Host/hpos-config?rev=c17067b6a4214f9646316fa681651b73c72bf7e1#c17067b6a4214f9646316fa681651b73c72bf7e1" +source = "git+https://github.com/Holo-Host/hpos-config?rev=86411bdaabe7061a4b150d36c062fddc2c6c74cc#86411bdaabe7061a4b150d36c062fddc2c6c74cc" dependencies = [ "argon2min", "arrayref", @@ -2001,7 +2001,7 @@ dependencies = [ [[package]] name = "hpos-config-seed-bundle-explorer" version = "0.2.1" -source = "git+https://github.com/Holo-Host/hpos-config?rev=c17067b6a4214f9646316fa681651b73c72bf7e1#c17067b6a4214f9646316fa681651b73c72bf7e1" +source = "git+https://github.com/Holo-Host/hpos-config?rev=86411bdaabe7061a4b150d36c062fddc2c6c74cc#86411bdaabe7061a4b150d36c062fddc2c6c74cc" dependencies = [ "base36", "base64 0.13.1", diff --git a/client/Cargo.toml b/client/Cargo.toml index dc109bb..b48ca81 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -21,8 +21,8 @@ holochain_types = "0.3.2" [dependencies.hpos-config-core] git = "https://github.com/Holo-Host/hpos-config" -rev = "c17067b6a4214f9646316fa681651b73c72bf7e1" +rev = "86411bdaabe7061a4b150d36c062fddc2c6c74cc" [dependencies.hpos-config-seed-bundle-explorer] git = "https://github.com/Holo-Host/hpos-config" -rev = "c17067b6a4214f9646316fa681651b73c72bf7e1" +rev = "86411bdaabe7061a4b150d36c062fddc2c6c74cc"