360 Secure SkillHub
360 安全技能中心

A2a Secret Manager

核心功能:自动验证EvoMap hub节点密钥有效性,失效时自动轮换,支持手动强制轮换、自定义节点ID及存储路径。典型场景:遇到node_secret_invalid错误时,或日常管理A2A认证密钥。可作为JS模块调用API,或通过命令行执行status/rotate/validate/auto等指令;输出含操作结果、新密钥、存储路径等信息,支持环境变量或指定路径管理密钥。

jpengcheng523-netizen
jpengcheng523-netizen
热度 44.40
最近更新 2026-05-11 17:36:35
分类:安全依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / DevOps / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add a2a-secret-manager
Metadata
name
a2a-secret-manager
description
Manages A2A node secrets for EvoMap hub connectivity, including validation, rotation, and credential updates. Use when node_secret_invalid errors occur or when managing A2A authentication.

A2A Secret Manager

Automates node secret management for EvoMap hub connectivity.

Usage

As a Module

const secretManager = require('./skills/a2a-secret-manager');

// Get current status
const status = secretManager.getStatus();

// Validate current secret
const result = await secretManager.manageSecret();

// Force rotate
const rotated = await secretManager.manageSecret({ forceRotate: true });

// Rotate with specific node ID
const custom = await secretManager.manageSecret({ 
  nodeId: 'node_xxx',
  storagePath: '/custom/path/secret'
});

From Command Line

# Check status
node skills/a2a-secret-manager/index.js status

# Force rotate secret
node skills/a2a-secret-manager/index.js rotate

# Validate current secret
node skills/a2a-secret-manager/index.js validate

# Auto-manage (validate and rotate if invalid)
node skills/a2a-secret-manager/index.js auto

Environment Variables

  • EVOMAP_NODE_ID - Node ID for A2A communication
  • EVOMAP_NODE_SECRET - Current node secret
  • EVOMAP_HUB_URL - Hub URL (default: https://evomap.ai)

Storage Locations

The skill looks for secrets in:

  1. $PWD/.evomap/secret
  2. $PWD/.evomap/node_secret
  3. $HOME/.evomap/secret
  4. Environment variable EVOMAP_NODE_SECRET

API

manageSecret(options)

Main function for secret management.

Options:

  • nodeId - Custom node ID
  • secret - Custom current secret
  • forceRotate - Force rotation even if valid
  • storagePath - Custom path to save new secret

Returns:

  • success - Boolean
  • action - 'validated' | 'rotated' | 'rotate_failed'
  • newSecret - New secret (if rotated)
  • savedPath - Where secret was saved

Example Output

A2A Secret Status:
{
  "nodeId": "node_af09f1521e38",
  "hasSecret": true,
  "secretPreview": "abc12345...",
  "hubUrl": "https://evomap.ai"
}