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

Fixes #16260: Unsigned inventories must not be accepted anymore in 6.0 #2628

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -173,6 +173,10 @@ class InventoryProcessor(
}
}

/*
* This method used to allow acceptation of nodes without signature. We will remove it in a futur
* minor of Rudder 6.0 if nothing blocking is found with mandatory signatures in all cases.
*/
def saveNoSignature(report: InventoryReport, keyStatus: KeyStatus): IOResult[InventoryProcessStatus] = {
// Check if we need a signature or not
(keyStatus match {
Expand Down Expand Up @@ -230,7 +234,8 @@ class InventoryProcessor(

// There is no Signature
case None =>
saveNoSignature(report, secPair._2).chainError(s"Error when trying to check inventory key status for Node '${nodeId.value}'")
Inconsistancy(s"Error, inventory '${report.node}' has no signature, which is not supported anymore in Rudder 6.0. " +
s"Please check that your node's agent is compatible with that version.").fail
}
_ <- InventoryProcessingLogger.debug(s"Inventory '${report.name}' for node '${report.node.main.id.value}' pre-processed in ${PeriodFormat.getDefault.print(new Duration(start, System.currentTimeMillis).toPeriod)} ms")
} yield {
Expand Down