Public release release-ea887c8f56cd
Source commit: ea887c8f56cd53985a1179b13e5f1b85c485f584 Public tree identity: sha256:b96a97aacdbc8fd4fc2ea20d0e1450280d46db3f24aabe1475e5fbe20e05f255
This commit is contained in:
parent
9223c54939
commit
2a0f7ded04
37 changed files with 3145 additions and 628 deletions
|
|
@ -121,6 +121,8 @@ pub enum CoordinatorRequest {
|
|||
enrollment_grant: String,
|
||||
},
|
||||
NodeHeartbeat {
|
||||
tenant: String,
|
||||
project: String,
|
||||
node: String,
|
||||
#[serde(default)]
|
||||
node_signature: Option<NodeSignedRequest>,
|
||||
|
|
@ -269,6 +271,8 @@ pub enum CoordinatorRequest {
|
|||
restart: bool,
|
||||
},
|
||||
ReconnectNode {
|
||||
tenant: String,
|
||||
project: String,
|
||||
node: String,
|
||||
process: String,
|
||||
epoch: u64,
|
||||
|
|
@ -675,9 +679,12 @@ fn validate_coordinator_request(request: &CoordinatorRequest, path: &str) -> Res
|
|||
validate_external_token(enrollment_grant, &format!("{path}.enrollment_grant"), 512)
|
||||
}
|
||||
CoordinatorRequest::NodeHeartbeat {
|
||||
tenant,
|
||||
project,
|
||||
node,
|
||||
node_signature,
|
||||
} => {
|
||||
validate_tenant_project(tenant, project, path)?;
|
||||
validate_node(node, &format!("{path}.node"))?;
|
||||
if let Some(signature) = node_signature {
|
||||
validate_node_signature(signature, &format!("{path}.node_signature"))?;
|
||||
|
|
@ -846,7 +853,14 @@ fn validate_coordinator_request(request: &CoordinatorRequest, path: &str) -> Res
|
|||
&format!("{path}.launch_attempt"),
|
||||
)
|
||||
}
|
||||
CoordinatorRequest::ReconnectNode { node, process, .. } => {
|
||||
CoordinatorRequest::ReconnectNode {
|
||||
tenant,
|
||||
project,
|
||||
node,
|
||||
process,
|
||||
..
|
||||
} => {
|
||||
validate_tenant_project(tenant, project, path)?;
|
||||
validate_node(node, &format!("{path}.node"))?;
|
||||
validate_process(process, &format!("{path}.process"))
|
||||
}
|
||||
|
|
@ -1567,6 +1581,8 @@ mod external_identifier_tests {
|
|||
restart: false,
|
||||
},
|
||||
CoordinatorRequest::NodeHeartbeat {
|
||||
tenant: "tenant".to_owned(),
|
||||
project: "project".to_owned(),
|
||||
node: "bad node!".to_owned(),
|
||||
node_signature: Some(NodeSignedRequest {
|
||||
nonce: "node-nonce".to_owned(),
|
||||
|
|
@ -1626,6 +1642,8 @@ mod external_identifier_tests {
|
|||
assert!(error.contains("malformed external token request.agent_signature.nonce"));
|
||||
|
||||
let node_request = CoordinatorRequest::NodeHeartbeat {
|
||||
tenant: "tenant".to_owned(),
|
||||
project: "project".to_owned(),
|
||||
node: "node".to_owned(),
|
||||
node_signature: Some(NodeSignedRequest {
|
||||
nonce: String::new(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue