Skip to content

Implement role and permission checks at the API Level (Phase 3) #29627

Open
22 of 23 issues completed
Open

Description

@OlgaPotiagalova

We have authentication/authorization tokens (e.g., JWT) in place for every API request. Only authenticated users (those with a valid token) can access APIs. We also have in place a matrix of "allowable actions" that restrict users from actions (filings) they are not allowed to do. However, these do not stop a user with a valid token from filing an allowed filing with invalid content -- ie, content that our UIs will prevent, but that could be put/posted to the API directly (using Postman or an alternate UI). For example, there are a number of amalgamation overrides that only staff can normally do, but which could be spoofed in a direct put/post to the Legal API.

This epic is for implementation of the next layer of protection - permission checks for content posted to an allowed API endpoint.

Acceptance Criteria:

  • Enforce fine-grained permissions in the API level.
  • Log all sensitive actions to help detect and investigate unauthorized behavior.

More info:

Three types of permission checks are possible:

  1. by filing (ticket Legal API: add permission checks (instead of KC role checks) to filings - Step 1 #27211)
  2. by filing content/JSON (ticket Legal API - prevent unauthorized actions (missing permission) #29528)
  3. by non-filing endpoint (ticket Legal API: add non-filing permission checks - Step 2 #29967)

Sub-issues

Sub-issues

22 of 23 Issues completed
Loading 23 sub-issues

Activity

  1. added
    Entities Team
    on Jul 17, 2025
  2. changed the title [-]Implement role and permission checks at the API Level[/-] [+]Implement role and permission checks at the API Level (Phase 3)[/+] on Jul 17, 2025
  3. 8 remaining items

  4. Rajandeep98 commented on Nov 18, 2025

    @Rajandeep98
    Collaborator

    Flags : enabled-deeper-permission-action

    Merged PRs :
    Firm Email and DBA Validation - bcgov/lear#3770
    Permissions Common Error Method - bcgov/lear#3772
    Comments Staff and Detail Add - bcgov/lear#3773
    Alteration NIGS - bcgov/lear#3774
    Certify Name Validation Removal - bcgov/lear#3807
    Firm Email and DBA editing - bcgov/lear#3853

  5. Rajandeep98 commented on Nov 20, 2025

    @Rajandeep98
    Collaborator

    Priority Filings

    Annual report (AR/BAR)
    Change of Directors
    Incorporation Application
    Change of Address
    Alteration (including company type)
    Voluntary Dissolution
    Restoration (Full, Limited, Conversion Limited to Full, Extend Limited)
    Correction (data and empty)
    Notice of Withdrawal
    Court Order
    Registrar's Notation
    Put Back On
    Registrar's Order
    Admin Dissolution
    Corrections statements directly on the Ledger (no data change)
    Freeze/Unfreeze

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

Metadata

Metadata

Assignees

Labels

Entities TeamP

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions