Read policies from an external file and add a reload trigger endpoint. #274
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
orinoco/dump-things-service!274
Loading…
Reference in a new issue
No description provided.
Delete branch "external-mapping"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Support loading of policy information from an URL.
The collection configuration may contain a default location for policy information.
A new endpoint (requires CURATOR-token):
allows to trigger loading of a collection from a URL. If the optional parameter
urlis provided, the policy-configuration will be loaded from there. Otherwise, if a default location is configured in the configuration, the policy information will be loaded from the default configuration.Newly loaded policy information will become effective immediately.
This commit removes the configuration keys: - default_policy - policy_annotation_tag - policy_mapping and adds the key: - policy_info_location The key `policy_info_location` optionally contain a URL from which policy information is read. The commit also adds the endpoint GET /management/reload/policy_info/{collection} The endpoint allows to reload policy information from either the configured location of from a location given in the query-parameter `url`. The endpoint requires a CURATOR-token. Policy information is a JSON-representation of a `dump-things-service.abstract_config.PolicyInfo` object. For example: { "default_policy": "abc:policy_abc", "policy_annotation_tag": "https://example.org/dumpthings/policy_set", "policy_mapping": [ { "auth_source": "config", "user_id": "user_all", "authorized_by": [ "abc:policy_abc", "policy_1" ] }, { "auth_source": "some_other_source", "user_id": "test_user_2", "authorized_by": [ "https://examples.com/policy_example_2", "abc:policy_def" ] } ] }