cmr.opendap.auth.roles
Roles for CMR OPeNDAP are utilized in the application routes when it is necessary to limit access to resources based on the role of a user.
Roles are included in the route definition along with the route’s handler. For example: ``` [… [“my/route” { :get {:handler my-handlers/my-route :roles #{:admin}} :post …}] …]
admin
(admin base-url token user-id)Query the CMR Access Control API to get the roles for the given token+user.
admin-key
(admin-key token)Generate a key to be used for caching role data.
admin?
(admin? system route-roles token user-id)Check to see if the roles of a given token+user match the required roles for the route.
cached-admin
(cached-admin system token user-id)Look up the roles for token+user in the cache; if there is a miss, make the actual call for the lookup.
cmr-acl->reitit-acl
(cmr-acl->reitit-acl cmr-acl)Documentation forthcoming
echo-management-query
The query formatter used when making a roles query to the CMR Access Control API. Note that only the management ACL is currently supported, and that this maps below to admin.
management-acl
The canonical ingest management ACL definition.
route-annotation
(route-annotation request)Extract any roles annotated in the route associated with the given request.