bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

LEGAL API - Validate JWT with corp num #1271

Closed Kaineatthelab closed 4 years ago

Kaineatthelab commented 5 years ago

Description:

For MVP the JWT username == Business Identifier as a temporary authorization mechanism.

A new end-point to authorizations has been added that will provide the allowable roles a user has on a particular business.

This ticket is to change the authorization in the legal_api to use the new authorization end-point to determine if the user, identified by the JWT, can submit a business filing, or view a businesses data & filings.

Dependencies

Acceptance Criteria The following roles are handled: {}, { "roles": [ "view", "edit" ] }, { "roles": [ "view"] } JWT role of STAFF will be changed to not allow filings.

Validation Rules

Ready to Build (DoR):

Acceptance / DoD:

JohnamLane commented 5 years ago

@thorwolpert Seems reasonable. My only question is if edit can delete a draft?

thorwolpert commented 5 years ago

@JohnamLane currently, yes. We don't have FGAC (Fine Grained Access Control) for filings. You either can or cannot submit a filing to alter a business, there's no restriction on the kind or pre-state of a filing. Currently staff are blocked from submitting a filing, but that will need to be examined when no-fee and corrections are done.