You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package hackathon_v2024
import rego.v1
default allow :=false
allow if {
# this policy is applicable to the scope
input.introspectionResult.scope[0] =="hackathon_v2024.10"# the requesting org is part of the care team
care_team_members[requestor_ura]
# the operation on the requested resource is alowed
operation_allowed
}
resource_rights := {"Patient": ["read"]}
operation_allowed if {
http_operations := {
"GET": "read",
"POST": "write",
"PUT": "update",
"DELETE": "delete",
}
operation := http_operations[input.request.http.method]
some allowed_operation in resource_rights[resource_name]
allowed_operation == operation
}
path := input.request.http.path
bsn := regex.find_all_string_submatch_n(`^.*identifier=http://fhir.nl/fhir/NamingSystem/bsn\|(\d+)$`, path, -1)[0][1]
resource_name := regex.find_all_string_submatch_n(`\/([A-Z]\w+)\??`, path, 1)[0][1]
requestor_ura := input.introspectionResult.input_descriptor_constraint_id_map[uracredential_uraNumber]
scope := input.introspectionResult.scope[0]
care_team_members contains identifier if {
# select the care team for the patient with bsn
care_team := [team |
input.resources[_].resourceType =="CareTeam"
input.resources[_].subject.identifier.value == bsn
team := input.resources[_].participant[j]
]
# select the members with an ura as identifier (all organisations) some member in care_team
identifier := member.member.identifier.value
member.member.identifier.system =="$ura"
}
Wat is het doel van de Rego policy en voor wie? Wij praten intern in ons systeem geen Fhir dus heeft het voor ons geen toegevoegde waarde om gebruik te maken van een Rego policy omdat het meer complexiteit met zich meebrengt dan zelf de autorisatie te implementeren.. Zijn er anderen die hier wel directe behoefte aan hebben?
Het doel is standaardisatie van het autorisatieproces bij de bronhouder. Standaardisatie geeft meer flexibiliteit voor het aanpassen van een autorisatie richtlijn. Geeft garanties over de kwaliteit van de implementatie. Geeft duidelijkheid bij het ontwerpen welke "bouwblokken" er beschikbaar zijn bij deelnemers wat het opstellen van een richtlijn vergemakkelijkt. Geeft snellere doorloop bij aanpassingen omdat een bronhouder alleen een nieuwe rego hoeft te accepteren ipv code moet aanpassen. Je kunt op den duur de policy vanuit een centraal punt distribueren.
De voordelen zullen groter worden zich naarmate er meer raadplegers, rollen en ZIBs komen. Hiermee sorteren we voor op plateau 3 van het integraal zorg akkoord: databeschikbaarheid.
Een rego policy is eigenlijk de tegenhanger van een autorisatie credentials.
Rego policy moet voortkomen uit de gemaakte autorisatie afspraken #7
Maakt gebruik van consent en het care team.
Todo:
Overgenomen uit Hackathon documentatie:
Policy (check it out in the playground:
Input:
The text was updated successfully, but these errors were encountered: