Skip to content

Commit

Permalink
chore(rust): hidden TLS inlets parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-baldo committed Sep 9, 2024
1 parent b1a3b78 commit 931e9f4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub struct TicketCommand {
enroller: bool,

/// Allows the access to the TLS certificate of the Project, this flag is transformed into the attributes `--attribute ockam-tls-certificate=true`
#[arg(long = "tls")]
#[arg(long = "tls", hide = true)]
tls: bool,

#[command(flatten)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ pub struct CreateCommand {
)]
pub no_tcp_fallback: bool,

#[arg(long, value_name = "BOOL", default_value_t = false)]
#[arg(long, value_name = "BOOL", default_value_t = false, hide = true)]
/// Enable TLS for the TCP Inlet.
/// Uses the default project TLS certificate provider, `/project/default/service/tls_certificate_provider`.
/// To specify a different certificate provider, use `--tls-certificate-provider`.
/// Requires `ockam-tls-certificate` credential attribute.
pub tls: bool,

#[arg(long, value_name = "ROUTE")]
#[arg(long, value_name = "ROUTE", hide = true)]
/// Enable TLS for the TCP Inlet using the provided certificate provider.
/// Requires `ockam-tls-certificate` credential attribute.
pub tls_certificate_provider: Option<MultiAddr>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,14 @@ teardown() {
kill -QUIT $socat_pid
}

@test "portals - create a local TLS inlet, https works without skipping verification" {
port="$(random_port)"

run_success "$OCKAM" node create blue
run_success "$OCKAM" tcp-outlet create --at /node/blue --to 127.0.0.1:$PYTHON_SERVER_PORT
run_success "$OCKAM" tcp-inlet create --tls --from $port --to /secure/api/service/outlet

project_id="$(jq -r .id $PROJECT_PATH)"
run_success curl -sfI --retry-connrefused --retry-delay 5 --retry 10 -m 5 "https://${project_id}.ockam.network:${port}"
}
# TODO: uncomment once TLS inlets are ready to be used
#@test "portals - create a local TLS inlet, https works without skipping verification" {
# port="$(random_port)"
#
# run_success "$OCKAM" node create blue
# run_success "$OCKAM" tcp-outlet create --at /node/blue --to 127.0.0.1:$PYTHON_SERVER_PORT
# run_success "$OCKAM" tcp-inlet create --tls --from $port --to /secure/api/service/outlet
#
# project_id="$(jq -r .id $PROJECT_PATH)"
# run_success curl -sfI --retry-connrefused --retry-delay 5 --retry 10 -m 5 "https://${project_id}.ockam.network:${port}"
#}

0 comments on commit 931e9f4

Please sign in to comment.