Align Unified Search visibility with participant access rules

Open
#9,066 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
php

Research direction

Start by reading how lib/Search/FileSearchProvider.php filters results and how lib/Service/FileAccessService.php decides document access, then compare the participant lookups in lib/Db/SignRequestMapper.php and the identification types in lib/Db/IdentifyMethod.php. The issue asks for a written role/identity/state matrix before any code change, so the first deliverable is that contract, checked against tests/php/Unit/Service/FileAccessServiceTest.php. Done means the matrix is agreed and the positive and negative cases pass, and any separately exploitable finding goes through SECURITY.md, not a public pull request.

Written by the indexing model from the issue text.

Description

backend enhancement php

Goal

Ensure LibreSign Unified Search uses consistent participant identity and document-access rules for owners, signers and observers.

Starting points

  • lib/Search/FileSearchProvider.php
  • lib/Db/SignRequestMapper.php
  • lib/Service/FileAccessService.php
  • lib/Db/IdentifyMethod.php
  • lib/Db/SignRequest.php
  • tests/php/Unit/Service/FileAccessServiceTest.php
  • Existing observer integration scenarios

Requirements

Define and implement a consistent, testable contract for search discovery.

Account UID associations should be handled explicitly. Email and other identification channels require a verified rule for associating the contact with the authenticated account; merely comparing arbitrary contact strings must not expand access.

Cover current signing-request states, observers, envelopes, draft requests, deleted accounts and legacy records.

Search discovery must not confer signing, validation or document-management permissions.

Keep discovery decisions consistent with document-access checks without introducing per-result authorization queries that undermine performance.

Acceptance criteria

  • A concise role/identity/state matrix documents expected visibility.
  • Owners, account signers and account observers receive the correct results.
  • Ambiguous or untrusted identifiers do not grant unintended discovery.
  • Unrelated accounts receive no document identifiers or metadata.
  • Multiple identification methods do not create duplicate results.
  • Revoked, stale and deleted-account scenarios have defined outcomes.
  • Search-related authorization checks are read-only.
  • Unit and database integration tests cover positive and negative cases.
  • Existing legitimate signing and validation flows remain compatible.

Implementation guidance

Use the existing services as the starting point. Establish the authorization contract first, then implement the smallest change that satisfies it.

Avoid an independent new permission framework or a repository-wide refactor.

If investigation suggests a separately exploitable security issue, follow SECURITY.md instead of describing exploitation details in a public pull request.

Dominant language
PHP
Stars
844
Forks
176
Avg merge
14h 3m
Merged PRs (30d)
344

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LibreSign/libresign

All issues in LibreSign/libresign

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.