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

Bump rustls from 0.20 to 0.21, bump actix-web to 4.4 #532

Merged
merged 2 commits into from
Sep 2, 2023
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
80 changes: 50 additions & 30 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 apiserver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ server = []
models = { path = "../models", version = "0.1.0" }

# tracing-actix-web version must align with actix-web version
actix-web = { version = "4", features = ["rustls"] }
actix-web = { version = "4.4", features = ["rustls-0_21"] }
awc = "3"
actix-web-opentelemetry = { version = "0.13", features = ["metrics", "metrics-prometheus"] }
rustls = { version = "0.20" }
rustls = { version = "0.21" }
rustls-pemfile = { version = "1" }
webpki = { version = "0.22.0", features = ["std"] }
opentelemetry = { version = "0.18", features = ["rt-tokio-current-thread"]}
Expand Down
2 changes: 1 addition & 1 deletion apiserver/src/api/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub enum Error {
CertExtract { path: String, source: io::Error },

#[snafu(display("Failed to add CA to cert store: {}", source))]
CertStore { source: webpki::Error },
CertStore { source: rustls::Error },

#[snafu(display("Failed to build TLS config from loaded certs: {}", source))]
TLSConfigBuild { source: rustls::Error },
Expand Down
6 changes: 3 additions & 3 deletions apiserver/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use rustls::{
};
use rustls_pemfile::{certs, pkcs8_private_keys};
use snafu::{OptionExt, ResultExt};
use std::{env, fs::File, io::BufReader};
use std::{env, fs::File, io::BufReader, sync::Arc};
use tokio::time::{sleep, Duration};
use tracing::{event, Level};
use tracing_actix_web::TracingLogger;
Expand Down Expand Up @@ -216,7 +216,7 @@ pub async fn run_server<T: 'static + BottlerocketShadowClient>(
cert_store.add(&ca).context(error::CertStoreSnafu)?;
}

let verifier = AllowAnyAnonymousOrAuthenticatedClient::new(cert_store);
let verifier = Arc::new(AllowAnyAnonymousOrAuthenticatedClient::new(cert_store));

let tls_config_builder = ServerConfig::builder()
.with_safe_defaults()
Expand Down Expand Up @@ -276,7 +276,7 @@ pub async fn run_server<T: 'static + BottlerocketShadowClient>(
web::get().to(ping::health_check),
)
})
.bind_rustls(server_addr, tls_config)
.bind_rustls_021(server_addr, tls_config)
.context(error::HttpServerSnafu)?
.run();

Expand Down
1 change: 0 additions & 1 deletion clarify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,4 @@ license-files = [
expression = "ISC"
license-files = [
{ path = "LICENSE", hash = 0x001c7e6c },
{ path = "third-party/chromium/LICENSE", hash = 0x9b209a1a },
]
12 changes: 7 additions & 5 deletions models/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ mod drain;

pub use self::client::client_error::Error as BottlerocketShadowClientError;
pub use self::client::*;
pub use self::crd::*;
pub use self::error::Error as BottlerocketShadowError;

/// The module-wide result type.
type Result<T> = std::result::Result<T, error::Error>;
// pub use self::crd::*;
pub use self::crd::{
brs_name_from_node_name, combined_crds, error, v1, v2, BottlerocketShadow,
BottlerocketShadowResource, BottlerocketShadowSelector, BottlerocketShadowSpec,
BottlerocketShadowState, BottlerocketShadowStatus, Result, Selector,
};
pub use crd::error::Error as BottlerocketShadowError;

use lazy_static::lazy_static;
pub use semver::Version;
Expand Down