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
Investigate Namex API: whether any FFs or permissions are needed to restrict access #30709
Namerequest UI looks at several feature flags to determine whether the user is allowed to proceed to BCROS (or fallback to COLIN). For example:
However, Namex API doesn't care whether a NR is created for BCROS or COLIN, so these FFs don't matter to the API and I think they can be ignored.
Permissions (aka Authorized Actions)
Namerequest UI looks at several permissions to determine whether the user is allowed to perform some actions. For example:
(The above are the only 2 permissions checked, although they are checked in several places.)
Similar, Namex API should deny these actions (eg, creating an AML NR) if the user does not have the subject permissions.
For example, if (!user.permissions.include("AMALGAMATION_FILING") then return HTTP 403 (pseudo-code)
Note that the db tables mapping whether a particular user (based on their bearer token) has particular permissions are in LEAR (Business API). Probably the easiest design is for Namex API to query Business API for the current user's permissions and then check them, but I leave the final design up to you.
Update: As with FF, Namex API doesn't care where the user is directed (BCROS or COLIN). Namex API should create Amalgamation or Continuation In NRs regardless, so I think permissions can be ignored.
Note that Namex API protects its more vulnerable calls (eg, that only staff or Business API can do) by checking the auth token / API key. These tokens / keys are not available publicly. So, Namex API should already be protected from hackers or others who might try to call it to do unauthorized things.
In summary, I think no work is needed for this ticket.
changed the title [-]Namex API: investigate whether any FFs or permissions are needed to restrict access[/-][+]Investigate Namex API: whether any FFs or permissions are needed to restrict access[/+]on Nov 20, 2025
Activity
eve-git commentedon Sep 18, 2025
@severinbeauvais to give us more details
severinbeauvais commentedon Sep 18, 2025
Feature Flags
Namerequest UI looks at several feature flags to determine whether the user is allowed to proceed to BCROS (or fallback to COLIN). For example:
However, Namex API doesn't care whether a NR is created for BCROS or COLIN, so these FFs don't matter to the API and I think they can be ignored.
Permissions (aka Authorized Actions)
Namerequest UI looks at several permissions to determine whether the user is allowed to perform some actions. For example:
(The above are the only 2 permissions checked, although they are checked in several places.)
Similar, Namex API should deny these actions (eg, creating an AML NR) if the user does not have the subject permissions.For example,if (!user.permissions.include("AMALGAMATION_FILING") then return HTTP 403(pseudo-code)Note that the db tables mapping whether a particular user (based on their bearer token) has particular permissions are in LEAR (Business API). Probably the easiest design is for Namex API to query Business API for the current user's permissions and then check them, but I leave the final design up to you.Ref: bcgov/lear#3565Update: As with FF, Namex API doesn't care where the user is directed (BCROS or COLIN). Namex API should create Amalgamation or Continuation In NRs regardless, so I think permissions can be ignored.
severinbeauvais commentedon Sep 18, 2025
Note that Namex API protects its more vulnerable calls (eg, that only staff or Business API can do) by checking the auth token / API key. These tokens / keys are not available publicly. So, Namex API should already be protected from hackers or others who might try to call it to do unauthorized things.
In summary, I think no work is needed for this ticket.
[-]Namex API: investigate whether any FFs or permissions are needed to restrict access[/-][+]Investigate Namex API: whether any FFs or permissions are needed to restrict access[/+]davemck513 commentedon Jun 12, 2026
No action anticipated, closing.