ldap-rest 0.6.1 → 0.7.0
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/dist/config/args.js +1 -1
- package/dist/lib/ldapActions.js +1 -1
- package/dist/plugins/ldap/onChange.js +1 -1
- package/dist/plugins/ldap/organizations.js +1 -1
- package/dist/plugins/scim/bulk.js +1 -1
- package/dist/plugins/scim/errors.js +1 -1
- package/dist/plugins/scim/filter.js +1 -1
- package/dist/plugins/scim/groups.js +1 -1
- package/dist/plugins/scim/list.js +1 -1
- package/dist/plugins/scim/mapping.js +1 -1
- package/dist/plugins/scim/patch.js +1 -1
- package/dist/plugins/scim/projection.js +1 -0
- package/dist/plugins/scim/scim.js +1 -1
- package/dist/plugins/scim/users.js +1 -1
- package/dist/src/config/args.d.ts +3 -0
- package/dist/src/lib/ldapActions.d.ts +26 -0
- package/dist/src/plugins/scim/errors.d.ts +17 -4
- package/dist/src/plugins/scim/filter.d.ts +11 -1
- package/dist/src/plugins/scim/groups.d.ts +2 -0
- package/dist/src/plugins/scim/list.d.ts +3 -5
- package/dist/src/plugins/scim/mapping.d.ts +91 -1
- package/dist/src/plugins/scim/patch.d.ts +16 -1
- package/dist/src/plugins/scim/projection.d.ts +15 -0
- package/dist/src/plugins/scim/scim.d.ts +5 -0
- package/dist/src/plugins/scim/users.d.ts +21 -0
- package/docs/README.md +1 -0
- package/docs/plugin-development/README.md +22 -0
- package/docs/usage/README.md +1 -0
- package/docs/usage/plugins/integrations/scim.md +147 -38
- package/docs/usage/upgrading.md +122 -0
- package/package.json +5 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Upgrading
|
|
2
|
+
|
|
3
|
+
What to check before deploying, newest first. Only releases that need a
|
|
4
|
+
decision or a configuration change appear here; see the
|
|
5
|
+
[CHANGELOG](../../CHANGELOG.md) for everything else.
|
|
6
|
+
|
|
7
|
+
## To 0.7.0
|
|
8
|
+
|
|
9
|
+
### `externalId` on Groups is no longer served
|
|
10
|
+
|
|
11
|
+
**Who is affected:** anyone provisioning Groups from an identity provider and
|
|
12
|
+
reading `externalId` back, or filtering on it.
|
|
13
|
+
|
|
14
|
+
A Group's `externalId` used to answer its `entryUUID`. RFC 7643 section 3.1
|
|
15
|
+
makes `externalId` the _provisioning client's_ identifier, so the id Okta or
|
|
16
|
+
Entra ID sent was discarded on write, and `filter=externalId eq "<their id>"`
|
|
17
|
+
searched `entryUUID` and matched nothing.
|
|
18
|
+
|
|
19
|
+
Name an attribute to store it in:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
--scim-group-external-id-attribute description
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Left unset, `externalId` is simply not supported on Groups — absent from
|
|
26
|
+
answers, and refused in filters. That is the honest behaviour; the previous
|
|
27
|
+
one looked like support and was not.
|
|
28
|
+
|
|
29
|
+
Users are unaffected: theirs was already stored in `employeeNumber`.
|
|
30
|
+
|
|
31
|
+
**Migrating existing Groups.** Values sent before this release were never
|
|
32
|
+
stored, so there is nothing to convert — re-send them from the provisioning
|
|
33
|
+
side once the flag is set.
|
|
34
|
+
|
|
35
|
+
### `active` is now writable, and needs an attribute your directory holds
|
|
36
|
+
|
|
37
|
+
**Who is affected:** every SCIM deployment. Deactivations that used to be
|
|
38
|
+
silently dropped now reach the directory.
|
|
39
|
+
|
|
40
|
+
`active` is modelled on the presence of one LDAP attribute:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
--scim-user-lock-attribute pwdAccountLockedTime # default
|
|
44
|
+
--scim-user-lock-value 000001010000Z # default, "locked forever"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The default is the ppolicy overlay's convention, and **`pwdAccountLockedTime`
|
|
48
|
+
only exists where slapd loads that overlay**. On a directory without it —
|
|
49
|
+
plain OpenLDAP, 389-ds, AD — a deactivation is refused by the schema and
|
|
50
|
+
answers `400 invalidValue` naming the flags. Point them elsewhere:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
--scim-user-lock-attribute nsAccountLock
|
|
54
|
+
--scim-user-lock-value TRUE
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Two configuration mistakes are now refused at startup rather than accepted
|
|
58
|
+
and silently ineffective: naming an attribute without a value, and a name
|
|
59
|
+
that is not an LDAP attribute description. Two more are warned about. See
|
|
60
|
+
[the SCIM plugin documentation](plugins/integrations/scim.md#deactivating-an-account-active) for the
|
|
61
|
+
detail.
|
|
62
|
+
|
|
63
|
+
**Verify once, by hand, that a deactivation actually prevents a bind.**
|
|
64
|
+
Nothing here can check that your directory honours the value you chose:
|
|
65
|
+
`active` is read back from the mere presence of the attribute, so a value the
|
|
66
|
+
directory stores and ignores still reads as `false`.
|
|
67
|
+
|
|
68
|
+
**One deliberate deviation from RFC 7644 section 3.5.1:** a `PUT` that omits
|
|
69
|
+
`active` leaves the lock as it stands rather than clearing it. Clearing it
|
|
70
|
+
would release locks SCIM never set — a ppolicy auto-lockout after failed
|
|
71
|
+
binds, or one an administrator placed — so a routine profile sync would
|
|
72
|
+
defeat the brute-force control. Send `"active": true` to reactivate
|
|
73
|
+
deliberately.
|
|
74
|
+
|
|
75
|
+
### `forRequest()` for plugin authors
|
|
76
|
+
|
|
77
|
+
No action needed to upgrade. If you maintain a plugin that serves HTTP
|
|
78
|
+
requests, `this.server.ldap.forRequest(req)` returns a directory whose methods
|
|
79
|
+
carry the request, so the authorization hooks always see it. The unbound
|
|
80
|
+
methods take the request as a trailing optional argument, and omitting it
|
|
81
|
+
skips every authorization check silently. See the
|
|
82
|
+
[plugin development guide](../plugin-development/README.md#using-ldap-operations).
|
|
83
|
+
|
|
84
|
+
## To 0.6.2
|
|
85
|
+
|
|
86
|
+
### Writes that a bypass was letting through are now refused
|
|
87
|
+
|
|
88
|
+
**Who is affected:** deployments using `core/auth/authzPerBranch` or
|
|
89
|
+
`core/auth/authzLinid1` together with `plugins/ldap/onChange` or
|
|
90
|
+
`plugins/ldap/organizations`.
|
|
91
|
+
|
|
92
|
+
Both plugins rebuilt the hook tuple without the request, which made every
|
|
93
|
+
authorization plugin registered after them skip its check. Every `modify`,
|
|
94
|
+
and every `rename` for the second, went through unchecked.
|
|
95
|
+
|
|
96
|
+
**Check your grants before rolling this out widely.** An identity whose
|
|
97
|
+
grants were never quite right may start seeing `403` where it saw `200`. That
|
|
98
|
+
is the fix, not a regression.
|
|
99
|
+
|
|
100
|
+
Whether a given deployment was exposed was decided by plugin load order,
|
|
101
|
+
which is a race — it could differ from one restart to the next.
|
|
102
|
+
`core/auth/authzDynamic` was never affected: it reads its token from an
|
|
103
|
+
`AsyncLocalStorage` rather than from the request.
|
|
104
|
+
|
|
105
|
+
## To 0.6.1
|
|
106
|
+
|
|
107
|
+
### SCIM reads are authorized
|
|
108
|
+
|
|
109
|
+
**Who is affected:** any SCIM identity granted `write` without `read` on the
|
|
110
|
+
same branch.
|
|
111
|
+
|
|
112
|
+
Every search the SCIM plugin issued omitted the request, so
|
|
113
|
+
`ldapsearchrequest` — the hook the authorization plugins use — skipped its
|
|
114
|
+
check, and any authenticated identity could read any branch the plugin was
|
|
115
|
+
pointed at.
|
|
116
|
+
|
|
117
|
+
**An identity that writes now needs `read` on the same branch.** A SCIM write
|
|
118
|
+
answers with the resource it just changed, so it reads the entry back; a
|
|
119
|
+
grant of `write` without `read` no longer serves a write.
|
|
120
|
+
|
|
121
|
+
`GET /Users`, `GET /Users/{id}` and their Group counterparts answer `403`
|
|
122
|
+
where read is denied.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ldap-rest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Light directory manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Identity-Manager"
|
|
@@ -180,6 +180,10 @@
|
|
|
180
180
|
"types": "./dist/src/plugins/scim/patch.d.ts",
|
|
181
181
|
"import": "./dist/plugins/scim/patch.js"
|
|
182
182
|
},
|
|
183
|
+
"./plugin-scim-projection": {
|
|
184
|
+
"types": "./dist/src/plugins/scim/projection.d.ts",
|
|
185
|
+
"import": "./dist/plugins/scim/projection.js"
|
|
186
|
+
},
|
|
183
187
|
"./plugin-scim-scim": {
|
|
184
188
|
"types": "./dist/src/plugins/scim/scim.d.ts",
|
|
185
189
|
"import": "./dist/plugins/scim/scim.js"
|