Refactor shutdown-impl: add parameter to RPC, remove secret validation and masking.