otp-challenger
Enable agents and skills to challenge users for fresh two-factor authentication proof (TOTP or YubiKey) before executing sensitive actions. Use this for identity verification in approval workflows - deploy commands, financial operations, data access, admin operations, and change control.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- otp-challenger
- version
- 1.0.3
- metadata
- { "openclaw": { "emoji": "?", "install": [ { "id": "jq", "os": [ "darwin", "linux" ], "bins": [ "jq" ], "kind": "brew", "label": "Install jq via Homebrew", "formula": "jq" }, { "id": "python3", "os": [ "darwin", "linux" ], "bins": [ "python3" ], "kind": "brew", "label": "Install Python 3 via Homebrew", "formula": "python3" }, { "id": "oathtool", "os": [ "darwin", "linux" ], "bins": [ "oathtool" ], "kind": "brew", "label": "Install OATH Toolkit via Homebrew", "formula": "oath-toolkit" } ], "homepage": "https://github.com/ryancnelson/otp-challenger", "requires": { "bins": [ "jq", "python3" ], "anyBins": [ "oathtool", "node" ] } } }
- description
- Enable agents and skills to challenge users for fresh two-factor authentication proof (TOTP or YubiKey) before executing sensitive actions. Use this for identity verification in approval workflows - deploy commands, financial operations, data access, admin operations, and change control.
02 资源文件 17
- 参考文档_meta.json815 B
- 脚本check-status.sh2.6 KB
- 参考文档docs/implementation-plans/2025-01-31-yubikey-support/phase_01.md16.0 KB
- 参考文档docs/implementation-plans/2025-01-31-yubikey-support/phase_02.md12.4 KB
- 参考文档docs/implementation-plans/2025-01-31-yubikey-support/phase_03.md8.5 KB
- 参考文档docs/plans/2025-01-31-yubikey-support-design.md4.2 KB
- 脚本examples/openclaw/cron-expire.sh533 B
- 脚本examples/openclaw/interceptor.sh1.0 KB
- 参考文档examples/openclaw/README.md937 B
- 脚本generate-secret.sh2.0 KB
- 脚本get-current-code.sh1.2 KB
- 参考文档otp-skill-summary.md8.9 KB
- 脚本prepare-otp-challenger-for-update-and-upload.sh922 B
- 参考文档README.md13.2 KB
- 脚本tests/openclaw_interceptor.test.sh2.4 KB
- 脚本totp.mjs3.7 KB
- 脚本verify.sh14.2 KB
03 SKILL.md 正文
OTP Identity Challenge Skill
Challenge users for fresh two-factor authentication before sensitive actions.
When to Use
Require OTP verification before:
- Deploy commands (
kubectl apply,terraform apply) - Financial operations (transfers, payment approvals)
- Data access (PII exports, customer data)
- Admin operations (user modifications, permission changes)
Scripts
verify.sh
Verify a user's OTP code and record verification state.
./verify.sh <user_id> <code>
Parameters:
user_id- Identifier for the user (e.g., email, username)code- Either 6-digit TOTP or 44-character YubiKey OTP
Exit codes:
0- Verification successful1- Invalid code or rate limited2- Configuration error (missing secret, invalid format)
Output on success:
✅ OTP verified for <user_id> (valid for 24 hours)
✅ YubiKey verified for <user_id> (valid for 24 hours)
Output on failure:
❌ Invalid OTP code
❌ Too many attempts. Try again in X minutes.
❌ Invalid code format. Expected 6-digit TOTP or 44-character YubiKey OTP.
check-status.sh
Check if a user's verification is still valid.
./check-status.sh <user_id>
Exit codes:
0- User has valid (non-expired) verification1- User not verified or verification expired
Output:
✅ Valid for 23 more hours
⚠️ Expired 2 hours ago
❌ Never verified
generate-secret.sh
Generate a new TOTP secret with QR code (requires qrencode to be installed).
./generate-secret.sh <account_name>
Usage Pattern
#!/bin/bash
source ../otp/verify.sh
if ! verify_otp "$USER_ID" "$OTP_CODE"; then
echo "? This action requires OTP verification"
exit 1
fi
# Proceed with sensitive action
Configuration
Required for TOTP:
OTP_SECRET- Base32 TOTP secret
Required for YubiKey:
YUBIKEY_CLIENT_ID- Yubico API client IDYUBIKEY_SECRET_KEY- Yubico API secret key (base64)
Optional:
OTP_INTERVAL_HOURS- Verification expiry (default: 24)OTP_MAX_FAILURES- Failed attempts before rate limiting (default: 3)OTP_STATE_FILE- State file path (default:memory/otp-state.json)
Configuration can be set via environment variables or in ~/.openclaw/config.yaml:
security:
otp:
secret: "BASE32_SECRET"
yubikey:
clientId: "12345"
secretKey: "base64secret"
Code Format Detection
The script auto-detects code type:
- 6 digits (
123456) → TOTP validation - 44 ModHex characters (
cccccc...) → YubiKey validation
ModHex alphabet: cbdefghijklnrtuv
State File
Verification state stored in memory/otp-state.json. Contains only timestamps, no secrets.
Human Documentation
See README.md for:
- Installation instructions
- Setup guides (TOTP and YubiKey)
- Security considerations
- Troubleshooting
- Examples
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.