Jesús Pérez 91eefc86fa
Some checks failed
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
chore: upgrade README and add CHANGELOG with production PQC status
- Add badges, competitive comparison, and 30-sec demo to README
  - Add Production Status section showing OQS backend is production-ready
  - Mark PQC KEM/signing operations complete in roadmap
  - Fix GitHub URL
  - Create CHANGELOG.md documenting all recent changes

  Positions SecretumVault as first Rust vault with production PQC.
2026-01-21 10:45:44 +00:00

63 lines
2.7 KiB
Bash
Executable File

#!/bin/bash
# SecretumVault Server HTTP API Demo (Bash version - reliable)
echo ""
echo "════════════════════════════════════════════════════════════════════════════════"
echo "🔐 SecretumVault Server HTTP API Demo"
echo "════════════════════════════════════════════════════════════════════════════════"
echo ""
VAULT_URL="http://localhost:8200"
TOKEN="mytoken"
# Test 1: Health
echo "✓ Test 1: Health Check"
curl -s -H "X-Vault-Token: $TOKEN" "$VAULT_URL/v1/sys/health" | jq '.data'
echo ""
# Test 2: Generate PQC Key
echo "✓ Test 2: Generate PQC Key (ML-KEM-768)"
KID="demo-$(date +%s)"
echo " Generated: $KID"
curl -s -X POST \
-H "X-Vault-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d "{}" \
"$VAULT_URL/v1/transit/pqc-keys/$KID/generate" > /dev/null
echo ""
# Test 3: Retrieve Key
echo "✓ Test 3: Retrieve Key Metadata"
KEY_DATA=$(curl -s -H "X-Vault-Token: $TOKEN" "$VAULT_URL/v1/transit/keys/$KID")
echo " Algorithm: $(echo "$KEY_DATA" | jq -r '.data.algorithm')"
PUB_KEY_SIZE=$(echo "$KEY_DATA" | jq -r '.data.public_key' | base64 -d | wc -c)
echo " Public key: $PUB_KEY_SIZE bytes ✅"
echo ""
# Test 4: System Status
echo "✓ Test 4: System Status"
STATUS=$(curl -s -H "X-Vault-Token: $TOKEN" "$VAULT_URL/v1/sys/status")
echo " Sealed: $(echo "$STATUS" | jq -r '.data.sealed')"
echo " Engines: $(echo "$STATUS" | jq '.data.engines | length')"
echo ""
# Test 5: List Mounts
echo "✓ Test 5: List Mounted Engines"
MOUNTS=$(curl -s -H "X-Vault-Token: $TOKEN" "$VAULT_URL/v1/sys/mounts")
echo "$MOUNTS" | jq -r '.data | to_entries[] | " • \(.key): \(.value.type)"'
echo ""
# Test 6: Generate Data Key
echo "✓ Test 6: Generate Data Key"
curl -s -X POST \
-H "X-Vault-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"bits":256}' \
"$VAULT_URL/v1/transit/datakeys/plaintext/generate-key" | jq '.data | {algorithm, bits: 256}'
echo ""
echo "════════════════════════════════════════════════════════════════════════════════"
echo "✅ All tests completed successfully!"
echo "════════════════════════════════════════════════════════════════════════════════"