Skip to content

The access control rule #74

Closed
Closed

Description

@johnf

Question

What decides an entity's access control (Public vs AuthorizationByApplication), given how inconsistent production licence metadata is? Today: Public when the content licence is in openLicenses, otherwise AuthorizationByApplication, decided at index time and stored in Entity.meta.accessControl.

Decide: which metadata is trusted (content licence, ldac:authorizationWorkflow, inheritance from parent collections), what happens when it's missing or contradictory, and whether openLicenses stays a hard-coded LDaCA constant or becomes configuration.

Activity

  1. johnf commented on Nov 17, 2026

    @johnf
    CollaboratorAuthor

    Passed on from "What the indexer derives from a crate" (#69): decide here whether a file's text goes into the search index when its content licence is restricted. Today any text/* file is indexed in full; oni-ui gated it on the licence (allowTextIndex), and the LDaC profile has ldac:openAccessIndex for this. #69 also settled that an entity's content licence falls back through its ancestors in the same crate before the crate root.

  2. self-assigned this
    on Nov 17, 2026
  3. johnf commented on Nov 17, 2026

    @johnf
    CollaboratorAuthor

    Resolution

    1. The rule. An entity's access control comes from its content licence id alone: Public when the id is in the open-licence list, AuthorizationByApplication otherwise, including when there is no licence. The content licence is the one What the indexer derives from a crate #69 derives (falling back through ancestors in the crate). Crate licence metadata (ldac:access, ldac:authorizationWorkflow, ldac:openAccessIndex) is not read. To be revisited: Revisit: access control goes off the licence id alone and ignores crate licence metadata #82.
    2. The list is configuration. openLicenses becomes deployment configuration rather than a constant in code. Because the label is stored at index time, a change to the list needs a reindex before labels catch up; the check on each request uses the current list straight away.
    3. File text. The text of every text/* file goes into the search index whatever its content licence, as today. arocapi already drops highlighted snippets for requests without content access, so what a person without access learns is that a file matches their query. Whether to change this is a question for Peter Sefton: Should the text of restricted files be searchable? #81.
    4. One function, two callers. A single "is this licence open" function serves the indexer (for the stored label) and the check on each request (hasLicence). The label stays in Entity.meta.accessControl. The request-time check can't read the stored label: arocapi passes it only the licence id, and the answer also depends on the user's REMS entitlements.
    5. No warnings. The indexer does not report a crate whose licence metadata disagrees with the list, or a missing licence. Risks recorded in Revisit: access control goes off the licence id alone and ignores crate licence metadata #82.
    6. Two values. The label stays Public / AuthorizationByApplication. Other LDaC workflows (agree to terms, invitation, access control list) need crate metadata and are left to Revisit: access control goes off the licence id alone and ignores crate licence metadata #82.

    No glossary change (the Access control entry already says this) and no ADR (the rule is reversible with a reindex).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions