Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
amousset committed Aug 5, 2021
1 parent c8cce28 commit 09fc5d5
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 101 deletions.
56 changes: 28 additions & 28 deletions relay/sources/relayd/Cargo.lock

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

2 changes: 1 addition & 1 deletion relay/sources/relayd/src/api/remote_run.rs
Expand Up @@ -286,7 +286,7 @@ impl RemoteRun {
}
};

let response = client
let response = client.client()
.post(&format!(
"https://{}:{}/rudder/relay-api/remote-run/{}",
hostname,
Expand Down
4 changes: 2 additions & 2 deletions relay/sources/relayd/src/api/shared_files.rs
Expand Up @@ -161,7 +161,7 @@ async fn put_forward(
body: Bytes,
) -> Result<StatusCode, Error> {
job_config
.upstream_client
.upstream_client.client()
.clone()
.put(&format!(
"{}/{}/{}",
Expand Down Expand Up @@ -300,7 +300,7 @@ async fn head_forward(
job_config: Arc<JobConfig>,
) -> Result<StatusCode, Error> {
job_config
.upstream_client
.upstream_client.client()
.clone()
.head(&format!(
"{}/{}/{}",
Expand Down
12 changes: 11 additions & 1 deletion relay/sources/relayd/src/configuration/main.rs
Expand Up @@ -121,6 +121,16 @@ impl Configuration {
})
}

pub fn peer_authentication(&self) -> PeerAuthentication {
// compute actual model
if !self.output.upstream.verify_certificates {
warn!("output.upstream.verify_certificates parameter is deprecated, use general.peer_authentication instead");
PeerAuthentication::DangerousNone
} else {
self.general.peer_authentication
}
}

/// Gives current url of the upstream relay API
/// Can be removed once upstream.url is removed
pub fn upstream_url(&self) -> String {
Expand Down Expand Up @@ -175,7 +185,7 @@ pub struct GeneralConfig {
pub https_port: u16,
/// Which certificate validation model to use
#[serde(default = "GeneralConfig::default_peer_authentication")]
pub peer_authentication: PeerAuthentication,
peer_authentication: PeerAuthentication,
}

impl GeneralConfig {
Expand Down

0 comments on commit 09fc5d5

Please sign in to comment.