feat(node): dashboard SSE y normalización de atributos REST\n\n- Agrega dashboard web (SSE) en / con historial y eventos en vivo\n- Normaliza formato JSON de rlm_rest y registra eventos\n- Responde Access-Accept con VLAN 2 + WISPr 10/10\n\nfix(radius): corrige URI rlm_rest y acepta en lab\n\n- REST URI fija a http://node:3000 (antes expandía mal)\n- default: Auth-Type := Accept para entorno de pruebas\n- clients: añade localhost y subred 192.168.87.0/24\n\nchore: añade .env para compose

This commit is contained in:
Codex Bot
2025-09-24 14:55:18 -06:00
parent 6ef48911ef
commit d9bdfb3420
6 changed files with 183 additions and 21 deletions

View File

@@ -1,7 +1,12 @@
client unifi {
ipaddr = %{env:RADIUS_CLIENTS_CIDR}
secret = %{env:RADIUS_SHARED_SECRET}
ipaddr = 192.168.87.0/24
secret = tamosbien
require_message_authenticator = no
nastype = other
}
# Cliente local para pruebas con radclient dentro del contenedor
client localhost {
ipaddr = 127.0.0.1
secret = tamosbien
}

View File

@@ -5,7 +5,7 @@ rest {
# Authorize: llama al API Node
authorize {
uri = "%{env:REST_ENDPOINT:-http://node:3000}/authorize"
uri = "http://node:3000/authorize"
method = "post"
body = "json"
# send_all = yes -> envía todos los atributos del paquete
@@ -14,9 +14,8 @@ rest {
# Accounting: opcional
accounting {
uri = "%{env:REST_ENDPOINT:-http://node:3000}/accounting"
uri = "http://node:3000/accounting"
method = "post"
body = "json"
}
}

View File

@@ -14,12 +14,9 @@ server default {
authorize {
# Llama a la API REST para decidir y añadir atributos
rest
# Si la API no estableció Auth-Type, aceptamos por defecto (demo)
if (!&control:Auth-Type) {
update control {
Auth-Type := Accept
}
# Para laboratorio: aceptar todo siempre (MAC-Auth / pruebas)
update control {
Auth-Type := Accept
}
}
@@ -40,4 +37,3 @@ server default {
# rest
}
}