bcgov / nr-forests-access-management

Authorization solution for BC natural resource sector
Apache License 2.0
8 stars 2 forks source link

Manage FAM DB Schema, users, roles #34

Closed ConradBoydElliottGustafson closed 2 years ago

ConradBoydElliottGustafson commented 2 years ago

@rpardofigueroa and @ConradBoydElliottGustafson did a small design session on July 6. We decided on how to set up the DB users and roles for now.

FlywayDB will always run as sysadmin (for now), so we don't need a separate user for the "script runner". We need to set up a role called APP_FAM that will serve as the namespace for all the FAM objects. No login privileges for this role. Since flyway runs all the sql scripts as sysadmin, APP_FAM does not need any CREATE or DROP privileges (and should be restricted). We need to set up a role FAM_API (with login privileges) and grant CRUD privileges to the objects in APP_FAM.

The scripts to create schemas, users, roles will be run by flyway.

AC for this ticket:

rparfig commented 2 years ago

Updated the FAM data model in ER Studio, to address the following:

rparfig commented 2 years ago

Discussion with Data Architects regarding delta DDLs led to some investigation and collaboration on how to produce them, using data model versioning. More work required on this, once the first version of the model is deployed and stable.