CloudDeploy Permissions: Per‑Parameter Access Control Unresolved
0 reputation · 26 Mar 2025, 02:22 UTC
0 reputation · 26 Mar 2025, 02:22 UTC
The goal is to publish an APIFunction as a CloudObject and enforce that only specific Wolfram IDs can supply certain parameters while others remain unrestricted.
Current documentation shows that the Permissions option on CloudObject applies to the entire object, not to individual parameters. This raises uncertainty about whether fine‑grained access can be achieved without wrapping logic inside the function body.
Key constraints: the Permissions option accepts strings like "Public" or rule lists; there is no documented syntax for parameter‑level rules. The default is private to the deploying account, but does not differentiate between callers for distinct arguments.
Specific questions:
Permissions be specified per APIFunction parameter?No. The Permissions option on CloudObject and APIFunction controls access to the whole deployed object, not to individual parameters. There is no documented syntax for parameter-level permission rules.
CloudDeploy with Permissions applies to the entire CloudObject. Accepted forms are object-wide, e.g. "Public", "Private", or rule lists mapping Wolfram IDs or groups to levels such as "Read" or "Execute".Permissions changes who can invoke the API at all, not which arguments they may supply.APIFunction.Fine-grained control over who may use a specific parameter must be enforced inside the function body. The function runs in the cloud kernel after the object-level permission check passes, so identity inspection there cannot be bypassed by crafting URL query parameters.
Typical pattern:
APIFunction with object-level Permissions that allows all intended callers to invoke it, e.g. Permissions -> {"Execute" -> {"Public"}} or a list of allowed Wolfram IDs.Alternative when strict separation is needed: deploy two CloudObjects. A public variant with only unrestricted parameters and a private/restricted variant with full parameters, each with its own Permissions rules.
Identity symbols such as $RequesterWolframID and exact permission level names are version- and platform-sensitive. Confirm the correct symbol in your Wolfram Language version before relying on it.
Verification steps you can run:
APIFunction that returns the caller identity and call it from two different Wolfram IDs.To give a precise code snippet, which Wolfram Language / Wolfram Cloud version are you targeting? The exact identity symbol and permission names differ by version and change the recommendation.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.