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 ...}]
...]
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 base-url token user-id)
Query the CMR Access Control API to get the roles for the given token+user.
Query the CMR Access Control API to get the roles for the given token+user.
(cmr-acl->reitit-acl cmr-acl)
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
.
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`.
(extract-acl-perms cmr-acl)
The canonical ingest management ACL definition.
The canonical ingest management ACL definition.
(roles-key token)
Generate a key to be used for caching role data.
Generate a key to be used for caching role data.
(route-annotation request)
Extract any roles annotated in the route associated with the given request.
Extract any roles annotated in the route associated with the given request.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close