Skip to content

Commit

Permalink
Move access policies to separated seed
Browse files Browse the repository at this point in the history
  • Loading branch information
ir4y committed Sep 4, 2023
1 parent 62d487f commit d74ffa2
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions zenproject/zrc/system.edn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:zen/desc "Beda EMR"
:services {:seed seed
:seed-fixtures seed-fixtures
:seed-fixtrures-policy access-policies
:repositories repositories}}

seed
Expand All @@ -35,25 +36,7 @@
:secret "secret"}
:patient-questionnaire {:grant_types [:basic]
:secret "secret"}}
:AccessPolicy {:test-wildcard-policy {:engine "allow" :link [{:resourceType "User"}]}
:admin-policy {:engine "allow"
:roleName "admin"}
:patient-role-policy {:engine "allow"
:roleName "patient"}
:public-appointment-policy
{:engine "allow"
:link [{:resourceType "Client" :id "anonymous"}]}
:patient-questionnaire-policy
{:engine "allow"
:link [{:resourceType "Client" :id "patient-questionnaire"}]}
:federated-identity-signin {:engine "json-schema"
:schema {:required ["jwt"]
:properties {:jwt {:required ["iss", "aud", "sub"]
:properties {:iss {:const "https://appleid.apple.com"}
:aud {:enum ["software.beda.emr", "software.beda.fhirmhealth.fhirmhealth"]}
:sub {:type "string"
:minLength 1}}}}}}}
:Practitioner {:admin {:name [{:given ["Alex"], :family "Admin"}]}
:Practitioner {:admin {:name [{:given ["Alex"], :family "Admin"}]}
:practitioner {:name [{:given ["John"], :family "Practitioner"}]}}
:User {:practitioner {:password "password" :fhirUser {:id "practitioner" :resourceType "Practitioner"}}}
:Role {:admin {:name "admin"
Expand Down Expand Up @@ -87,6 +70,28 @@
:resource {:resourceType "Entity" :id "Mapping"}
:enum ["JUTE", "FHIRPath"]}}}}

access-policies
{:zen/tags #{aidbox/service}
:engine aidbox/seed-v2
:resources {:AccessPolicy {:test-wildcard-policy {:engine "allow" :link [{:resourceType "User"}]}
:admin-policy {:engine "allow"
:roleName "admin"}
:patient-role-policy {:engine "allow"
:roleName "patient"}
:public-appointment-policy
{:engine "allow"
:link [{:resourceType "Client" :id "anonymous"}]}
:patient-questionnaire-policy
{:engine "allow"
:link [{:resourceType "Client" :id "patient-questionnaire"}]}
:federated-identity-signin {:engine "json-schema"
:schema {:required ["jwt"]
:properties {:jwt {:required ["iss", "aud", "sub"]
:properties {:iss {:const "https://appleid.apple.com"}
:aud {:enum ["software.beda.emr", "software.beda.fhirmhealth.fhirmhealth"]}
:sub {:type "string"
:minLength 1}}}}}}}}}

encounter-participant-display
{:zen/tags #{aidbox.search-parameter.v1/search-parameter}
:name "participant-display"
Expand Down

0 comments on commit d74ffa2

Please sign in to comment.