mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-03 09:35:41 +00:00
feat(credential): enforce signed credential distribution across mixed admin/shared topology (#1972)
This commit is contained in:
@@ -254,6 +254,11 @@ impl CredentialManageRpc for PeerManagerRpcService {
|
||||
) -> Result<RevokeCredentialResponse, rpc_types::error::Error> {
|
||||
let pm = weak_upgrade(&self.peer_manager)?;
|
||||
let global_ctx = pm.get_global_ctx();
|
||||
if global_ctx.get_network_identity().network_secret.is_none() {
|
||||
return Err(rpc_types::error::Error::ExecutionError(anyhow::anyhow!(
|
||||
"only admin nodes (with network_secret) can revoke credentials"
|
||||
)));
|
||||
}
|
||||
|
||||
let success = global_ctx
|
||||
.get_credential_manager()
|
||||
|
||||
Reference in New Issue
Block a user