feat(permissions): file_gateway.view/admin/connect in the permission catalog #20

Merged
KofTwentyTwo merged 1 commits from feature/permissions-in-catalog into develop 2026-10-16 17:01:45 +00:00
KofTwentyTwo commented 2026-10-16 16:58:26 +00:00 (Migrated from github.com)

Why

The Authentik group file-gateway-admins grants file_gateway.connect, .view and .admin, but the qbit checked them only in code, so they never reached getAllAvailablePermissions. The qbit-authentik mapper expanded them to nothing (reporting drift) and nobody could grant file_gateway.admin through Identity policies or see it in the permission builder.

What

FileGatewayPermissionChecker now implements handlesBuildAvailablePermission/buildAvailablePermission (the same hook qbit-alerts uses). Every gateway object collapses onto one fixed object name, so the catalog lists each name once: reads, widgets -> file_gateway.view; writes, processes -> file_gateway.admin; the app also stands for SFTP sign-in -> file_gateway.connect (the gateway grants connect to sessions and checks no object for it). Enforcement is unchanged.

Test

FileGatewayQBitProducerTest.permissionsAreInTheAvailableCatalog. ./mvnw verify passes (102 tests, checkstyle, coverage).

🤖 Generated with Claude Code

## Why The Authentik group file-gateway-admins grants file_gateway.connect, .view and .admin, but the qbit checked them only in code, so they never reached getAllAvailablePermissions. The qbit-authentik mapper expanded them to nothing (reporting drift) and nobody could grant file_gateway.admin through Identity policies or see it in the permission builder. ## What FileGatewayPermissionChecker now implements handlesBuildAvailablePermission/buildAvailablePermission (the same hook qbit-alerts uses). Every gateway object collapses onto one fixed object name, so the catalog lists each name once: reads, widgets -> file_gateway.view; writes, processes -> file_gateway.admin; the app also stands for SFTP sign-in -> file_gateway.connect (the gateway grants connect to sessions and checks no object for it). Enforcement is unchanged. ## Test FileGatewayQBitProducerTest.permissionsAreInTheAvailableCatalog. ./mvnw verify passes (102 tests, checkstyle, coverage). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.