Altinn / altinn-authentication

Altinn platform microservice for handling authentication
4 stars 2 forks source link

PostGress database with the SystemUser table #379

Closed simen-rekkedal closed 1 month ago

simen-rekkedal commented 8 months ago

10 Nov: change SystemUser model name to AltinnSystemIntegration ? Because SYSTEM_USER is a reserved keyword in Postgres db.

To store the SystemUsers, see #369, we need a new PostGress db.

### Development
- [x] Write Sql : Create AltinnSystemIntegration for a PartyId
- [x] Write Sql : Get AltinnSystemIntegration by unique Id
- [x] Write Sql : Get all AltinnSystemIntegration for a PartyId
- [x] Write Sql : Set DeleteFlag on a AltinnSystemIntegration with unique Id
- [x] Write Sql : Update AltinnSystemIntegration by unique Id (replace or field by field?)
### Integration Tests
- [x] Add test project to run postgres db calls in a temp docker image
- [x] Chore: rewrite to global fixture
### Environment
- [x] Create a new db in Dev ( created db in docker image using Testcontainer )
- [x] Deploy to AT ( moved task to other Issue)
- [x] Deploy to TT02 ( moved task to other Issue)
### Dependencies and Prerequisites
- [x] Model is finalized, see issue: https://github.com/Altinn/altinn-authentication-frontend/issues/8
- [x] current model name: altinn_system_integration, pr 11. Nov 2023
### Tasks
- [ ] https://github.com/Altinn/altinn-authentication/pull/382
- [ ] https://github.com/Altinn/altinn-authentication/pull/432
simen-rekkedal commented 8 months ago

SimenR 2:25 PM ifølge denne doc'en så er SYSTEM_USER reserved keyword i postgres https://www.postgresql.org/docs/current/sql-keywords-appendix.html kanskje kalle det noe annet i db?

PostgreSQL DocumentationPostgreSQL Documentation Appendix C. SQL Key Words Appendix C. SQL Key Words Table C.1 lists all tokens that are key words in the SQL standard and in PostgreSQL 16.1. Background … Yesterday at 2:01 PM (50 kB) https://www.postgresql.org/docs/current/sql-keywords-appendix.html

New

runetl 2:35 PM hehe. Ja, Det er nok best da. Spørsmåler om f.eks ALTINNSYSTEM_USER eller APISYSTEM_USER blir for nært og man da må speile det andre steder også

SimenR 2:36 PM altinn_integration ?

runetl 2:38 PM Ja, det kan fungere det også. Kan jo ta det i første omgang. Får skrive på proc som oppretter at system_user var ulovlig. Jeg burde tenkt på det før

SimenR 2:49 PM eller altinn_authorization_integration ?

runetl 2:50 PM altinn_system_integration

SimenR 2:52 PM jeg bruker altinn_system_integration i koden nå, så får vi ta en search and replace senere om vi ombestemmer oss

simen-rekkedal commented 6 months ago

Regarding the Dependency on the modeling, we move forward with the model the way it is now. And any new changes will be resolved in new Issues.

simen-rekkedal commented 6 months ago

Regarding the Environment, we move the tasks for CI/CD and test environments to a new Issue.