* feat(ldap): [OCISDEV-1031] add opt-in LDAP connection pool
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.
Signed-off-by: Lukas Hirt <info@hirt.cz>
* test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI
Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.
Signed-off-by: Lukas Hirt <info@hirt.cz>
---------
Signed-off-by: Lukas Hirt <info@hirt.cz>
Failures of the thumbnails service were logged at debug level only, so
errors which are not a property of the requested file — such as the
thumbnails service being unreachable — were invisible at production log
levels. A complete preview outage produced HTTP 500 responses without a
single log line explaining them.
Unmapped errors are now logged at error level, while expected per-file
outcomes such as an unsupported file type or a file still being processed
stay at debug level. Two of the four thumbnail handlers also logged
without the request context, so their messages carried no request id.
Also add the missing codesEnum entries for 403, 425 and 429 and fall back
to a generic exception name for any remaining unmapped status code, so
error responses no longer render an empty <s:exception></s:exception>.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* feat(graph): eliminate LDAP read-after-write on create/update
Every graph LDAP create/update wrote the entry, then immediately re-read it
back by DN solely to recover the entry ID for the response model. Against a
replicated directory reached through a proxy, that read-back can hit a lagging
replica and fail or return stale data.
When oCIS generates the UUID itself (GRAPH_LDAP_SERVER_UUID disabled, the
default), the read-back returns nothing new: create responses are now
synthesized from the data already sent, and update responses are built by
folding the applied modifications onto the entry read before the write. When
the directory assigns the ID (GRAPH_LDAP_SERVER_UUID enabled), creates keep the
existing read-back since the generated ID cannot otherwise be recovered.
New ldap_writeback.go with two pure helpers:
- attrsFromAddRequest: flatten an AddRequest for ldap.NewEntry (create paths)
- applyModifyToEntry: fold a ModifyRequest (Replace/Add/Delete,
case-insensitive, non-mutating, ByteValues populated for octet-string id
parity) onto a copy of the pre-read entry (update paths)
All 9 write sites updated:
- creates (user, group, education user/class/school): synthesize when the ID is
client-generated, keep the read-back when the server assigns it
- updates (user, education user): fold the ModifyRequest onto the pre-read
entry; the AccountEnabled trailing override and the rename read-back inside
changeUserName are preserved (rename is out of scope)
- education school update: updateSchoolProperties now returns its ModifyRequest
so the caller can fold it; the displayName ModifyDN rename is folded as a
displayName attribute replace
- education class update: pre-read widened from name/id only to the full
education-class attribute set so classification/externalID are not dropped
from the response; the externalID ModifyDN rename is folded as an attribute
replace
Model builders are untouched, preserving the response shape. Existing update
tests were reconciled: read-back Search mocks that are no longer issued were
removed and the pre-read fixtures now carry the full baseline entry, with all
assertions unchanged.
OCISDEV-1033
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: hardcoded groupAttributeMap.id and wrong getLDAPGroup filter
* fix(graph): reject octet-string IDs without server-assigned UUIDs
Octet-string ID attributes (e.g. Active Directory's objectGUID) are assigned by
the directory server and require GRAPH_LDAP_SERVER_UUID=true. With
GRAPH_LDAP_SERVER_UUID=false oCIS generates the ID and writes it as a string
UUID, so an octet-string ID attribute would be decoded from raw string bytes
and produce a corrupt ID on both the read-back and the synthesize path.
NewLDAPBackend now rejects this incompatible combination at startup instead of
silently returning bad IDs.
Also adds regression tests for the id-attribute and group-name lookup fixes:
- CreateGroup / CreateEducationClass synthesize the response id under the
configured GroupIDAttribute (not a hardcoded attribute name)
- getLDAPGroupByNameOrID filters by the group name attribute, not the user one
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: update the staled DN
* test(graph): assert no read-back by search scope, not hard-coded DN
The synthesize-on-create test matched the read-back on a hard-coded
createdDN whose correctness relied on the school base DN being empty.
Match on ScopeBaseObject instead: DN-independent and precise about the
read-back being eliminated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: fixed calling it with a nil argumets. prevent the slice mutations
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
fix(graph): [OCISDEV-751] return correct issuerAssignedId on /me (#12411)
The /graph/v1.0/me endpoint reported the internal user UUID as
identities[].issuerAssignedId instead of the OIDC sub. The fast path
built the user model from the CS3 context user, which does not carry the
external identity. /me now always resolves the user through the identity
backend; group memberships are still only expanded on $expand=memberOf.
(cherry picked from commit 61a97e162b)
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
Co-authored-by: kobergj <jkoberg@owncloud.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* feat(graph): allow disabling the last sign-in timestamp update (#12522)
* feat(graph): [OCISDEV-1022] allow disabling last sign-in timestamp update
Add a new setting OCIS_LDAP_UPDATE_LAST_SIGNIN_DATE /
GRAPH_LDAP_UPDATE_LAST_SIGNIN_DATE (default true) to disable maintaining the
'oCLastSignInTimestamp' LDAP attribute on user sign-in. When set to false the
graph service no longer listens for UserSignedIn events and does not write the
attribute, without having to disable all LDAP writes or the events consumer.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(changelog): [OCISDEV-1022] fix PR link to 12522
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(graph): [OCISDEV-1022] cover last sign-in toggle; address review
- Add unit test covering both branches of StartListenForLogonEvents
(subscribes when UpdateUserLastSignInDate is enabled, not when disabled).
- Set introductionVersion to 8.2.0.
- Reword the config description: the two settings are independent, the
timestamp is only persisted when OCIS_LDAP_SERVER_WRITE_ENABLED is enabled
rather than the toggle requiring it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Martin <github@diemattels.at>
(cherry picked from commit 49c897e37a)
* chore: bump go-git
* chore: bump crypto
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Martin <github@diemattels.at>
Co-authored-by: Michal Klos <michal.klos@kiteworks.com>
* chore: release 8.0.5
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
* ci: stop publishing release images to Docker Hub
Image build & push now lives in a separate repository. This pipeline keeps
all safety gates (Trivy fs scan, Trivy image scan on the locally-built image,
license check) but no longer logs in or pushes to Docker Hub.
Removes the docker-scan, docker-manifest and docker-readme jobs (all
publish-only or redundant with the docker-build image scan) and the now-unused
docker_repos / is_production plumbing.
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
* fix(idp): bump form-data to 4.0.6 (CVE-2026-12143)
Trivy flagged form-data 4.0.4 (direct dep) and 4.0.5 (via axios) as HIGH
CVE-2026-12143, fixed in 4.0.6. Bump the direct pin and add a pnpm override
so the transitive copy resolves to >=4.0.6 as well.
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
* chore: shorten education-user-delete changelog title
calens enforces an 80-character limit on changelog titles; the existing
title was 98 chars and failed the release changelog generation. Shorten it
and move the endpoint detail into the body.
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
* fix: bump pinned libvips to 8.18.3-r0 in Docker images
The Docker images pin an exact vips version from Alpine's rolling
edge/community repo. 8.18.2-r0 was dropped from edge (replaced by
8.18.3-r0), so the build failed with 'unable to select packages:
vips-8.18.3-r0 breaks world[vips=8.18.2-r0]'. Bump the pin to the
version edge currently ships.
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
* fix: bump Go to 1.25.11 (CVE-2026-42504)
The release image Trivy scan flagged the Go stdlib (v1.25.10) for HIGH
CVE-2026-42504, a MIME header decoding DoS, fixed in 1.25.11. Bump the
go directive in go.mod and the pinned GOLANG_BUILD_IMAGE accordingly.
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
---------
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
* chore: bump high criticality dependencies
Bumps golang.org/x/net to v0.55.0 and golang.org/x/image to v0.41.0 to
clear 8 govulncheck advisories (HTML/IDNA/BMP/TIFF) that started failing
CI on stable-8.0 after the vulnerability database was updated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
* ci: pin node to 24.15.0 to unbreak e2e playwright install
Node 24.16.0 ships a yauzl regression that makes Playwright's post-download
zip extraction hang indefinitely, consuming the entire 6h job budget without
producing any output after the chromium download finishes.
Backported from master, see microsoft/playwright#40724.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
* fix(graph): [OCISDEV-964] education user delete uses wrong id
DeleteEducationUser called the LDAP backend with user.GetExternalID(),
while the regular /users handler and the pre-v8.0 code path used
user.GetId(). With the default RequireExternalID=false, the LDAP backend
looked up the user by name-or-UUID, so the externalID never matched, the
LDAP entry was never removed, and the response was a 404.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
---------
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: [OCISDEV-873] *WithoutTrashbin space editor roles render files read-only in Web frontend (#12346)
* fix: [OCISDEV-873] *WithoutTrashbin space editor roles render files as read-only in Web frontend
* fix: ci after godata bump
ocis CI bumped github.com/CiscoM31/godata from v1.0.10 → v1.0.11 as a transitive dependency of the reva bump. The new godata version parses "mail add 10 (invalid operator) as a parse error → 400 instead of unsupported operation → 501.
* fix ci: more precise role
* fix: bump reva to pull fix merged into reva
The space management middleware removed users from all project spaces
when processing signed URL requests because no OIDC claims are present
in that auth context. Return early when claims are nil to prevent the
oscillating add/remove cycle.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
OnlyOffice sends a WOPI Lock request on document open regardless of whether
the user has write access. The Lock handler was calling SetLock with a
read-only CS3 token, which returned a permission error propagated as HTTP 500
to OnlyOffice, causing an error dialog on load.
Return 200 OK immediately for READ_ONLY and VIEW_ONLY view modes without
acquiring a CS3 lock.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
Adds a new space membership role "Can edit" that allows creating, uploading,
downloading, editing, moving and deleting on a space without access to file
versions or the trashbin. Also bumps reva to include the corresponding role
constructor.
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
Add GroupAdditionalObjectClasses config field (env vars
OCIS_LDAP_GROUP_ADDITIONAL_OBJECTCLASSES /
GRAPH_LDAP_GROUP_ADDITIONAL_OBJECTCLASSES) that appends extra
objectClasses when creating groups in LDAP, alongside the existing
primary GroupObjectClass. Applied to both groupToLDAPAttrValues and
CreateLDAPGroupByDN.
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
Instead of trying to download kpop every time, bring in the specific
code that we are using. There is very little code that we are actually
using from kpop so pulling it as a dependency is not really necessary
and it should fix the current CI issues.
The expected translatable message was empty, which caused the
translation system to use the empty key, which contains "weird"
unrelated data.
With the fix, if there is no translatable message, the related output
will remain empty.