Files
openclaw-workspace-2026/scripts/checks/check-memory-table.sh
T
JC Beasley 6d2105d206 Implement Vault secret cache system
New scripts:
- vault-cache.sh: Main cache manager (sync/get/list/status/invalidate)
- vault-env.sh: Sourceable environment with quick accessor functions
- vault-api-cached.sh: Drop-in replacement for vault_api.sh using cache
- nocodb-api.sh: NocoDB API wrapper using cached token
- qdrant-api.sh: Qdrant API wrapper using cached key
- README-vault-cache.md: Documentation

Updated scripts:
- vault_grist_api.sh: Now uses vault cache
- checks/check-memory-table.sh: Uses vault cache
- utils/get-columns.sh: Uses vault cache
- utils/update-type-col.sh: Uses vault cache

Features:
- 29 secrets cached from Vault (6 categories)
- Auto-refresh on stale entries (1hr TTL)
- Vault token cached for 24h
- Restricted permissions (700/600) on cache files
- Fallback to direct Vault API if cache miss
2026-07-19 08:57:13 -07:00

22 lines
649 B
Bash
Executable File

#!/bin/bash
# check-memory-table.sh - Test NocoDB memory table access
# Uses vault cache for fast token retrieval
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/../vault-env.sh"
NOCODB_TOKEN=$(vault_nocodb_token)
if [ -z "$NOCODB_TOKEN" ]; then
echo "Error: Could not retrieve NocoDB token from vault cache"
echo "Run: ${SCRIPT_DIR}/../vault-cache.sh sync"
exit 1
fi
echo "Token: ${NOCODB_TOKEN:0:20}..."
# Test ai_data_Memory table
echo "=== Test ai_data_Memory table (mx149yctebfwvys) ==="
curl -s "http://192.168.25.5:8080/api/v2/tables/mx149yctebfwvys/records" \
-H "xc-token: $NOCODB_TOKEN"