Skip to content

Legal API: update endpoints to check if caller's account id is authorized #30948

Todo

Description

@severinbeauvais
No description provided.

Activity

  1. added
    Entities Team
    on Oct 3, 2025
  2. severinbeauvais commented on Nov 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    I think the Legal API checks the bearer token to see if the user is allowed to access each endpoint...

    @vysakh-menon-aot , is the bearer token check the same as an account id check? I mean, if the user is affiliated with the subject business then that's equivalent to the account being affiliated, right?

  3. vysakh-menon-aot commented on Nov 10, 2025

    @vysakh-menon-aot
    Contributor

    No we don't validate in most of the endpoint. Just used in the latest code for business settings https://github.com/bcgov/lear/blob/main/legal-api/src/legal_api/resources/v2/business/business_account_settings.py#L68

  4. mstanton1 commented on Nov 27, 2026

    @mstanton1
    Collaborator
  5. kialj876 commented on Nov 27, 2026

    @kialj876
    Collaborator

    This actually is an issue. Right now our checks verify the user only so if they have access then they can access the business through any of their accounts, which should be prevented

  6. self-assigned this
    on Nov 27, 2026
  7. self-assigned this
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities Team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions