Skip to content

Commit

Permalink
Tech fix (#106)
Browse files Browse the repository at this point in the history
* Add zoning and occult zone (#95)

* add zoning type

* map zoning

* undefined zoning if not provided

* add introduction subzonage

* add partially public field in decisionMetadata

* add flag to partiallypublic decision

* add occultation for motivation when debat are not public

* update readme

* hide category for annotators

* open categorie on left panel for simple route

* update removeOverlapping annotation to keep the longest annotation

* lint

* move texte to wording

* fix logic

* throw error if zoning not found

* handle multiple motivations

* update with sder master commit

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>

* moove variable

* upgrade dependencies

* update vaults and env var

* update sder-core version

---------

Co-authored-by: Antoine Jeanneney <antoine.jeanneney@justice.fr>
  • Loading branch information
ajeanneney and Antoine Jeanneney authored Jun 7, 2024
1 parent 178f9d2 commit bee970f
Show file tree
Hide file tree
Showing 16 changed files with 65 additions and 47 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ DBSDER_API_VERSION=v1
DBSDER_API_ENABLED=false
NLP_PSEUDONYMISATION_API_URL=http://localhost:8081
NLP_PSEUDONYMISATION_API_ENABLED=false
JWT_PRIVATE_KEY=myPrivateKey
1 change: 1 addition & 0 deletions ansible/group_vars/dev/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ git_branch: dev
sder_mongodb_url: "{{ vault_sder_mongodb_url }}"
label_mongodb_url: "{{ vault_label_mongodb_url }}"
dbsder_api_key: "{{ vault_dbsder_api_key }}"
jwt_private_key: "{{ vault_jwt_private_key }}"
22 changes: 13 additions & 9 deletions ansible/group_vars/dev/vault.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
$ANSIBLE_VAULT;1.1;AES256
39303565373437623765373064316661363432663632653235393137316634383863636630613366
3437363130316639643232366661653837613464346362650a366661323836353437613733336133
36363361346135393835663935326463663661373035306234666165663134343631623835666566
3130373562316633380a613836353133383839636634393632303239343832353262616238633164
30396538623937303431666536313036613838383137306232623631306531306566653939383361
32353331346234316438333334633636613233383764666539363266326330306631343030643233
39623461356165323861643530393934343638386135373835366139623733626566386462303730
63396639663765343161393165623936613133626130646263653337373862323631323635393064
30343266386139326261336337326434626635353266323738353664353234656463
39663266333739633134623434376563373264316236383038643266363434666437376464323030
6463373636643935316664303364326366333865373662330a383263643165376539386264316133
38306632646330373630353335343737333839353835373464623039373461306633306234373232
3233373133353666330a626430313764383564626536666430316134636139646232323833636536
34333562303864633436366431643565356531393139633633353833663162616234393539653137
36366532313039643635396539623736383530363365613261643366336133386236643538303637
64356236386632353863366135366364306464306463663862396538336630613730346332623966
38616435613836373738366666663165303835666339376637633832663963343561306436383733
31613836313663663931616137663831616633646534333333306439613034626230396366353439
30663332313765613836633333636464383465353665363137336536353062646465333561383765
35316633626337303365626132353832316631353334316436613431616265373835393630346139
66636133336262633363343730383338313631656139616331616337326533396664663232353531
3162
1 change: 1 addition & 0 deletions ansible/group_vars/preprod/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ git_branch: re7
sder_mongodb_url: "{{ vault_sder_mongodb_url }}"
label_mongodb_url: "{{ vault_label_mongodb_url }}"
dbsder_api_key: "{{ vault_dbsder_api_key }}"
jwt_private_key: "{{ vault_jwt_private_key }}"
30 changes: 17 additions & 13 deletions ansible/group_vars/preprod/vault.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
$ANSIBLE_VAULT;1.1;AES256
34366337343765393936653466666164363263633337613865633036346635396535366438373235
3234356237346564636564643736386439373339323836610a373239316139383538623236616532
64323065366665333536343539613137633533383632333134643832343862653334393863366263
3031636161643463320a656631303164383263636161323134663430353863386261643835636262
33333237353339643333373030323266643933323465363535613666363039333263643032663866
65616262633732633165323832386333393463363464393433633832386230363133616437636631
61633663316432303732366636336335623065366661363730383966383731613165376263363630
66633330396137383361626661373932636539643934393232393163366439316461313430336562
32653762323637303138376637633962336364653336363762336665316337353261656534316564
30393336316139356632316531663864343632616130363839386462383135326435323962633063
37346664653961373530633739623364333263333532663236343830326561376133366362343933
38386639616362323936626139323631366439636264613035623138646430613438623038616235
39363539336531666334636435613231353932363639316137663230623931306332
34666335633230313830623863656432653337623630626633653565353131626431356430386463
3237303536613766653665373661313537383736633032610a636566653535323734373039376266
63316466636339346566313636303731323764656533386133376639376561346362316462643163
3236373036663139390a346165333464663835613433633235663065376263663065373533663531
35623138633163306461303530343839646662643634383963626538633863393065323134353163
63306239323666356635393831613435656439393564393832663536306131663130376363663533
35313161653366353964393937646333613264306131663336613134623165613161613663623538
62346633383763386338393766623530616233633565663030303832313234663664313138646531
65326537333538396536376435393232663135333939353032313163633265656330623662653238
66633365626137353166663433656233663431333132616465626465666163663365663664623539
63376332326366386433363963326639346231303862303263626531323837353365333231663435
62616362366564333564343636623035623833643464333265343439633263313030663233353034
32646665656165336138623435663466613761653766643563333865316461633930626130373463
30333464326366643732346333303735356336666161623266373433386165326336376366613464
62633636626263666362663063333534356134626139396539386365366266316531613032613934
34616138613139333730396630373662656535303236336535356636646431353238386463353363
3461
1 change: 1 addition & 0 deletions ansible/group_vars/prod/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ git_branch: prod
sder_mongodb_url: "{{ vault_sder_mongodb_url }}"
label_mongodb_url: "{{ vault_label_mongodb_url }}"
dbsder_api_key: "{{ vault_dbsder_api_key }}"
jwt_private_key: "{{ vault_jwt_private_key }}"
32 changes: 17 additions & 15 deletions ansible/group_vars/prod/vault.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
$ANSIBLE_VAULT;1.1;AES256
62373532313666343261626431336130306138653462633031333333653264653231353364636632
6264613864396264393563353662326237323464633931620a616431326666656239636461613732
38353563326461633664306462653766653038643030346465316130313461313637626332373466
6465356638363532360a623563633865636137353532636539396264623862656534613534316365
61323064323263633339373337333162646631393066653561326332316531333435303361613737
30323562323636313565653862353039623031366361386630353934343364386363393962353365
34346334343362373562336239616263616234376235313561316465353161343538623234303663
31393835313331393031663766633262313464396566636366373063303838376636313666333762
34306531646633666632613532653632383732643331383338623638633565643533303262636138
35313561306631313163323165323136653466653663363734303535333133363839363032646335
34653066656432626134613034363564326565356335396330346333373165306465663636643066
31313937353365353764663939326262336630363463353137626463323664613665306233623934
31646336313763373039623632393730323266633130653062316663373466303533333565343138
61653636376632373462656137623463636139303934633939613762316337323463373561353633
643230633138386135343635326232393764
64666639623538333433323166306339643963386231626662323731383033353363636235613664
6230613362666161313333386261613039393037356465330a626637336162646162356232333963
34336230303439396439313831383466353531623130326236363230623334383763313962323439
6632386661656532390a643964616136633538306563626139643035383434306162343530613932
30626336396438376161626564323635656238303963636331653637623736623566326138666537
30373433656234626561616263346638626337663630363962366437323137643038663365656633
38353463363731356134393661636533383137346536313466326339383934323033356132386266
39643832326262313362303430386438306363393265613635356438636131376438386331613065
61333065313464626330376134323239656365306263333635623566363632336235396334333964
39616231396466393662396366303334373038323363313334323736356330636233343430306634
61623262303439666232623562653930366536363561643939333462343861383630393362343936
65373963393839366535376630303063303336376264623938333333643962333834663566396163
39323665343634373738613564356332393238316533656435633931653761633038353464343031
61613564346233313834316438656330326539393631616330306632623764316636366461666431
35373239653230303263393833356262353965323731666134663933623336313333363062613264
31383464636262366330376539663866643964646462396431313434346238656633366137643830
35653161376139326633623433303731643236313639363266386637323365666433
1 change: 1 addition & 0 deletions ansible/roles/deploy_backend/tasks/secret.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
SDER_DB_URL: "{{ sder_mongodb_url | b64encode}}"
LABEL_DB_URL: "{{ label_mongodb_url | b64encode }}"
DBSDER_API_KEY: "{{ dbsder_api_key | b64encode}}"
JWT_PRIVATE_KEY: "{{ jwt_private_key | b64encode}}"
1 change: 1 addition & 0 deletions docker.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ DBSDER_API_VERSION=v1
DBSDER_API_ENABLED=false
NLP_PSEUDONYMISATION_API_URL=http://host.docker.internal:8081
NLP_PSEUDONYMISATION_API_ENABLED=false
JWT_PRIVATE_KEY=myPrivateKey
2 changes: 1 addition & 1 deletion packages/generic/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",
"mongodb": "^3.6.1",
"sder-core": "https://github.com/Cour-de-cassation/sder-core#f19400e5832d88b48d076b99bbea3e4cfd6803f4",
"sder-core": "https://github.com/Cour-de-cassation/sder-core#8afb44f74c9ffefbbadc6f0d3de0def1c916dcc7",
"typescript": "~4.0.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/generic/backend/src/app/envSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export const envSchema = Joi.object({
DBSDER_API_ENABLED: Joi.boolean().required(),
NLP_PSEUDONYMISATION_API_URL: Joi.string().uri().required(),
NLP_PSEUDONYMISATION_API_ENABLED: Joi.boolean().required(),
JWT_PRIVATE_KEY: Joi.string().required(),
}).unknown();
2 changes: 1 addition & 1 deletion packages/generic/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"sder-core": "https://github.com/Cour-de-cassation/sder-core#f19400e5832d88b48d076b99bbea3e4cfd6803f4",
"sder-core": "https://github.com/Cour-de-cassation/sder-core#8afb44f74c9ffefbbadc6f0d3de0def1c916dcc7",
"string-template": "^1.0.0",
"styled-components": "4.0.3",
"superstatic": "^7.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/generic/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"jest": "24.9.0",
"prettier": "^2.1.2",
"rimraf": "~3.0.2",
"sder-core": "https://github.com/Cour-de-cassation/sder-core#f19400e5832d88b48d076b99bbea3e4cfd6803f4"
"sder-core": "https://github.com/Cour-de-cassation/sder-core#8afb44f74c9ffefbbadc6f0d3de0def1c916dcc7"
}
}
8 changes: 6 additions & 2 deletions packages/generic/core/src/modules/user/lib/authenticator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { buildAuthenticator } from 'sder-core';
import { privateKey } from './privateKey';
import * as dotenv from 'dotenv';

export { authenticator };

const authenticator = buildAuthenticator(privateKey);
if (process.env.RUN_MODE === 'LOCAL') {
dotenv.config();
}

const authenticator = buildAuthenticator(process.env.JWT_PRIVATE_KEY ?? 'local_private_key');
3 changes: 0 additions & 3 deletions packages/generic/core/src/modules/user/lib/privateKey.ts

This file was deleted.

4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15024,9 +15024,9 @@ schema-utils@^2.5.0, schema-utils@^2.6.0, schema-utils@^2.6.1, schema-utils@^2.6
ajv "^6.12.4"
ajv-keywords "^3.5.2"

"sder-core@https://github.com/Cour-de-cassation/sder-core#f19400e5832d88b48d076b99bbea3e4cfd6803f4":
"sder-core@https://github.com/Cour-de-cassation/sder-core#8afb44f74c9ffefbbadc6f0d3de0def1c916dcc7":
version "1.0.0"
resolved "https://github.com/Cour-de-cassation/sder-core#f19400e5832d88b48d076b99bbea3e4cfd6803f4"
resolved "https://github.com/Cour-de-cassation/sder-core#8afb44f74c9ffefbbadc6f0d3de0def1c916dcc7"
dependencies:
bcryptjs "^2.4.3"
jsonwebtoken "^8.5.1"
Expand Down

0 comments on commit bee970f

Please sign in to comment.