Phase 4 enhancements: WebSocket auth, HTTPS UI, plugin hooks, build fixes
Security:
- Add token-based WebSocket authentication (closes critical security gap)
- In-memory token store with 24h TTL (token_store.py)
- POST /api/auth/token exchanges Basic Auth for WS token
- GET /api/auth/status public endpoint for auth check
- WebSocket validates token query param, rejects with close code 4401
- Frontend LoginPrompt modal for credential entry
- WebSocket manager handles full auth flow with auth_required state
- No-op when AUTH_ENABLED=false (preserves existing behavior)
HTTPS:
- Wire HTTPS toggle in Settings UI (POST /api/system/ssl/toggle)
- Add certificate regeneration button
- Display SSL info (expiration, SANs, SHA256 fingerprint)
Plugins:
- Wire trigger_hook("pm3_command") in PM3 service
- Wire trigger_hook("update_check") in update manager
Build/Infrastructure:
- Enable NetworkManager in pi-gen AP setup stage
- Add HF booster board detection patch for Proxmark3
- Update LED PWM control patch
- Fix BLE adapter, UPS drivers, WiFi manager improvements
- Update HTTPS support stage script
Documentation:
- Update PROJECT_STATUS.md and IMPLEMENTATION_PRIORITIES.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,31 +9,39 @@ YELLOW='\033[1;33m'
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m'
|
||||
|
||||
if ! docker ps --filter name=pigen_work --format "{{.Status}}" &>/dev/null; then
|
||||
echo -e "${RED}Docker not available${NC}"
|
||||
exit 1
|
||||
fi
|
||||
# Find running pigen container (handles pigen_work, pigen_work_cont, etc.)
|
||||
CONTAINER=$(docker ps --filter name=pigen --format "{{.Names}}" | head -1)
|
||||
|
||||
STATUS=$(docker ps --filter name=pigen_work --format "{{.Status}}")
|
||||
|
||||
if [ -z "$STATUS" ]; then
|
||||
if [ -z "$CONTAINER" ]; then
|
||||
# Check for recently exited container
|
||||
CONTAINER=$(docker ps -a --filter name=pigen --format "{{.Names}}" | head -1)
|
||||
if [ -n "$CONTAINER" ]; then
|
||||
STATUS=$(docker ps -a --filter name="$CONTAINER" --format "{{.Status}}")
|
||||
echo -e "${YELLOW}Build finished:${NC} $STATUS"
|
||||
echo ""
|
||||
echo -e "${BLUE}Final steps:${NC}"
|
||||
docker logs --tail 20 "$CONTAINER" 2>&1 | grep -E "^\[.*\] (Begin|End)|Build failed|complete" | tail -10
|
||||
exit 0
|
||||
fi
|
||||
echo -e "${YELLOW}No build running${NC}"
|
||||
echo "Start a build with: ./build-image.sh full"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Build Status:${NC} $STATUS"
|
||||
STATUS=$(docker ps --filter name="$CONTAINER" --format "{{.Status}}")
|
||||
|
||||
echo -e "${GREEN}Build Status:${NC} $STATUS (container: $CONTAINER)"
|
||||
echo ""
|
||||
echo -e "${BLUE}Current Stage:${NC}"
|
||||
docker logs pigen_work 2>&1 | grep -E "^\[.*\] Begin /pi-gen/(stage[^/]+)" | tail -1
|
||||
docker logs "$CONTAINER" 2>&1 | grep -E "^\[.*\] Begin /pi-gen/(stage[^/]+)" | tail -1
|
||||
|
||||
echo ""
|
||||
echo -e "${BLUE}Recent Progress (last 10 steps):${NC}"
|
||||
docker logs pigen_work 2>&1 | grep -E "^\[.*\] (Begin|End)" | tail -10
|
||||
docker logs "$CONTAINER" 2>&1 | grep -E "^\[.*\] (Begin|End)" | tail -10
|
||||
|
||||
echo ""
|
||||
echo -e "${BLUE}Latest Activity:${NC}"
|
||||
docker logs --tail 3 pigen_work 2>&1
|
||||
docker logs --tail 5 "$CONTAINER" 2>&1
|
||||
|
||||
echo ""
|
||||
echo -e "Watch live: ${YELLOW}docker logs -f pigen_work${NC}"
|
||||
echo -e "Watch live: ${YELLOW}docker logs -f $CONTAINER${NC}"
|
||||
|
||||
Reference in New Issue
Block a user