mirror of https://github.com/istio/ztunnel.git
Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
|
d4e543a299 | |
|
67fe8764d1 | |
|
c5c31102fd | |
|
ddd676893f | |
|
2f601957bd | |
|
0d440ba3fe | |
|
68b5e48a1f |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "istio build-tools",
|
||||
"image": "gcr.io/istio-testing/build-tools:master-fcd42145fc132acd1e8f607e9e7aca15058e9fb9",
|
||||
"image": "gcr.io/istio-testing/build-tools:release-1.26-70fd8a76e8fc5feb19b8499f0fafb75f97325aee",
|
||||
"privileged": true,
|
||||
"remoteEnv": {
|
||||
"USE_GKE_GCLOUD_AUTH_PLUGIN": "True",
|
||||
|
|
|
@ -1,6 +1 @@
|
|||
* @istio/wg-networking-maintainers-ztunnel
|
||||
/Makefile* @istio/wg-test-and-release-maintainers
|
||||
/*.md @istio/wg-test-and-release-maintainers
|
||||
/common/ @istio/wg-test-and-release-maintainers
|
||||
/common-protos/ @istio/wg-test-and-release-maintainers
|
||||
/scripts/ @istio/wg-test-and-release-maintainers
|
||||
* @istio/release-managers-1-26
|
||||
|
|
|
@ -112,29 +112,13 @@ version = "0.7.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
|
||||
|
||||
[[package]]
|
||||
name = "asn1-rs"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048"
|
||||
dependencies = [
|
||||
"asn1-rs-derive 0.5.1",
|
||||
"asn1-rs-impl",
|
||||
"displaydoc",
|
||||
"nom",
|
||||
"num-traits",
|
||||
"rusticata-macros",
|
||||
"thiserror 1.0.69",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "asn1-rs"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60"
|
||||
dependencies = [
|
||||
"asn1-rs-derive 0.6.0",
|
||||
"asn1-rs-derive",
|
||||
"asn1-rs-impl",
|
||||
"displaydoc",
|
||||
"nom",
|
||||
|
@ -144,18 +128,6 @@ dependencies = [
|
|||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "asn1-rs-derive"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "asn1-rs-derive"
|
||||
version = "0.6.0"
|
||||
|
@ -761,27 +733,13 @@ dependencies = [
|
|||
"const-oid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "der-parser"
|
||||
version = "9.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553"
|
||||
dependencies = [
|
||||
"asn1-rs 0.6.2",
|
||||
"displaydoc",
|
||||
"nom",
|
||||
"num-bigint",
|
||||
"num-traits",
|
||||
"rusticata-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "der-parser"
|
||||
version = "10.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6"
|
||||
dependencies = [
|
||||
"asn1-rs 0.7.1",
|
||||
"asn1-rs",
|
||||
"displaydoc",
|
||||
"nom",
|
||||
"num-bigint",
|
||||
|
@ -1844,7 +1802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.52.6",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2226,22 +2184,13 @@ dependencies = [
|
|||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oid-registry"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9"
|
||||
dependencies = [
|
||||
"asn1-rs 0.6.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oid-registry"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7"
|
||||
dependencies = [
|
||||
"asn1-rs 0.7.1",
|
||||
"asn1-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2815,16 +2764,16 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rcgen"
|
||||
version = "0.13.2"
|
||||
version = "0.13.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2"
|
||||
checksum = "887a643fa081058097896d87764863994f6c32a1716e76adc479bd283974a825"
|
||||
dependencies = [
|
||||
"aws-lc-rs",
|
||||
"pem",
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
"time",
|
||||
"x509-parser 0.16.0",
|
||||
"x509-parser",
|
||||
"yasna",
|
||||
]
|
||||
|
||||
|
@ -4305,36 +4254,18 @@ version = "0.5.5"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
|
||||
|
||||
[[package]]
|
||||
name = "x509-parser"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69"
|
||||
dependencies = [
|
||||
"asn1-rs 0.6.2",
|
||||
"data-encoding",
|
||||
"der-parser 9.0.0",
|
||||
"lazy_static",
|
||||
"nom",
|
||||
"oid-registry 0.7.1",
|
||||
"ring",
|
||||
"rusticata-macros",
|
||||
"thiserror 1.0.69",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x509-parser"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4569f339c0c402346d4a75a9e39cf8dad310e287eef1ff56d4c68e5067f53460"
|
||||
dependencies = [
|
||||
"asn1-rs 0.7.1",
|
||||
"asn1-rs",
|
||||
"data-encoding",
|
||||
"der-parser 10.0.0",
|
||||
"der-parser",
|
||||
"lazy_static",
|
||||
"nom",
|
||||
"oid-registry 0.8.1",
|
||||
"oid-registry",
|
||||
"ring",
|
||||
"rusticata-macros",
|
||||
"thiserror 2.0.12",
|
||||
|
@ -4510,7 +4441,7 @@ dependencies = [
|
|||
"matches",
|
||||
"netns-rs",
|
||||
"nix 0.29.0",
|
||||
"oid-registry 0.8.1",
|
||||
"oid-registry",
|
||||
"once_cell",
|
||||
"openssl",
|
||||
"pin-project-lite",
|
||||
|
@ -4553,6 +4484,6 @@ dependencies = [
|
|||
"tracing-log",
|
||||
"tracing-subscriber",
|
||||
"url",
|
||||
"x509-parser 0.17.0",
|
||||
"x509-parser",
|
||||
"ztunnel",
|
||||
]
|
||||
|
|
|
@ -1 +1 @@
|
|||
a1d5c4198ab79a14c09c034f2d95245efa3e2bcb
|
||||
53d979131718316e26b55212a3cef935a8c0f4e8
|
||||
|
|
|
@ -92,7 +92,7 @@ mirror-licenses: mod-download-go
|
|||
@license-lint --mirror
|
||||
|
||||
TMP := $(shell mktemp -d -u)
|
||||
UPDATE_BRANCH ?= "master"
|
||||
UPDATE_BRANCH ?= "release-1.26"
|
||||
|
||||
BUILD_TOOLS_ORG ?= "istio"
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ set -x
|
|||
####################################################################
|
||||
|
||||
# DEFAULT_KIND_IMAGE is used to set the Kubernetes version for KinD unless overridden in params to setup_kind_cluster(s)
|
||||
DEFAULT_KIND_IMAGE="gcr.io/istio-testing/kind-node:v1.32.0"
|
||||
DEFAULT_KIND_IMAGE="gcr.io/istio-testing/kind-node:v1.33.1"
|
||||
|
||||
# the default kind cluster should be ipv4 if not otherwise specified
|
||||
KIND_IP_FAMILY="${KIND_IP_FAMILY:-ipv4}"
|
||||
|
|
|
@ -75,7 +75,7 @@ fi
|
|||
TOOLS_REGISTRY_PROVIDER=${TOOLS_REGISTRY_PROVIDER:-gcr.io}
|
||||
PROJECT_ID=${PROJECT_ID:-istio-testing}
|
||||
if [[ "${IMAGE_VERSION:-}" == "" ]]; then
|
||||
IMAGE_VERSION=master-fcd42145fc132acd1e8f607e9e7aca15058e9fb9
|
||||
IMAGE_VERSION=release-1.26-70fd8a76e8fc5feb19b8499f0fafb75f97325aee
|
||||
fi
|
||||
if [[ "${IMAGE_NAME:-}" == "" ]]; then
|
||||
IMAGE_NAME=build-tools
|
||||
|
|
|
@ -70,6 +70,10 @@ const ENABLE_ORIG_SRC: &str = "ENABLE_ORIG_SRC";
|
|||
const PROXY_CONFIG: &str = "PROXY_CONFIG";
|
||||
const IPV6_ENABLED: &str = "IPV6_ENABLED";
|
||||
|
||||
const HTTP2_STREAM_WINDOW_SIZE: &str = "HTTP2_STREAM_WINDOW_SIZE";
|
||||
const HTTP2_CONNECTION_WINDOW_SIZE: &str = "HTTP2_CONNECTION_WINDOW_SIZE";
|
||||
const HTTP2_FRAME_SIZE: &str = "HTTP2_FRAME_SIZE";
|
||||
|
||||
const UNSTABLE_ENABLE_SOCKS5: &str = "UNSTABLE_ENABLE_SOCKS5";
|
||||
|
||||
const DEFAULT_WORKER_THREADS: u16 = 2;
|
||||
|
@ -619,9 +623,15 @@ pub fn construct_config(pc: ProxyConfig) -> Result<Config, Error> {
|
|||
DEFAULT_POOL_UNUSED_RELEASE_TIMEOUT,
|
||||
)?,
|
||||
|
||||
window_size: 4 * 1024 * 1024,
|
||||
connection_window_size: 4 * 1024 * 1024,
|
||||
frame_size: 1024 * 1024,
|
||||
// window size: per-stream limit
|
||||
window_size: parse_default(HTTP2_STREAM_WINDOW_SIZE, 4 * 1024 * 1024)?,
|
||||
// connection window size: per connection.
|
||||
// Setting this to the same value as window_size can introduce deadlocks in some applications
|
||||
// where clients do not read data on streamA until they receive data on streamB.
|
||||
// If streamA consumes the entire connection window, we enter a deadlock.
|
||||
// A 4x limit should be appropriate without introducing too much potential buffering.
|
||||
connection_window_size: parse_default(HTTP2_CONNECTION_WINDOW_SIZE, 16 * 1024 * 1024)?,
|
||||
frame_size: parse_default(HTTP2_FRAME_SIZE, 1024 * 1024)?,
|
||||
|
||||
self_termination_deadline: match parse_duration(CONNECTION_TERMINATION_DEADLINE)? {
|
||||
Some(period) => period,
|
||||
|
|
|
@ -124,28 +124,44 @@ impl CsrOptions {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::tls;
|
||||
use itertools::Itertools;
|
||||
|
||||
#[test]
|
||||
fn test_csr() {
|
||||
use x509_parser::prelude::FromDer;
|
||||
use x509_parser::prelude::*;
|
||||
let csr = tls::csr::CsrOptions {
|
||||
san: "spiffe://td/ns/ns1/sa/sa1".to_string(),
|
||||
}
|
||||
.generate()
|
||||
.unwrap();
|
||||
|
||||
let (_, der) = x509_parser::pem::parse_x509_pem(csr.csr.as_bytes()).unwrap();
|
||||
|
||||
let (_, cert) =
|
||||
x509_parser::certification_request::X509CertificationRequest::from_der(&der.contents)
|
||||
.unwrap();
|
||||
cert.verify_signature().unwrap();
|
||||
let subject = cert.certification_request_info.subject.iter().collect_vec();
|
||||
assert_eq!(subject.len(), 0);
|
||||
let attr = cert
|
||||
.certification_request_info
|
||||
.iter_attributes()
|
||||
.next()
|
||||
.unwrap();
|
||||
// SAN is encoded in some format I don't understand how to parse; this could be improved.
|
||||
// but make sure it's there in a hacky manner
|
||||
assert!(attr.value.ends_with(b"spiffe://td/ns/ns1/sa/sa1"));
|
||||
|
||||
let ParsedCriAttribute::ExtensionRequest(parsed) = attr.parsed_attribute() else {
|
||||
panic!("not a ExtensionRequest")
|
||||
};
|
||||
let ext = parsed.clone().extensions;
|
||||
assert_eq!(ext.len(), 1);
|
||||
let ext = ext.into_iter().next().unwrap();
|
||||
assert!(ext.critical);
|
||||
let ParsedExtension::SubjectAlternativeName(san) = ext.parsed_extension() else {
|
||||
panic!("not a SubjectAlternativeName")
|
||||
};
|
||||
assert_eq!(
|
||||
&format!("{san:?}"),
|
||||
"SubjectAlternativeName { general_names: [URI(\"spiffe://td/ns/ns1/sa/sa1\")] }"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,8 @@ impl BuildInfo {
|
|||
build_profile: BUILD_RUST_PROFILE.to_string(),
|
||||
build_status: BUILD_STATUS.to_string(),
|
||||
git_tag: BUILD_TAG.to_string(),
|
||||
istio_version: env::var("ISTIO_VERSION").unwrap_or_else(|_| "unknown".to_string()),
|
||||
istio_version: env::var("ISTIO_META_ISTIO_VERSION")
|
||||
.unwrap_or_else(|_| "unknown".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue