Commit Graph

964 Commits (3ced3ced8bbefcba69b73f83e660dd51e4814d4e)

Author SHA1 Message Date
Juan Manuel Bardallo 3ced3ced8b Docs: update CHANGELOG for git repository deletion fix
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-28 12:32:41 +02:00
Juan Manuel Bardallo 59be9044e4 Fix(OgRepository): fix serialization group in DeleteRepositoryInput
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-28 12:28:44 +02:00
Juan Manuel Bardallo cd1f7c0f23 Fix(OgRepository): fix repo deletion payload mismatch and error handling
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-28 11:02:37 +02:00
Juan Manuel Bardallo 7df739c17f Docs: update CHANGELOG for OgBoot router extraction logic and trace race condition fix
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-28 00:34:17 +02:00
Juan Manuel Bardallo f2f0e41179 Feat(OgBoot): prioritize client subnet over OU network settings for router and netmask extraction
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-28 00:32:15 +02:00
Juan Manuel Bardallo ddeea59173 Fix(RunScriptAction): default trace status to IN_PROGRESS for Windows/Linux to prevent duplicate traces in combination with ogagent
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-27 18:52:06 +02:00
Juan Manuel Bardallo e2d1483134 Fix(agent-api): prevent duplicate traces due to webhook race condition for START_SCRIPT
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-23 14:23:51 +02:00
Juan Manuel Bardallo 55ec37d024 Docs(CHANGELOG): document Trace output length fix
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
2026-07-22 13:13:17 +02:00
Juan Manuel Bardallo 4c2e43940a Fix: change Trace output column to LONGTEXT to avoid 500 errors on large output
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-22 10:59:48 +02:00
Juan Manuel Bardallo f87ebe5c9a Fix: support mapping agent loggedin status to OS session status
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-22 10:32:13 +02:00
Juan Manuel Bardallo 2bebae09c1 Fix: unconditionally update client status on ping if it doesn't match
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-22 09:34:19 +02:00
Juan Manuel Bardallo 5144aed0df Fix: avoid hardcoding OG_LIVE status on REFRESH and RUN_SCRIPT completion
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-21 14:42:33 +02:00
Juan Manuel Bardallo a9228b0047 Fix: save script output for successful ExecScript webhooks
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-21 14:40:54 +02:00
Juan Manuel Bardallo f08f3f6ff9 fix(webhook): restaurar gestion de progreso y corregir error de sintaxis
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-20 11:25:50 +02:00
Manuel Aranda Rosales f2566bb9c9 ref 3018. Cancel multiple task
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-19 17:35:29 +02:00
Juan Manuel Bardallo d2cbc51336 refactor(webhook): consolidar procesamiento de comandos en un bloque switch
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-18 01:41:08 +02:00
Juan Manuel Bardallo 17c5c603f1 fix(webhook): restaurar parseo de particiones en EjecutarScript borrado accidentalmente
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-18 01:30:37 +02:00
Manuel Aranda Rosales cc0e45eae9 ref 3017. Fixed bug EjecutarScript webhook
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-17 11:56:39 +02:00
Manuel Aranda Rosales 52515633af ref 3016. Updated ogRepository sync
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-17 11:44:44 +02:00
Juan Manuel Bardallo 1b24414c0c docs: actualizar CHANGELOG para la version 1.9.1
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-17 10:54:52 +02:00
Juan Manuel Bardallo 170ff14bd9 feat(webhook): procesar cfg en respuestas de EjecutarScript
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
Permite que la configuración de particiones y caché se actualice automáticamente en la BBDD cuando termina la ejecución de un script en el cliente, evitando tener que encadenar refrescos manuales.
2026-07-17 10:48:55 +02:00
Manuel Aranda Rosales 22947fd44d ref 3009. Execute task right now
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-15 11:18:36 +02:00
Manuel Aranda Rosales b4907bc5e6 ref 3006. Updated creation software profile bug. 2026-07-13 10:38:56 +02:00
Manuel Aranda Rosales 3390734b10 ref 3007. Updated software profile image entity. 2026-07-13 10:38:22 +02:00
Manuel Aranda Rosales 8b78296a86 ref 2994. Hardware profile network settings . 2026-07-13 10:36:01 +02:00
Manuel Aranda Rosales ec48baebd3 ref 3005. Fixed command scheldule bug. 2026-07-13 10:32:15 +02:00
Juan Manuel Bardallo 04068ce748 Merge branch 'devel' of https://ognproject.evlt.uma.es/gitea/opengnsys/ogcore into devel
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-07-09 11:06:24 +02:00
Juan Manuel Bardallo af2fa11d9b feat(deploy): remove constraint restricting deployment to clients with different partition sizes 2026-07-09 11:04:17 +02:00
Manuel Aranda Rosales 8307844596 ref 2994. Propagacion con Hardware profile.
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
2026-07-09 10:15:09 +02:00
Manuel Aranda Rosales 1bf33e73d1 ref 2995. Actualizar roles. 2026-07-09 10:15:09 +02:00
Manuel Aranda Rosales f00e5a1292 ref 2975. Cambio de tipo en bbdd para que queda texto msa grande en los scripts. 2026-07-09 10:15:09 +02:00
Manuel Aranda Rosales 92ee730bab ref 2995. Actualizas roles. 2026-07-09 10:15:09 +02:00
Juan Manuel Bardallo 6b8cd0834b feat(organizational-unit): order children alphabetically by name
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-07-09 09:50:58 +02:00
Juan Manuel Bardallo 0acf27c0e1 feat(user): add language preference field to user profile
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- Add language column (VARCHAR 10) to User entity
- Add language field to UserInput and UserOutput DTOs
- Expose language in JWT payload via JWTCreatedListener
- Add Doctrine migration Version20260707091500
2026-07-07 13:59:56 +02:00
Nicolas Arenas 78a988fb8b docs(ogcore): actualizar CHANGELOG para versión 1.9.0
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main Build queued... Details
ogcore-debian-package/pipeline/head This commit looks good Details
2026-06-16 17:53:46 +02:00
Nicolas Arenas 3d0883a0bd fix(ogcore): corregir rutas de firewall y provider de DELETE en OUs
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/pr-main Build started... Details
Dos bugs introducidos en fix_permissions:

1. access_control paths incorrectos: nginx elimina el prefijo /api/ antes
   de llegar a ogcore, por lo que las rutas reales son /clients y
   /organizational-units (sin /api/). Las reglas anteriores con ^/api/clients$
   y ^/api/organizational-units$ nunca coincidían.

2. OrganizationalUnitProvider no manejaba Delete: el switch del provider
   no tenía case para Delete, devolvía null implícitamente y API Platform
   respondía 404 a cualquier usuario que intentara borrar una OU.
   Quitando el provider del DELETE, el proveedor Doctrine por defecto carga
   la entidad correctamente y la expresión security: del YAML puede evaluarse.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 11:20:43 +02:00
Juan Manuel Bardallo 024f2ace6b Corregida asociacion de perfil hardware con cliente, se usa delete cascade para que al borrar un cliente, se borre su perfil hardware asociado
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-06-16 09:17:09 +02:00
Nicolas Arenas 9d5c230a2d Merge branch 'fix_permissions' into devel
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- Bloqueo POST /api/clients y /api/organizational-units a ou-operator y ou-minimal
- Permiso a ogLive (ROLE_OGCLIENT_API) para GET /clients
- Suite de tests funcionales de permisos por rol (PermissionsTest.php)
2026-06-15 11:57:29 +02:00
Nicolas Arenas cb3a8aa58a fix(ogcore): permitir a ogLive consultar clientes vía API key
Añade regla access_control para que ROLE_OGCLIENT_API pueda hacer GET
en /clients. Sin esta regla, ogLive no puede consultar la configuración
del equipo por IP al arrancar (el catch-all ROLE_USER bloquearía la
petición porque ogclient_api_user no tiene ese rol).

Ya existía la misma excepción para /commands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 11:57:15 +02:00
Nicolas Arenas 9baa1120a6 fix(ogcore): normalizar timezone UTC en CommandTask DTOs 2026-06-15 11:52:44 +02:00
Nicolas Arenas 7f56b6291a fix(ogcore): permisos DELETE de OUs y borrado de clientes sin plantilla 2026-06-15 11:52:44 +02:00
Nicolas Arenas 7979d3e81c Merge remote-tracking branch 'refs/remotes/origin/devel' into devel 2026-06-15 11:23:27 +02:00
Juan Manuel Bardallo 0284654f3e Añadido un timeout de 5 segundos para detectar el estado de cada equipo en el sondeo del aula completa
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2026-06-12 10:27:04 +02:00
Nicolas Arenas 5ce29848f1 test(ogcore): añadir suite de tests de permisos por rol
PermissionsTest.php cubre la matriz completa de permisos:

  Sección 1 — Clientes (POST):
    - super-admin / ou-admin pueden crear (201)
    - ou-operator / ou-minimal no pueden (403)

  Sección 2 — OUs (POST):
    - super-admin / ou-admin pueden crear (201)
    - ou-operator / ou-minimal no pueden (403)

  Sección 3 — OUs (DELETE con autoría):
    - ou-admin borra la suya propia (204)
    - ou-admin no borra la de otro usuario (403)
    - super-admin borra cualquiera (204)
    - ou-operator no borra ninguna (403)

  Sección 4 — DHCP Servers:
    - super-admin puede PATCH (200)
    - ou-admin / ou-operator no pueden PATCH ni DELETE (403)

  Sección 5 — Boot Servers:
    - super-admin puede PATCH (200)
    - ou-admin / ou-operator no pueden PATCH ni DELETE (403)

  Sección 6 — Image Repositories:
    - super-admin puede crear (201)
    - ou-admin / ou-operator no pueden crear ni borrar (403)

  Sección 7 — Commands:
    - super-admin puede crear (201)
    - ou-admin / ou-operator no pueden crear, editar ni borrar (403)

OrganizationalUnitTest: reemplaza testOuOperatorCanEditOrganizationalUnitTheyCreated
(que asumía que operadores podían crear OUs) por
testOuOperatorCannotCreateOrganizationalUnit (que verifica el comportamiento correcto).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 15:37:12 +02:00
Nicolas Arenas 06bca9395e fix(ogcore): bloquear creación de clientes y OUs a nivel de firewall
Añade reglas access_control al firewall de Symfony para los endpoints
POST /api/clients y POST /api/organizational-units, restringiendo el
acceso a ROLE_SUPER_ADMIN y ROLE_ORGANIZATIONAL_UNIT_ADMIN.

La comprobación a nivel de firewall se ejecuta antes de que API Platform
procese la petición (antes de deserialización y validación del DTO), lo
que garantiza un HTTP 403 inmediato sin necesidad de que el cuerpo de la
petición sea válido.

Las reglas usan el ancla $ para que no afecten a sub-rutas como
/api/clients/server/reboot, /api/clients/server/boot-client, etc.
2026-05-27 14:45:55 +02:00
Nicolas Arenas ab1a7c2d11 fix(ogcore): mover seguridad de creación/borrado a los processors
- ClientProcessor: añade comprobación inline en processCreateOrUpdate
  para bloquear (403) creación de clientes a ROLE_ORGANIZATIONAL_UNIT_OPERATOR
  y roles inferiores. Añade Security al constructor.

- OrganizationalUnitProcessor: mueve el bloqueo de creación al inicio de
  processCreateOrUpdate (antes de validate/save) para que el 403 se devuelva
  sin persistir datos. Separa la lógica de añadir la OU a la lista del usuario.

- OrganizationalUnitProcessor.processDelete: corrige bug de nombre de variable
  ($user apuntaba a una OU); añade comprobación de autoría via createdBy para
  que solo el creador o super-admin pueda borrar la OU (403 en caso contrario).

Motivo del cambio: la expresión security: de API Platform YAML no se evaluaba
antes de la validación del DTO en AP 3.4 para operaciones POST sin provider
explícito, resultando en 422 en lugar del esperado 403.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:20:02 +02:00
Nicolas Arenas b1903ea321 fix(ogcore): restringir creacion de OUs y clientes a ou-admin y superior
El POST de OrganizationalUnit y Client queda restringido a
ROLE_SUPER_ADMIN o ROLE_ORGANIZATIONAL_UNIT_ADMIN. Los operadores
(ROLE_ORGANIZATIONAL_UNIT_OPERATOR) ya no pueden crear aulas ni
clientes via API.
2026-05-27 12:03:43 +02:00
Nicolas Arenas 6d35163b3f fix(ogcore): restringir escritura de infraestructura a ROLE_SUPER_ADMIN
Las operaciones de creacion, edicion y eliminacion de servidores DHCP,
Boot, Subredes, Comandos y Repositorios de imagenes quedan restringidas
a ROLE_SUPER_ADMIN. Las operaciones de lectura siguen accesibles a
cualquier usuario autenticado.
2026-05-26 15:21:02 +02:00
Nicolas Arenas 203675e7ad fix(ogcore): corregir permisos de edición de aulas para ou-admin y ou-operator
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
- OrganizationalUnitProcessor: tras crear una OU (POST), añade
  automáticamente la nueva OU a allowedOrganizationalUnits del
  usuario creador (si no es SUPER_ADMIN), para que pueda verla
  y editarla de inmediato.
- OrganizationalUnitVoter: amplía la comprobación de
  ORGANIZATIONAL_UNIT_VIEW para incluir descendientes de las OUs
  permitidas, alineando el voter con la lógica de
  UserAllowedOrganizationalUnitExtension.
2026-05-26 14:34:26 +02:00
Nicolas Arenas cb182d98e9 feat(ogcore): ordenar aulas y centros alfabéticamente por defecto
testing/ogcore-api/pipeline/head There was a failure building this commit Details
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
Añade orden ascendente por nombre en el recurso OrganizationalUnit
para que el listado de aulas y centros se devuelva siempre en orden
alfabético sin necesidad de parámetros adicionales en la petición.
2026-05-22 19:41:09 +02:00