From 379218ef20c34a5cff34eb7f4788a15a2f612b51 Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 16 Mar 2026 14:48:13 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Modificacion=20en=20security=20para=20permi?= =?UTF-8?q?tir=20acceso=20a=20la=20api=20al=20ROLE=5FUSER=20en=20lugar=20d?= =?UTF-8?q?e=20IS=5FAUTHENTICATED=5FFULLY,=20ya=20que=20en=20ese=20caso=20?= =?UTF-8?q?un=20cliente=20con=20rol=20ROLE=5FOGCLIENT=5FAPI=20podr=C3=ADa?= =?UTF-8?q?=20acceder=20a=20toda=20la=20api=20y=20solo=20queremos=20dar=20?= =?UTF-8?q?acceso=20a=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/packages/security.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 5a114f1..a4ce57f 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -31,7 +31,7 @@ security: - { path: ^/$, roles: PUBLIC_ACCESS } # Allows accessing the Swagger UI - { path: ^/docs, roles: PUBLIC_ACCESS } # Allows accessing the Swagger UI docs - { path: ^/auth/login, roles: PUBLIC_ACCESS } - - { path: ^/commands, roles: [ROLE_OGCLIENT_API, ROLE_ADMIN] } + - { path: ^/commands, roles: [ROLE_OGCLIENT_API, ROLE_USER] } - { path: ^/opengnsys/rest, roles: PUBLIC_ACCESS } - { path: ^/og-repository/webhook, roles: PUBLIC_ACCESS } - { path: ^/og-lives/install/webhook, roles: PUBLIC_ACCESS } @@ -39,7 +39,7 @@ security: - { path: ^/validate, roles: PUBLIC_ACCESS } - { path: ^/menu-browser, roles: PUBLIC_ACCESS } - { path: ^/menu/, roles: PUBLIC_ACCESS } - - { path: ^/, roles: IS_AUTHENTICATED_FULLY } + - { path: ^/, roles: ROLE_USER } when@test: security: From 8d3f217032f4fecda6e4d463e15ab3888ce54ccd Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 16 Mar 2026 14:52:28 +0100 Subject: [PATCH 2/2] - Se ha modificado el fichero security.yml para que el acceso a la api lo tenga el ROLE_USER en lugar de IS_AUTHENTICATED_FULLY, ya que de lo contrario cualquier cliente con rol ROLE_OGCLIENT_API podia acceder a la api, de esta forma se asegura que solo los usuarios con rol ROLE_USER puedan acceder a la api y el cliente solo pueda acceder a la ruta commands. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82143f2..4372ff9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## [1.2.5] - 2026-03-16 +### Fixed +- Se ha modificado el fichero security.yml para que el acceso a la api lo tenga el ROLE_USER en lugar de IS_AUTHENTICATED_FULLY, ya que de lo contrario cualquier cliente con rol ROLE_OGCLIENT_API podia acceder a la api, de esta forma se asegura que solo los usuarios con rol ROLE_USER puedan acceder a la api y el cliente solo pueda acceder a la ruta commands. + ## [1.2.4] - 2026-03-16 ### Added - Se ha implementado un nuevo [ApiKeyAuthenticator] para dotar de acceso seguro al endpoint `/commands` mediante la cabecera `X-API-KEY`.