You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Legal API: update endpoints to check if caller's account id is authorized #30948
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?
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
Activity
severinbeauvais commentedon Nov 7, 2025
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?
vysakh-menon-aot commentedon Nov 10, 2025
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
mstanton1 commentedon Nov 27, 2026
I believe this was recently verified and noted as not an issue by @kialj876 . Kial - can you confirm?
Tracking tickets on this I found https://app.zenhub.com/workspaces/entities-team-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/29967 and https://app.zenhub.com/workspaces/entities-team-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/29528.
kialj876 commentedon Nov 27, 2026
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