cozystack/pkg
IvanHunters 5b2501db91 test(api): add security tests for TenantNamespace IDOR fix
Added comprehensive unit tests for authorization logic:

- hasAccessToNamespace() tests:
  - User subject access (positive and negative cases)
  - Group subject access
  - ServiceAccount subject access
  - ServiceAccount with empty namespace (defaults to RoleBinding ns)
  - Privileged groups (system:masters, cozystack-cluster-admin)

- Get() handler tests:
  - Returns namespace when user has access
  - Returns NotFound when user lacks access (not Forbidden)
  - Returns NotFound for non-tenant namespaces

All tests verify that authorization correctly enforces RoleBinding-based
access control and prevents IDOR vulnerabilities.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-04-23 18:17:47 +03:00
..
apis test(api): address review round 4 findings 2026-04-12 14:17:12 +03:00
apiserver feat(application): add WorkloadsReady condition and Events tab 2026-04-15 17:20:45 +03:00
cmd/server [docs] Updated app go types 2026-03-25 15:57:25 +05:00
config refactor(api): remove rootHost-based name length validation 2026-02-12 13:52:37 +03:00
generated fix(codegen): add gen_client to update-codegen.sh and regenerate applyconfiguration 2026-02-16 23:01:38 +03:00
lineage feat(api): add chartRef to CozystackResourceDefinition 2026-01-14 16:09:43 +01:00
ovnstatus [kubeovn] Implement the KubeOVN plunger 2025-09-11 02:11:58 +03:00
registry test(api): add security tests for TenantNamespace IDOR fix 2026-04-23 18:17:47 +03:00
version refactor(telemetry): split telemetry between operator and controller 2026-01-19 13:52:15 +01:00