@synopackageland/cli 0.48.17 → 0.48.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/skills/SKILL.md +14 -0
- package/skills/reference/files.md +37 -0
- package/skills/reference/identity-gateway.md +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.48.19
|
|
4
|
+
|
|
5
|
+
- Skill documents multi-user Apps: administrator scope confirmation first, each user's home as the default destination root with relative subfolders created as that user, and a `SYNO.Core.User.Home` check with a reminder when user home is off
|
|
6
|
+
|
|
7
|
+
## 0.48.18
|
|
8
|
+
|
|
9
|
+
- Skill documents HTTP/HTTPS handling: HTTP stays allowed with no automatic redirect, `identity_gateway.secure_context: required` for Apps that need a secure context, and upstream OIDC callbacks that follow the request scheme instead of a hard-coded https
|
|
10
|
+
|
|
3
11
|
## 0.48.17
|
|
4
12
|
|
|
5
13
|
- install and repair reclaim a stopped Container Manager project left behind by the same package (exact Compose path ownership) before reinstalling; named volumes, data and images are kept, and foreign or active projects stop the install
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -296,6 +296,15 @@ sweep forward the cancel instead of admitting it.
|
|
|
296
296
|
- Wizard support is measured on the test NAS DSM 7.4 via a session-only SSH local
|
|
297
297
|
forward. This is not proof of other DSM releases or full writer/reboot behavior.
|
|
298
298
|
|
|
299
|
+
### Multi-user Apps
|
|
300
|
+
|
|
301
|
+
Multi-user Apps: the administrator confirms the install scope first; each user's
|
|
302
|
+
destination root defaults to their own home with a relative subfolder chosen on
|
|
303
|
+
first use (created by the executor as that user); check the home service with
|
|
304
|
+
`SYNO.Core.User.Home` `get` before relying on it, and when it is off, remind the
|
|
305
|
+
user (administrators get a Control Panel shortcut) instead of enabling it. Read
|
|
306
|
+
`reference/files.md` "Multi-user Apps: home as the default destination root".
|
|
307
|
+
|
|
299
308
|
## 開啟方式
|
|
300
309
|
|
|
301
310
|
原生 App 在 `dsm-package.yaml` 設定 `ui.launch: dsm-window | new-page`。
|
|
@@ -385,6 +394,11 @@ App 不要預設強制 HTTPS。只有使用 secure context 能力(`getUserMedi
|
|
|
385
394
|
fragment 不保留。PortInfo 限管理員,一般使用者呼叫可能被拒或關閉 DSM 視窗;
|
|
386
395
|
一般使用者只顯示說明文字。查不到埠時不猜測、不阻擋說明頁。
|
|
387
396
|
|
|
397
|
+
HTTP 允許,不做自動 HTTP→HTTPS 轉址或自製轉址頁。identity gateway App 需要
|
|
398
|
+
secure context 時宣告 `identity_gateway.secure_context: required`;上游 OIDC
|
|
399
|
+
callback 必須跟隨實際請求的 scheme,不可在上游設定寫死 https。細節見
|
|
400
|
+
[identity-gateway.md](reference/identity-gateway.md) 的「HTTP, HTTPS and redirects」。
|
|
401
|
+
|
|
388
402
|
舊 DSM 分頁可能在其他分頁重新登入後繼續帶舊 `X-SYNO-TOKEN`。對明確宣告
|
|
389
403
|
`effect: read` 的一般 JSON RPC,可用 `createClient({sessionRetry: ...})`
|
|
390
404
|
搭配 `createDsmSession` 的 `refresh(rejectedToken)` 更新 token 後重試一次。
|
|
@@ -132,6 +132,43 @@ sweep forward the cancel instead of admitting it.
|
|
|
132
132
|
|
|
133
133
|
The pinned scope-selection task also binds the protected generation observed before confirmation. The executor compares it under the publish lock and refuses stale tasks, so a retained task cannot replay an older selection after another confirmation.
|
|
134
134
|
|
|
135
|
+
### Multi-user Apps: home as the default destination root
|
|
136
|
+
|
|
137
|
+
When several DSM users use the same App, follow this order:
|
|
138
|
+
|
|
139
|
+
1. **Administrator first.** The administrator enables the delegate and confirms
|
|
140
|
+
the install-selected scope (shares and/or home) with the existing
|
|
141
|
+
PasswordConfirm form. Nothing user-facing writes files before that.
|
|
142
|
+
2. **Home by default.** Each user's destination root defaults to their own home
|
|
143
|
+
(File Station `/home`), not a shared folder that every user must be granted.
|
|
144
|
+
With an active scope that includes home, the backend can call
|
|
145
|
+
`Service.Destination` / `SelectDestination` for `/home` non-interactively on
|
|
146
|
+
the user's fresh DSM session; the executor still verifies session, UID and
|
|
147
|
+
write access. Shares remain an explicit per-user choice in the picker.
|
|
148
|
+
3. **Subfolder under the root.** Treat the destination as a root. On first use,
|
|
149
|
+
show a short confirmation with a suggested relative subfolder (an App-specific
|
|
150
|
+
name) the user can edit; later features (per-rule or per-item folders) use
|
|
151
|
+
further relative paths under the same root. Pass them as the nested
|
|
152
|
+
relative `Name` of `files.moveFromStaging` (for example `Folder/Sub/file.ext`).
|
|
153
|
+
The executor creates missing folders as the user, with the user's owner and
|
|
154
|
+
inherited ACL, never crossing symlinks or mounts. Do not create folders from
|
|
155
|
+
the App identity or as root, and never store absolute `/volumeN/...` paths.
|
|
156
|
+
4. **Check the home service before relying on it.** User home can be disabled
|
|
157
|
+
in Control Panel. Query `SYNO.Core.User.Home` `get` (version 1) with an
|
|
158
|
+
administrator session; `data.enable` is the local home switch
|
|
159
|
+
(`enable_domain` / `enable_ldap` cover directory users). Run the check in the
|
|
160
|
+
background and do not block the page. For a non-administrator, treat a
|
|
161
|
+
refused `/home` selection (no home in the user's own share view) as "home is
|
|
162
|
+
off".
|
|
163
|
+
5. **Home off: remind, never enable.** Do not enable the home service
|
|
164
|
+
automatically. Administrators get the reason, a button that opens Control
|
|
165
|
+
Panel > User & Group > Advanced, and Retry. Other users see that the
|
|
166
|
+
administrator must enable user home, and may pick another allowed folder
|
|
167
|
+
in the meantime. Re-check on Retry and on next start.
|
|
168
|
+
|
|
169
|
+
Each user only sees and writes folders their own DSM account can write; the App
|
|
170
|
+
never widens access, and files from different users never share a grant.
|
|
171
|
+
|
|
135
172
|
## Container mounts
|
|
136
173
|
|
|
137
174
|
Containers use a fixed package identity and never inherit the signed-in user's File Station ACL. Mount grants are distinct from user destination grants. Per-user file access requires a session/Broker Adapter, outside this change. Read [compose.md](compose.md); official ACL/project control remains blocked.
|
|
@@ -90,6 +90,28 @@ also apply: Cloudflare edge enforces the zone's upload limit, and long
|
|
|
90
90
|
responses need heartbeats within 60 seconds; use SSE or
|
|
91
91
|
`Cache-Control: no-transform` for streaming.
|
|
92
92
|
|
|
93
|
+
## HTTP, HTTPS and redirects
|
|
94
|
+
|
|
95
|
+
HTTP is allowed. Do not add an automatic HTTP→HTTPS redirect, a custom
|
|
96
|
+
redirect page or a forced-HTTPS upstream setting. The gateway shows the
|
|
97
|
+
existing HTTP warning; HTTPS behavior is unchanged.
|
|
98
|
+
|
|
99
|
+
Declare `identity_gateway.secure_context: required` only when the App truly
|
|
100
|
+
needs a secure context (WebCrypto `subtle`, `getUserMedia`, Service Worker,
|
|
101
|
+
clipboard, strict upstream Origin checks). It works for Compose and standalone
|
|
102
|
+
gateways; any value other than `required` fails `check`. HTTP top-level
|
|
103
|
+
navigations then get a localized HTTPS-required page with a user-operated
|
|
104
|
+
"Open using HTTPS" link and no automatic redirect; HTTP API, resource and
|
|
105
|
+
iframe requests get 403 `https_required`. The HTTPS port comes from DSM's own
|
|
106
|
+
declaration; when none is found, the page shows text guidance and never
|
|
107
|
+
guesses a port. See the CLI's `docs/path-ingress.md`.
|
|
108
|
+
|
|
109
|
+
Upstream OIDC callbacks and generated absolute URLs must follow the scheme of
|
|
110
|
+
the actual request. Never hard-code `https` in upstream settings (for example a
|
|
111
|
+
scheme override or a default-protocol variable set to https): sign-in over HTTP
|
|
112
|
+
then fails with a redirect_uri mismatch. Let upstream detect HTTPS through its
|
|
113
|
+
trusted proxy header instead. Test sign-in over both HTTP and HTTPS.
|
|
114
|
+
|
|
93
115
|
## Per-request OIDC browser origins (development)
|
|
94
116
|
|
|
95
117
|
`oidc.browser_redirect: {}` opts into per-request browser origins for SDK/CLI
|