Skip to content

Use a dedicated service user/subservice for Redirects Package creation and replication #3710

@koha26

Description

@koha26

Type

Improvement

Referenced issue

#3701

Background

The new replication approach is a good optimization because it avoids replicating each redirect rule individually.
However, it is not appropriate to grant authors/content admins broad access to all packages. In practice, this caused issues because editor/content-admin responsibilities are intentionally limited, and they typically do not have access to /etc/packages.

Problem

Current implementation can require UI users (authors/content admins) to have package-related permissions, which violates least-privilege and role separation.

Temporary workaround
Grant limited permissions for package creation/replication to unblock operations.
Proposed long-term solution
Implement package management via a dedicated system user + Sling subservice that performs package creation and replication on behalf of users:

  • UI users trigger replication without direct /etc/packages access.
  • Backend service performs package operations using service credentials.
  • Keep user permissions scoped to redirect configuration only.

Acceptance Criteria

  1. Authors/content admins can replicate redirect maps without direct permissions to /etc/packages.
  2. Package creation/assembly/replication runs through a dedicated subservice and system user.
  3. Service user permissions are minimal and documented (least privilege).
  4. Existing redirect replication functionality remains unchanged from a user perspective.
  5. Audit/logging clearly shows actions executed by the service user.
  6. Tests cover success and failure paths for service resolver acquisition and replication flow.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions