File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ request to the app. Briefly:
24
24
curl -H " Authorization: Bearer 49Np9sqkYV4g_FpOQk1p0j1yJlvoHrZm9SVhQt7H2-9" https://alpha-api.sandstorm.io/
25
25
```
26
26
27
+ ## Key Security Consideration
28
+
29
+ API tokens and sharing tokens are essentially the same: Grants of capabilities. This means that an API
30
+ key also allows users to redeem it as a sharing link of the form ` https://sandstorm.example.com/shared/$API_TOKEN ` .
31
+ You must not use the scope of the /apiPath to limit the access granted via an API key. You should use
32
+ ` roleAssignment ` on offer templates, described below, to limit the access granted via an API key.
33
+
27
34
## Configuring an app to permit requests via the API subdomain
28
35
29
36
The handling of inbound HTTP API requests is configured in ` sandstorm-pkgdef.capnp ` . Look for this
@@ -154,9 +161,7 @@ automatically refreshes the IFRAME every 5 minutes.
154
161
155
162
* ` forSharing ` : ** Boolean (optional)** true if this token should
156
163
represent the anonymous user. You can use this to detach the token
157
- from the user who created it. ** Note** that this also allows users
158
- to redeem it as a sharing link of the form
159
- ` https://sandstorm.example.com/shared/$API_TOKEN ` .
164
+ from the user who created it.
160
165
161
166
* ` clipboardButton ` : ** String (optional)** to display a copy-to-clipboard
162
167
button in either the top left or top right corner of the ` IFRAME ` .
You can’t perform that action at this time.
0 commit comments