Compare commits

...
80 Commits
Author SHA1 Message Date
ishabaral 44d1413ec5 build(deps): bump pnpm dependencies 2026-08-10 11:45:56 +05:45
Gaurav Soni 07f2a8bba9 fix(web): [OCISDEV-996] truncate long resource names instead of overlapping the next column (#12754)
fix(web): [OCISDEV-996] truncate long resource names instead of overlapping next column

Add `min-width: 0` to `.oc-resource` so the inline-flex item can shrink
below its content width. Without it the automatic min-content floor kept
the element at full name width, painting the name over the adjacent
column's value. The existing `oc-text-truncate` rule on the name span can
now take effect and truncate with an ellipsis at the column boundary.

Most visible in the Spaces overview, where a long space name overlapped
the "Manager" column, but it affected every resource table using the name
column, including the files list and search results.
2026-08-07 16:22:30 +02:00
kobergj 1d70560428 feat(storage-users): add recalculate-treesize command (#12746)
feat(storage-users): [OCISDEV-1203] add recalculate-treesize command

The treesize of a directory is maintained as a running counter that is updated
on every change, so a failed or incomplete update leaves the counter wrong and
the reported quota usage of a space drifts from the data on disk. Removing a node
without propagating the size change leaves its size counted against the quota
with no way to reclaim it.

Add a command that walks a space bottom up, recalculates the treesize of every
directory from the actual size of its children and corrects the stored values:

    ocis storage-users spaces recalculate-treesize --space-id <id>

As with the other maintenance commands --dry-run defaults to true, so the
command reports what it would change until explicitly told to write.

Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2026-08-07 15:16:12 +02:00
Matteo 3da140042c fix(web): remove focus from file name in app top bar (#12752)
The open file name in the top bar was tabbable via keyboard even
though it is not clickable, which was confusing during keyboard
navigation.
2026-08-07 12:48:50 +00:00
Gaurav Soni f975f00120 fix(web): [OCISDEV-1168] open files whose name contains a hash or question mark (#12740)
Cmd+Clicking or middle-clicking a file with a `#` or `?` in its name opened the
space root instead of the file, and the top bar showed the space name rather than
the file name. The file's path is carried in a route parameter which the router
percent-encodes when it builds the URL, but the editor route was resolved twice
and resolving twice does not encode twice: the second pass rebuilt the URL from
the still-decoded parameter with the encoding step skipped. The browser then read
everything from the `#` onward as a fragment, discarding the query string along
with the `fileId` needed to identify the file. Left clicks were unaffected because
they never leave the app.

Editor routes are now handed to links unresolved, so the file name is encoded
exactly once and survives both a new tab and an in-app navigation. Hash and
question mark remain valid characters in file names.
2026-08-07 12:41:34 +02:00
Matteo e1ee0d01ef chore(web): update dep js-yml to 4.3.1 (#12747) 2026-08-07 11:17:29 +02:00
owncloud-translations-bot[bot] d498d9b42d chore: update translations from transifex (#12743)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-08-07 09:28:00 +02:00
isha 40d257726a [test-only][k8s]test(ci): run test on kubernetes deployment (#12654)
* test(ci): run test on k8s deployment

* chore: update authapp in config

* chore: update storageusers in config

* chore: update version and envs

* chore: normalize service name
2026-08-07 11:31:05 +05:45
Prajwol Amatya 42cb013e8f [tests-only] test: search resources in vault (#12685)
* test: search resources in vault

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add test to search using content and tags

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add tika service for vault tests

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

---------

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-08-07 09:11:49 +05:45
kobergj 003e8cddb8 fix(storage-users): add --orphaned upload session filter (#12739)
Bump reva to pick up the fix for upload sessions whose node metadata can no
longer be read. Such sessions can never finish postprocessing, stay in
processing state indefinitely and keep consuming the quota of their space.
Cleaning them previously removed the uploaded bytes without releasing the quota.

Wire up the new Orphaned session filter so operators can list the affected
sessions and remove them with --clean:

    ocis storage-users uploads sessions --orphaned
    ocis storage-users uploads sessions --orphaned --clean

Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2026-08-06 15:00:09 +02:00
owncloud-translations-bot[bot] 8011fcb7e6 chore: update translations from transifex (#12736)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-08-06 10:21:04 +00:00
Michal Klos c1457168c3 feat: [OCISDEV-1032] ldap config and retry policy (#12724)
* feat: [OCISDEV-1032] ldap config and retry policy (#12672)

* feat: ldap config and retry policy

Co-authored-by: Roman Perekhod <2403905@gmail.com>
# Conflicts:
#	go.mod
#	go.sum
#	services/graph/pkg/config/config.go
#	services/graph/pkg/service/v0/service.go
#	vendor/modules.txt

# Conflicts:
#	services/graph/pkg/service/v0/service.go

* test: e2e ldap

# Conflicts:
#	.github/workflows/acceptance-tests.yml

# Conflicts:
#	.github/workflows/acceptance-tests.yml

* test: e2e ldap distributed

# Conflicts:
#	.github/workflows/acceptance-tests.yml

* fix: post rebases build error
2026-08-06 12:15:36 +02:00
Nalem7 78313a52fe [tests-only] add for spaceEditorWithoutVersionsWithoutTrashbin role (#12681)
test: add for spaceEditorWithoutVersionsWithoutTrashbin role

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
2026-08-06 11:49:34 +05:45
Matteo 092be75ca0 Fix/ocisdev 1165/resource with same name gets prefix on share (#12730)
* feat: bump reva

Bumps reva to 441d6e77b33d, pulling in the vault/non-vault share
mountpoint collision fix, decomposedfs DisableVersioning aspect
handling, ChunkHandler.Assemble/scan fields, and LDAP retry policy
config. Also picks up the transitive nats-server, grpc, go-sqlite3
and antithesis-sdk-go bumps from reva's go.mod.

* docs: add changelog for vault share mountpoint collision fix

Documents the reva fix (owncloud/reva#691) that stops resources shared
under the same name from vault and non-vault mountpoints from getting
a spurious (1) suffix.
2026-08-06 07:19:09 +02:00
Lukas Hirt 1a43d7ddc0 feat(web): [OCISDEV-840] apply Kiteworks branding to theme (#12464)
Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-08-06 07:16:44 +02:00
Matteo f1dbac418b fix(web): use centralized vault detection for nav labels (#12729)
The Files app nav labels checked window.location.pathname directly,
which missed hash-based vault routes and the post-login redirect
target, so labels didn't always reflect vault state.
2026-08-05 20:37:40 +02:00
dependabot[bot] 19c1cd2fa2 build(deps): bump the minor-and-patch group across 1 directory with 3 updates (#12728)
Bumps the minor-and-patch group with 3 updates in the / directory: [github.com/gabriel-vasile/mimetype](https://github.com/gabriel-vasile/mimetype), [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) and [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal).


Updates `github.com/gabriel-vasile/mimetype` from 1.4.13 to 1.4.15
- [Release notes](https://github.com/gabriel-vasile/mimetype/releases)
- [Commits](https://github.com/gabriel-vasile/mimetype/compare/v1.4.13...v1.4.15)

Updates `github.com/open-policy-agent/opa` from 1.18.2 to 1.19.0
- [Release notes](https://github.com/open-policy-agent/opa/releases)
- [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-policy-agent/opa/compare/v1.18.2...v1.19.0)

Updates `github.com/rogpeppe/go-internal` from 1.15.0 to 1.16.0
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/gabriel-vasile/mimetype
  dependency-version: 1.4.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: github.com/open-policy-agent/opa
  dependency-version: 1.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: github.com/rogpeppe/go-internal
  dependency-version: 1.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 20:31:43 +02:00
Lukas Hirt fc34bd9824 feat(ldap): [OCISDEV-1031] add opt-in LDAP connection pool (#12689)
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>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <info@hirt.cz>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <info@hirt.cz>

docs: point changelog fragment at forward-port PR #12689
2026-08-05 17:57:48 +02:00
Matteo 1745797d2b fix(web): use correct color variable for group icon in share list (#12722)
The group icon in the share collaborator autocomplete list referenced a
removed CSS variable, making it invisible. Switch to the current default
text color variable.
2026-08-05 16:20:13 +02:00
Ward Pieters 4390b44b02 fix(oidc): respect (no) proxy env vars in OIDC HTTP client (#12703)
fix(oidc): respect HTTP(S)_PROXY and NO_PROXY env vars in OIDC HTTP client
2026-08-05 14:55:13 +02:00
Martin 0acfcb4040 fix: correct introduction version of new envvar (#12720) 2026-08-05 10:20:08 +00:00
Martin 3a98e41689 docs: Update README.md (#12717)
The readme contained a mistyped link -- fixed.
2026-08-05 09:27:23 +02:00
owncloud-translations-bot[bot] 3b7d0006a7 chore: update translations from transifex (#12718)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-08-05 09:01:50 +02:00
Pradip Subedi 58a0bd9dea [tests-only][full-ci] test(cli): add blobstore get and check CLI tests (#12505)
* test(cli): add blobstore check and get CLI test scenarios

* ci: add get blob step

* test(cli): add valid blob size, --path, by-ID, and malformed path blobstore tests

* test: include round-trip verifications

* test: swap check assertions from exact-match to substring-contains
2026-08-05 12:08:59 +05:45
Nalem7 afa8790227 [tests-only] add graph API tests for password change re-authentication (#12664)
test: add graph API tests for password change re-authentication

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
2026-08-05 11:46:39 +05:45
Gaurav Soni 2ea716aea4 [OCISDEV-492] Space image not uploaded if larger than 7MB (#12701)
fix(graph): [OCISDEV-492] reject space images too large to be rendered

Setting a space image larger than the thumbnails service accepts appeared
to succeed but never changed the space image. Uploading the file and
assigning it as the space image are two separate requests, and both
completed successfully, so clients reported success. Only a later preview
request, which the assigning client never observes, was rejected because
the image exceeded THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE. As space images
are rendered exclusively as thumbnails, the image was not merely degraded,
it was invisible with no error anywhere in the UI.

The graph service now stats the file when a space image is assigned and
rejects the request with 413 Request Entity Too Large instead of storing a
reference which cannot be displayed. The previous space image is left
untouched. The limit is read from the new GRAPH_MAX_IMAGE_FILE_SIZE
setting, which defaults to the value of
THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE so that a single setting keeps both
services in agreement. A limit of zero disables the check. Space
descriptions (readme) are not affected.
2026-08-04 14:29:11 +02:00
Matteo 4ba02000fa fix: bump reva to allow space managers to remove others' shares (#12705)
* fix: bump reva to allow space managers to remove others' shares

Space managers with the RemoveGrant permission on a resource could not
remove user shares created by other users; the share manager only allowed
the share's creator to remove it. This bumps reva to the commit that fixes
Unshare to also honor the RemoveGrant permission.

* fix(l10n): route gotext.Locale calls through func fields to satisfy go vet

Bumping reva pulled in reva's go 1.26 requirement, and go 1.26's stricter
printf vet analyzer now sees through the OcisLocale interface to flag
gotext.Locale.Get as a printf-wrapper, breaking go test across 5 packages.
Forwarding through func fields hides that static trail from vet.
2026-08-04 13:42:08 +02:00
ishaandMatteo 0e591928c8 chore: update brace expansion package (#12714)
* build(deps): bump pnpm dependencies

* chore(deps): update fast-uri to 3.1.5

---------

Co-authored-by: Matteo <matteo.sonnenholzner@kiteworks.com>
2026-08-04 15:38:36 +05:45
owncloud-translations-bot[bot] 09299e4ab0 chore: update translations from transifex (#12712)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-08-04 07:41:26 +00:00
Roman PerekhodandClaude Opus 4.8 604a680a03 feat: [ocisdev-1033] forward port (#12709)
* 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

* chore: tests

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-03 17:51:59 +03:00
owncloud-translations-bot[bot] 6d1d0590e2 chore: update translations from transifex (#12614)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-08-03 09:39:59 +02:00
David WalterandClaude Opus 4.8 5a23c88296 feat(invitations): configurable Keycloak required actions and working ocis_full SMTP (#12467)
* feat(invitations): configurable Keycloak actions + working ocis_full SMTP

The invitations service already triggers Keycloak execute-actions-email after
provisioning a guest (service.Invite -> backend.SendMail ->
gocloak.ExecuteActionsEmail). Two things still limited it:

- The required actions were hardcoded to UPDATE_PASSWORD,VERIFY_EMAIL. They are
  now configurable via INVITATIONS_KEYCLOAK_EXECUTE_ACTIONS (comma-separated,
  same default). Unknown actions are logged and skipped, and the service falls
  back to the defaults if none remain valid so a guest always has a setup path.

- The Keycloak realm shipped with the ocis_full example had an empty smtpServer,
  so Keycloak silently dropped every mail it tried to send, including the guest
  invitation mail. The realm now points SMTP at the bundled mailpit
  (mailserver:1025).

Verified: execute-actions-email delivers to mailpit against the ocis_full realm;
go test ./services/invitations/... ./ocis-pkg/keycloak/... -race passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David Walter <david.walter@kiteworks.com>

* fix(invitations): return the created user as invitedUser in the response

service.Invite echoed the request body unchanged, leaving the invitedUser
relation of the Graph invitation response empty, so a client could not learn
the identity of the guest that was just created. The keycloak backend now
records the created user (OWNCLOUD_ID, email, user type) on the invitation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David Walter <david.walter@kiteworks.com>

* refactor(invitations): pass Keycloak actions through verbatim (no allowlist)

Address review (@kobergj): the configured execute-actions no longer need to
match a hardcoded enum. UserAction is now a string type passed to Keycloak
as-is, so operators can configure any required action their Keycloak supports
without oCIS keeping a list in sync. The convenience constants remain, the
default (UPDATE_PASSWORD, VERIFY_EMAIL) is unchanged, and validation is left to
Keycloak. Removes UserActionFromString and the two lookup maps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: David Walter <david.walter@kiteworks.com>

---------

Signed-off-by: David Walter <david.walter@kiteworks.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-31 15:54:23 +02:00
Matteo ebda376ae1 fix(web): [OCISDEV-136] sync .psec pointer file on password-protected folder rename (#12684)
Renaming a password-protected folder did not update its `.psec` pointer
file, so the main file listing kept showing the old name. This happened
both when renaming via the hidden `.PasswordProtectedFolders` location
and when renaming from inside the folder-view modal, where an unsynced
rename left the pointer permanently stale.

Renaming the real folder now also renames its `.psec` counterpart. Inside
the folder-view modal, the framed public-link session notifies the parent
window at the moment of rename, so the pointer stays in sync even without
clicking Close.
2026-07-31 07:01:39 +02:00
Roman PerekhodandMartin Mattel 1a32e4d8c5 chore: [OCISDEV-1021] Add audience restriction for OIDC access tokens (#12634)
* chore: Add audience restriction for OIDC access tokens

* fix: add new envvar to added table

Signed-off-by: Martin Mattel <github@diemattels.at>

* fix: add updated env_vars.yaml file

* chore: var name to plural. update config

---------

Signed-off-by: Martin Mattel <github@diemattels.at>
Co-authored-by: Martin Mattel <github@diemattels.at>
2026-07-30 15:22:36 +03:00
kobergjandClaude Opus 5 1cfce945bb fix(graph): [OCISDEV-1088] fix concurrent map access in share listing (#12670) (#12674)
The errgroup workers converting CS3 shares into Graph DriveItems read from
the shared driveItems map while the collecting loop was already writing
results into the same map. The results channel is buffered, so workers never
blocked on the handover and the collecting loop started writing while workers
were still reading. The Go runtime aborts the process on a detected
concurrent map read and write, which is unrecoverable and dropped all
in-flight connections.

Collect the results after all workers have finished instead. Applies to
cs3UserSharesToDriveItems, cs3OCMSharesToDriveItems and
cs3PublicSharesToDriveItems, which all shared the same pattern.

Lowering OCIS_MAX_CONCURRENCY/GRAPH_MAX_CONCURRENCY was not a workaround: a
single worker still ran concurrently with the collecting loop.


(cherry picked from commit 2922769be9)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 09:25:48 +02:00
Matteo 5d4f19a9c4 feat: use file shield icon instead of balance for software license (#12669) 2026-07-30 09:18:29 +02:00
Prajwol Amatya d6bc1e2400 [tests-only] test: add test to add user to space in vault storage (#12610)
test: add test to add user to space

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-07-30 12:07:41 +05:45
Matteo 8afeec9c5b feat(web): add epub library view (#12648) 2026-07-29 09:59:08 +02:00
kobergjandClaude Opus 5 0450a0d6aa fix(webdav): log unmapped thumbnail errors at error level (#12663) (#12668)
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>.


(cherry picked from commit 6950f47885)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 21:01:01 +02:00
Prajwol Amatya 91f0671153 [tests-only] test: add test to copy resources from drive to vault and from vault to drive (#12576)
test: add test to copy resources from drive to vault and vice versa

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-07-28 14:23:42 +05:45
Gaurav Soni 898f89c697 fix(admin-settings): prevent deleting your own account (#12657)
In the user management, the account you are currently logged in as could
be selected and included in a delete action, even though the backend
always rejects self-deletion. Deleting a selection that included your own
account produced a "Failed to delete 1 user" error and made your own row
temporarily disappear from the list until the page was refreshed.

The delete action now excludes the current user from the request, so all
other selected users are deleted while your own account is left
untouched. When your own account is part of the selection, the delete
confirmation dialog shows a hint that it will not be deleted.
2026-07-27 16:04:11 +02:00
Matteo b708076e67 enhancement(web): [OCISDEV-1085] add undo action to delete notification (#12650)
feat(web): [OCISDEV-1085] add undo action to delete notification

Adds an "Undo" action to the delete success toast so users can restore
deleted resources without navigating to the trash bin, plus a Ctrl+Z/Cmd+Z
shortcut that triggers the same restore while the notification is visible.
2026-07-27 13:42:15 +02:00
Juan Pablo Villafañez 8dc7afc07c [OCISDEV-969] fix: ocis_multi deployment with proper ldap groups (#12466)
fix: ocis_multi deployment with proper ldap groups
2026-07-27 11:13:39 +02:00
Matteo 7dcc74c3dd fix(idp): announce sign-in errors and fix keyboard use (#12649) 2026-07-27 08:22:44 +00:00
Matteo e70497b49c chore: update brace expansion package (#12653) 2026-07-27 09:22:24 +02:00
Matteo b395d08db6 fix(web): remove unneeded keyboard focus stops (#12645)
Icons and date columns in tables received keyboard focus without
triggering any action, and the contextual helper icon duplicated its
button's label.
2026-07-24 22:57:51 +02:00
Matteo 1d16dd9e1e fix(web): focus New/Upload dropdown menus on open (#12646)
The New and Upload button dropdowns did not receive focus when opened,
so arrow key navigation between menu items didn't work, unlike the
context menu.
2026-07-24 22:50:02 +02:00
Michal Klos 86fa96362a feat: [OCISDEV-855] receivedsharecache: retry on transient storage errors in CAS loop (#12621) 2026-07-24 19:43:46 +02:00
Matteo f005d68eae fix(web): stop breadcrumb items from being announced twice (#12643)
Each breadcrumb list item had tabindex="0", putting it in the
keyboard/screen reader focus order alongside the link or button
nested inside it, causing every segment to be announced twice.
2026-07-24 12:23:56 +02:00
Matteo d68b53c6d8 chore: improve theme color contrast (#12642) 2026-07-24 11:29:55 +02:00
Matteo f8b861c723 enhancement(web): show select-all checkbox label in tile view (#12640)
feat(web): show select-all checkbox label in tile view

Make the select-all checkbox label visible in the tile view to match
the list view and make the checkbox's purpose clear.
2026-07-24 11:29:49 +02:00
Matteo 8b675b2e51 fix(web): improve contrast of form controls in dark and vault themes (#12639)
Fixes low-contrast sliders, switches, select highlights, and the global
search input/placeholder, including an !important override that blocked
theme-specific search colors and an invalid CSS var() fallback.
2026-07-24 11:29:37 +02:00
kobergjandClaude Opus 4.8 9f72d77bfc fix(graph): [OCISDEV-751] return correct issuerAssignedId on /me (#12431)
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.

Forward-port of #12411 to master.

Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:37:09 +02:00
Matteo 30009ff770 enhancement(web): add missing main/footer regions and fix skip-to-main link (#12637)
feat: add missing main/footer regions and fix skip-to-main link

Add missing main and footer elements to the 404, private/public link
resolving, missing-config, logout, and access-denied pages, and fix the
skip-to-main link which silently did nothing on plain-layout pages due
to a missing target id and a stale cached DOM reference.
2026-07-23 14:08:21 +00:00
Matteo 50141f471b fix(web): preserve focus in file versions sidebar (#12630)
- Keep keyboard and screen-reader focus inside the versions sidebar while panels transition or reload.
- Restore focus to the opening control when the sidebar closes and to the matching Restore action after a version is restored.
- Improve version date and action announcements without introducing duplicate announcements or additional tab stops.

Signed-off-by: Matteo <matteo.sonnenholzner@kiteworks.com>
2026-07-23 13:44:02 +02:00
dependabot[bot] d65f3fc215 build(deps): bump the minor-and-patch group across 1 directory with 12 updates (#12607)
Bumps the minor-and-patch group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/beevik/etree](https://github.com/beevik/etree) | `1.6.0` | `1.7.0` |
| [github.com/coreos/go-oidc/v3](https://github.com/coreos/go-oidc) | `3.19.0` | `3.20.0` |
| [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) | `5.3.0` | `5.3.1` |
| [github.com/go-ldap/ldap/v3](https://github.com/go-ldap/ldap) | `3.4.13` | `3.4.14` |
| [github.com/kovidgoyal/imaging](https://github.com/kovidgoyal/imaging) | `1.8.22` | `1.8.23` |
| [google.golang.org/grpc](https://github.com/grpc/grpc-go) | `1.82.0` | `1.82.1` |



Updates `github.com/beevik/etree` from 1.6.0 to 1.7.0
- [Release notes](https://github.com/beevik/etree/releases)
- [Changelog](https://github.com/beevik/etree/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/beevik/etree/compare/v1.6.0...v1.7.0)

Updates `github.com/coreos/go-oidc/v3` from 3.19.0 to 3.20.0
- [Release notes](https://github.com/coreos/go-oidc/releases)
- [Commits](https://github.com/coreos/go-oidc/compare/v3.19.0...v3.20.0)

Updates `github.com/go-chi/chi/v5` from 5.3.0 to 5.3.1
- [Release notes](https://github.com/go-chi/chi/releases)
- [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-chi/chi/compare/v5.3.0...v5.3.1)

Updates `github.com/go-ldap/ldap/v3` from 3.4.13 to 3.4.14
- [Release notes](https://github.com/go-ldap/ldap/releases)
- [Commits](https://github.com/go-ldap/ldap/compare/v3.4.13...v3.4.14)

Updates `github.com/kovidgoyal/imaging` from 1.8.22 to 1.8.23
- [Release notes](https://github.com/kovidgoyal/imaging/releases)
- [Commits](https://github.com/kovidgoyal/imaging/compare/v1.8.22...v1.8.23)

Updates `golang.org/x/crypto` from 0.53.0 to 0.54.0
- [Commits](https://github.com/golang/crypto/compare/v0.53.0...v0.54.0)

Updates `golang.org/x/image` from 0.43.0 to 0.44.0
- [Commits](https://github.com/golang/image/compare/v0.43.0...v0.44.0)

Updates `golang.org/x/net` from 0.56.0 to 0.57.0
- [Commits](https://github.com/golang/net/compare/v0.56.0...v0.57.0)

Updates `golang.org/x/sync` from 0.21.0 to 0.22.0
- [Commits](https://github.com/golang/sync/compare/v0.21.0...v0.22.0)

Updates `golang.org/x/term` from 0.44.0 to 0.45.0
- [Commits](https://github.com/golang/term/compare/v0.44.0...v0.45.0)

Updates `golang.org/x/text` from 0.38.0 to 0.40.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.38.0...v0.40.0)

Updates `google.golang.org/grpc` from 1.82.0 to 1.82.1
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.82.0...v1.82.1)

---
updated-dependencies:
- dependency-name: github.com/beevik/etree
  dependency-version: 1.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: github.com/coreos/go-oidc/v3
  dependency-version: 3.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: github.com/go-chi/chi/v5
  dependency-version: 5.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: github.com/go-ldap/ldap/v3
  dependency-version: 3.4.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: github.com/kovidgoyal/imaging
  dependency-version: 1.8.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/crypto
  dependency-version: 0.54.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/image
  dependency-version: 0.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/net
  dependency-version: 0.57.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/sync
  dependency-version: 0.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/term
  dependency-version: 0.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/text
  dependency-version: 0.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: google.golang.org/grpc
  dependency-version: 1.82.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-22 08:19:45 +00:00
dependabot[bot] 1256793012 build(deps): bump qs from 6.14.2 to 6.15.2 in /web (#12623)
Bumps [qs](https://github.com/ljharb/qs) from 6.14.2 to 6.15.2.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.2...v6.15.2)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.15.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-22 09:49:50 +02:00
Lukas Hirt cdcabdb527 chore(web): upgrade vue3-gettext from 2.4.0 to 4.0.1 (#12622)
Migrates all v-translate directive usages to $gettext() calls since
v4 removes the deprecated <translate> component/directive entirely
and silently drops such strings during extraction. Also drops the
now-unsupported disableHtmlEscaping positional argument from ~40
call sites (v4 no longer HTML-escapes interpolated values; none of
the affected strings are rendered via v-html) and removes the pnpm
patch that only backported a types export field v4 now ships
natively.

Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-07-21 15:40:24 +00:00
2f70a6856f build(deps): Bump dependencies (#12620)
* build(deps): bump pnpm dependencies

* style(web): format code with prettier

Signed-off-by: Lukas Hirt <info@hirt.cz>

* test(web): update ActivitiesPanel snapshot for dompurify/happy-dom sanitization change

The dependency bump upgraded dompurify to 3.4.3+, which combined with
happy-dom's DOM implementation drops a leading <strong> tag that is the
first sanitized child node. Real browsers are unaffected; only the
happy-dom test snapshot needed updating.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Signed-off-by: Lukas Hirt <info@hirt.cz>
Co-authored-by: Lukas Hirt <info@hirt.cz>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 16:20:30 +02:00
Matteo eb06e23a09 fix: restore hover feedback lost to background-highlight/default collision (#12613)
The Light/Dark High-Contrast themes set colorPalette.background-highlight
equal to background-default, making hover backgrounds indistinguishable
from the resting page background wherever background-highlight was used
for interactive feedback (e.g. the global search results dropdown). The
non-high-contrast Dark theme had the same collision.

Set background-highlight to the same value as background-hover in those
theme blocks, and point SearchBar's result-preview hover/active state and
CreateShortcutModal's context-menu hover/active state at
--oc-color-background-hover directly, since background-highlight is
otherwise used for static surfaces (cards, modals, form fields) rather
than interaction feedback.
2026-07-20 15:18:17 +02:00
owncloud-settings-bot[bot] 604cb5a069 chore: add CODEOWNERS (managed by owncloud/admin) (#12604)
Co-authored-by: owncloud-settings-bot[bot] <291027677+owncloud-settings-bot[bot]@users.noreply.github.com>
2026-07-20 10:26:43 +02:00
owncloud-translations-bot[bot]andMartin 6361b52b7f chore: update translations from transifex (#12606)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
Co-authored-by: Martin <github@diemattels.at>
2026-07-20 08:03:38 +00:00
Matteo 5e7ce5c7de fix: resolve e2e violations in web UI (#12597)
- OcBreadcrumb: add `inert` to truncation placeholder <li> so its
  focusable <a> child is unreachable (fixes aria-hidden-focus)
- OcTable: remove aria-hidden from header cell span and fall back to
  field.name so icon/avatar columns always have discernible text
  (fixes empty-table-header)
- Plain layout: wrap router-view in <main> so login/public-link pages
  have a landmark (fixes region violations)
- SidebarNav: change root element to <aside> with aria-label so the
  versions div is inside a landmark (fixes region violations)
- web-app-ocm App: change root element to <main> (fixes region)
- Add v-if="pageTitle" to sr-only <h1> in 6 components so empty
  headings are never rendered (fixes empty-heading)
- Disable aria-allowed-role in search dropdown check — axe 4.11
  incorrectly rejects <li role="group"> inside <ul role="listbox">
  which is valid per ARIA 1.2
- Disable label rule in Application.open() check for pages that may
  transiently render Keycloak's OTP setup form
- Remove stale post-navigation check in createFileFromTemplate
  sidebar branch (sidebar is unmounted before check runs)
2026-07-20 06:36:49 +02:00
owncloud-translations-bot[bot] 63b0cdda0e chore: update translations from transifex (#12601)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-07-17 13:03:10 +02:00
owncloud-translations-bot[bot]andMartin 31ccffa99c chore: update translations from transifex (#12575)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
Co-authored-by: Martin <github@diemattels.at>
2026-07-16 09:07:38 +00:00
Lukas Hirt 5f1dbeca53 fix: [OCISDEV-1001] restrict group member data to authorized users (#12573)
The groups API could return group membership details to callers who
should not have had access to it via the single-group GET endpoint.
Access to group member data is now properly restricted based on the
caller's permissions.

Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-07-16 10:24:17 +02:00
Prajwol Amatya 5eb6366a6c [test-only] test: add test to check vault mode capabilities endpoint response (#12571)
* test: add test to check vault mode capabilities endpoint response

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add cleanup for Keycloak related configs after each test

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: use ocs version 2

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

---------

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-07-15 14:12:08 +05:45
Prajwol Amatya 53fa0f0691 [tests-only][full-ci] test: set custom auth level names (#12548)
test: add test to set custom auth level names

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-07-15 11:27:47 +05:45
Lukas Hirt c3a6f52502 fix: [OCISDEV-785] harden embed mode delegated authentication origin validation (#12572)
Hardened origin validation for the delegated authentication feature in
Web's embed mode.

Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-07-14 18:53:06 +02:00
Firas Frikha 2ed2f8697b FIX[OCISDEV-809]: encrypt viewOnlyToken (#12558)
fix(OCIDDEV-809): encrypt viewOnlyToken in the WOPI token
2026-07-14 11:33:46 +02:00
owncloud-translations-bot[bot]andMartin 7c87568713 chore: update translations from transifex (#12568)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
Co-authored-by: Martin <github@diemattels.at>
2026-07-14 10:39:24 +02:00
Prajwol Amatya b265241288 [tests-only][full-ci] test: add tests related to vault storage (#12482)
* test: test setup for vault storage

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add test to create file and folder in vault storage

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add test to check acr value from jwt token

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: setup vault storage in ci

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: update extraServerEnvironment

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: setup playwright

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: set keycloak true

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add env KC_URL

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add ignore https errors

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: check url

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: setup vault storage

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add test to check drive and vault resource isolation

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: add test to check drive and vault resource isolation

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: store selectors in variable

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

---------

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-07-14 10:53:02 +05:45
Michal Klos 7b284878f5 fix: flaky coreApiShare (#12565) 2026-07-13 18:26:48 +02:00
Michal KlosandRoman Perekhod c20900419e fix: CI, release pipeline fixes from 8.2-rc.1 (#12562)
* fix: fix CI (#12551)

* fix(ci): disable docker release jobs like in 8.1

The docker-build/manifest/readme jobs were enabled in 8.2 and wired into
create-github-release/audit-release. They fail at docker/login-action
("Username and password required") because DockerHub credentials are not
available, which cascades and cancels the whole release.

Restore the 8.1 behavior: re-add `if: false` to the docker jobs and unwire
them from the downstream release jobs.

* fix(ci): reinstall web deps in license-check job

Excluding web from the generated-code artifact (#12557, to avoid OOM on
upload) also dropped web/node_modules, which provides the
license-checker-rseidelsohn binary used by `make ci-node-check-licenses`.
The job failed with "license-checker-rseidelsohn: not found".

Run `pnpm install` in web before the license check so its node_modules is
present again.

---------

Co-authored-by: Roman Perekhod <2403905@gmail.com>
2026-07-13 17:58:04 +02:00
Martin bfda167e31 docs: remove orphaned ocisstoreservice value (#12564) 2026-07-13 15:33:50 +00:00
owncloud-translations-bot[bot] 77560da057 chore: update translations from transifex (#12555)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-07-13 14:01:55 +02:00
Lukas Hirt ad9ccdc93b ci: exclude web when uploading generated code (#12556)
The release workflow is running out of memory when uploading the generated code.
This fixes it by excluding the web directory. The web directory is not needed because the build is handled via the generation.

Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-07-13 10:12:57 +00:00
Matteo 5bf887a570 Chore/fix e2e violation (#12526)
* fix(e2e): resolve admin-settings general spec violations

- prevent focusable elements inside hidden breadcrumb items
- make OcDrop tippy role configurable, default to none
- wait for logo-wrapper element after page reload in e2e

* fix(e2e): resolve admin-settings groups spec violations

- add aria-label to the icon-only groups filter-confirm button, which
  had no name for screen readers to announce
- set reducedMotion on e2e browser contexts so notification fade-in
  animations don't race axe scans and produce false color-contrast
  failures
- fix tippbBox selector typo (-> tippyBox) that made the scan on the
  group context menu throw instead of running
- fix groupList and editPanel selectors in the shared selector map:
  groupList pointed at a nonexistent class, and editPanel used the
  non-standard :visible pseudo-selector which is invalid in native
  querySelectorAll

* fix(e2e): skip tooltip fade transition under reduced motion

Plain tooltips (v-oc-tooltip) use tippy.js's default fade animation
and default #333/#fff colors, driven by tippy's own duration option
rather than a CSS transition. Setting reducedMotion on the Playwright
browser context does not stop this, since tippy's animation ignores
prefers-reduced-motion on its own. Axe scans could catch the tooltip
mid-fade, when the text is still low-opacity, and report a false
color-contrast violation. Now the duration is forced to 0 when the
media query matches, mirroring how oc-fade-in already handles this
for CSS-driven animations.

* fix(e2e): resolve officeSuites spec progressbar violation and test bugs

- add aria-label to the global loading progress bar, which had no name
- point the space quota progress bar at its existing text label via
  aria-labelledby instead of leaving it unnamed
- fix a string-literal-instead-of-variable typo, an XPath selector that
  axe can't use (only CSS), and a scan that ran after clicking closed
  the element it was targeting, all in the public link test helpers
- move the create-document-modal scan to after the modal actually
  opens, since it was scanning too early and finding nothing

* fix(e2e): resolve app-store details spec contrast violation and scan bug

- override md-editor-v3's default link and inline-code colors in the
  read-only markdown preview, which didn't meet WCAG AA contrast
  against the app card background
- point the download-app a11y scan at the app list page instead of a
  details-page selector that isn't present on that page, a leftover
  from copying the sibling download-version helper

* fix(e2e): resolve participantManagement pagination spec violations

- patch vue-select to render aria-controls on its combobox toggle,
  which it already computed internally but never attached to the
  element with role="combobox"
- add aria-label to the account menu quota bar and upload progress
  bar, both missing a name on their progressbar role, same gap fixed
  earlier in LoadingIndicator/SpaceQuota
- add aria-label to the file-details preview-loading spinner, which
  rendered role="img" with an empty aria-label
- stop scanning the sidebar actions panel in deleteResource after it
  was already closed, which made the scan throw instead of running

* fix(e2e): add missing aria-label to hide-share quick action button

The icon-only hide/unhide-share button in the shared-with-me table had
a tooltip but no aria-label, so it had no accessible name. Reused the
label already computed for the tooltip instead of duplicating it.

* fix(e2e): fix sidebarPanel selector typo in downloadResources

Used the string 'sidebarPanel', which isn't a key in the shared a11y
selector map, so it fell through to being used as a literal (and
broken) CSS selector. Switched to the existing appSidebar key, which
resolves to the same #app-sidebar selector already used for this
concept elsewhere.

* fix(e2e): add accessible name to markdown editor's content area

md-editor-v3's underlying CodeMirror instance renders its editable
content div with role="textbox" but no accessible name, and the
library exposes no prop to pass one through. Set aria-label on it
directly after mount, since that's the only available hook.

* fix(e2e): fix users-filter button label and navigate scan selector

- add aria-label to the icon-only users search/filter-confirm button,
  the same button-name gap already fixed for the groups page
- fix Users.navigate scanning appSidebar, which isn't rendered until a
  sidebar panel is actually opened; switched to scanning body, matching
  the working pattern already used by Groups.navigate

* fix(e2e): fix global search dropdown ARIA structure and scan bugs

- restructure the search results listbox so its direct children are
  valid group/option roles instead of plain nested <li>/<ul>, fixing
  aria-required-children/parent, list, and listitem violations
- give the loading/no-results states no listbox role at all, since
  they're informational text rather than actual options
- give the listbox an accessible name via the existing search label
- fix the icon-only "search options" listbox missing aria-controls
  becoming null instead of a static string when the dropdown isn't
  rendered
- add a disableRules option to assertNoSevereA11yViolations, using it
  for two narrow, investigated cases: search-result rows render a real
  <a href> so native middle-click/ctrl-click "open in new tab" keeps
  working (nested-interactive can't be satisfied without removing
  that), and a checkbox nested in a clickable filter-list button that
  would otherwise lose its only accessible selection-state indicator
- fix the same aria-controls transient-timing gap in two more call
  sites that hit it after a route change (closing the editor, opening
  any app via the app switcher)

* fix(e2e): fix low contrast search input in select combobox

vue-select's vendor CSS dims the search input to 20% opacity while
searching but not yet open, dropping text contrast to 1.51:1 against
the required 4.5:1. Override the opacity back to 1 for that state.

* fix(e2e): add labels to app gallery navigation buttons

The prev/next/set-image buttons in the app details image gallery only
render a decorative icon with no text or label, leaving them with no
discernible name for screen reader users.

* fix(e2e): add label to clear-clipboard button in files app bar

The clear-clipboard button next to "Paste here" only renders a
decorative close icon with no text or label, leaving it with no
discernible name for screen reader users.

* fix(e2e): add label to generic app-loading spinner

The spinner shown while an external app is loading has no aria-label,
leaving the role="img" element with no accessible name even though a
visually-hidden "Loading app" text already exists right next to it.

* fix(e2e): add label to GDPR export loading spinner

The spinner shown while the GDPR export status is loading has no
aria-label, leaving the role="img" element with no accessible name.

* fix(e2e): fix combobox aria attributes in create shortcut modal

The suggestion dropdown had no explicit toggle target, so tippy fell
back to the input wrapper div and set aria-expanded on an element with
no ARIA role. Point the drop at the actual input and give it proper
combobox semantics.

* fix(e2e): fix users filter checkbox-button scan and delete selector bug

Suppress the already-accepted checkbox-in-button nested-interactive
rule at the two roles filter scan sites in filterUsers, matching the
pattern used elsewhere for the same ItemFilter.vue markup. Also fix a
string-literal selector in deleteUserUsingContextMenu that was never
actually calling util.format, so axe scanned for a nonexistent element.

* fix(e2e): resolve admin-settings spaces spec violations

- replace removed #files-toggle-sidebar with the "Show details" button
  (that button now opens the sidebar in one click; selecting via the
  checkbox first would toggle the space off when Show details toggles it on)
- fix broken scan selectors: 'appSidebarDiv' -> 'appSidebar' (not a key in
  the selectors map, was silently falling through to the literal string);
  'tippyBox' -> 'ocModal' at the confirm-action scan (the modal is what's
  actually rendered there, not a tippy); 'filesView' -> 'adminSettingsWrapper'
  in performSpaceAction (this runs on the admin-settings page, not files)
- wrap transitionend waits in Promise.all with their triggering click, so
  the listener attaches before the transition begins - otherwise a near-
  instant transition (under prefers-reduced-motion: reduce, enabled by an
  earlier fix in this branch) can finish before the listener binds and
  the wait never resolves, hanging the "list members via sidebar" test

* fix(e2e): mark kindergarten journey test as slow

The journey performs 16 downloads plus shares and deletes, each cycling
the sidebar with a11y scans, and consistently runs 3-4 minutes even in
isolation - past the default 180s timeout. When the deadline hits, the
axe scan in flight fails with "Target page, context or browser has been
closed" from a different call site each run.

test.slow() triples the timeout to 540s, the idiomatic Playwright hint
for legitimately long journey tests.

* fix(e2e): add aria-label to create-user button when icon-only

When admin-settings shrinks to a limited-width viewport, the create-user
button collapses to icon-only and its visible text label is hidden. The
tooltip already switches to the accessible name in that mode; mirror
that on aria-label so the button retains an accessible name in the
collapsed state (WCAG 4.1.2).

* fix(e2e): import expect in crashPage step helpers

expectCrashPageHasNoAccessibilityViolations uses expect() but the
import only included Page - the file wouldn't compile if that helper
was referenced anywhere.

* fix(e2e): pass selector variables to admin-settings users a11y scans

Four call sites passed string keys ('loginToggleWithDropdown',
'loginDropDown', 'groupsModalInput') that don't exist in the shared
selectors map - assertNoSevereA11yViolations' fallback then used those
literal strings as raw CSS selectors, matching nothing, so axe threw
"No elements found for include" instead of actually scanning. Same
class of bug as the earlier 'tippbBox'/'sidebarPanel'/'linkUpdateDialog'
fixes in this branch.

Switched to passing the local const variables directly, which resolve
to the real CSS selectors defined in the same file.

* fix(e2e): scan notifications dropdown container instead of message list

Both notification-related scans passed notificationItemsMessages, which
is a selector that matches multiple elements (one per notification). axe
throws on multi-match includes. Switched to notificationsDrop, the
single container that wraps the message list.

* fix(e2e): wait for link-update dialog before scanning it

Four call sites (changeRole, changeName, addExpiration, deleteLink) ran
assertNoSevereA11yViolations on the linkUpdateDialog notification right
after the action that triggers it, without waiting for the notification
to actually appear - axe would race and sometimes scan before the DOM
was there.

Also fixed copyLinkToClipboard: previously scanned '.snackbar' (which
doesn't exist in this codebase) unconditionally; now waits for the
linkUpdateDialog and scans it, or for the password-protected-folder
case, waits inside the iframe and scans the iframe locator instead
(mirroring the pattern already used by open() in utils/sidebar.ts).

* fix(e2e): scan iframe locator for password-protected-folder sidebar

Two scans in the passwordProtectedFolder branch were pointed at
top-level page selectors ('tippyBox', the plain sidebarPanel const)
but that sidebar lives inside its own iframe (#iframe-folder-view),
not on the top-level page - so axe found nothing to scan and threw.

Switched to scanning the iframe locator itself. In open()'s post-open
scan, made the target conditional so the non-iframe branch keeps
scanning #app-sidebar as before.

* fix(e2e): drop premature tippyBox scan before more-options dropdown opens

createShare scanned the tippyBox before clicking showMoreOptionsButton,
but the tippy isn't in the DOM yet at that point - the click on the
button is what opens it. The second scan a couple of lines below runs
after the click, when the dropdown is actually rendered, which is the
only place the scan belongs.

* fix(e2e): scan body in shared createSpace instead of #files-view

createSpace is invoked from both the Files app spaces view (which has
#files-view) and the admin-settings spaces page (which has
#admin-settings-wrapper instead) - scanning a single view-specific
root failed in one of the two callers. Scan the always-present body
so both callers work.

* fix(e2e): make resource-action a11y scans robust to timing and view mode

- clickResource: it's used for both folder navigation (breadcrumb
  appears) and file-open (navigates away into a viewer/editor with no
  breadcrumb). The unconditional post-click scan of 'breadcrumb' timed
  out on file opens. Wait for the breadcrumb with a 5s cap and skip
  the scan when it never appears.
- createNewFolder: was scanning 'filesSpaceTable' which only exists in
  table view. Scan the view-mode-agnostic 'filesView' wrapper instead.
- downloadResources / pasteResource / moveOrCopyResource: add waitFor
  on the target selector before axe scans it, otherwise axe can race
  and scan before the DOM updates from the preceding click.

* fix(web-app-app-store): fix TS2322 type error in AppImageGallery aria-label
2026-07-13 07:50:03 +02:00
owncloud-translations-bot[bot] fa077e7eeb chore: update translations from transifex (#12553)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-07-12 14:40:50 +00:00
owncloud-translations-bot[bot] 382d95a3eb chore: update translations from transifex (#12552)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-07-11 13:04:53 +02:00
888 changed files with 56730 additions and 64476 deletions

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: ownCloud GmbH - A Kiteworks Company and ownCloud contributors
# SPDX-License-Identifier: Apache-2.0
#
# Managed by owncloud/admin — edit codeowners/ownership.yml, not this file.
# Generated by scripts/sync-codeowners.py. Last matching pattern wins.
* @owncloud/ocis-maintainers
+99 -1
View File
@@ -217,6 +217,7 @@ jobs:
- apiOcm
# collaboration (needs WOPI)
- apiCollaboration
- apiVault
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -314,6 +315,41 @@ jobs:
- name: Run ${{ matrix.suite }}
run: BEHAT_SUITES="${{ matrix.suite }}" python3 tests/acceptance/run-github.py
ldap-pool-tests:
needs: [build-and-test]
name: ldapPool-${{ matrix.suite }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite:
- apiGraphUser,apiGraph,apiGraphGroup
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip, ldap, gd
tools: composer
- name: Install libvips runtime
run: |
sudo apt-get update -qq
# NEEDRESTART_MODE=a: auto-restart services silently; without this, needrestart can fail with exit code 6
sudo NEEDRESTART_MODE=a apt-get install -y libvips42t64
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ocis-build-artifacts
- name: Restore binary permissions
run: chmod +x ocis/bin/ocis tests/ociswrapper/bin/ociswrapper
- name: Run ${{ matrix.suite }} with OCIS_LDAP_POOL_ENABLED=true
run: BEHAT_SUITES="${{ matrix.suite }}" OCIS_LDAP_POOL_ENABLED=true python3 tests/acceptance/run-github.py
core-api-tests:
name: ${{ matrix.suite }}
needs: [build-and-test]
@@ -694,8 +730,70 @@ jobs:
- name: Run WOPI validator (cs3)
run: python3 tests/acceptance/run-wopi.py --type cs3
external-ldap-tests:
name: external-ldap-smoke
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
# web/idp assets must be embedded for `ocis server` to come up (same as run-github.py)
- name: Generate assets
run: make ci-node-generate
- name: Build oCIS
run: make -C ocis build
# Boots an external osixia LDAP + oCIS (embedded idm excluded) and runs the
# smoke scope against the graph API — exercises the external-directory
# read-after-write / retry path (OCISDEV-1030/1032/1033) that the embedded-idm
# acceptance jobs never hit.
- name: Run external-LDAP smoke
run: tests/ldap-smoke/run.sh
external-ldap-distributed-tests:
name: external-ldap-distributed-smoke
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
# web/idp assets must be embedded for `ocis server` to come up (same as run-github.py)
- name: Generate assets
run: make ci-node-generate
- name: Build oCIS
run: make -C ocis build
# Distributed LDAP topology (proxy over an async syncrepl replica + write master);
# the replication lag exercises the retry / read-after-write path (OCISDEV-1030/1032/1033).
- name: Run external-LDAP distributed smoke
run: tests/ldap-smoke-distributed/run.sh
all-acceptance-tests:
needs: [detect-changes, local-api-tests, cli-tests, core-api-tests, litmus, cs3api, wopi-builtin, wopi-cs3, e2e-tests]
needs: [detect-changes, local-api-tests, cli-tests, ldap-pool-tests, core-api-tests, litmus, cs3api, wopi-builtin, wopi-cs3, e2e-tests, external-ldap-tests, external-ldap-distributed-tests]
runs-on: ubuntu-latest
if: always()
steps:
+271
View File
@@ -0,0 +1,271 @@
name: Acceptance Tests K8S
on:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 1 * * *"
env:
PHP_VERSION: "8.4"
K3D_VERSION: "v5.8.3"
HELM_VERSION: "v3.18.4"
TEST_SERVER_URL: https://ocis-server
STORAGE_DRIVER: ocis
OCIS_WRAPPER_URL: http://localhost:5200
K8S: true
jobs:
api-tests:
name: ${{ matrix.suite }}-k8s
runs-on: ubuntu-26.04
if: >-
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.title || '', 'k8s'))
strategy:
fail-fast: false
matrix:
include:
- suite: apiContract
- suite: apiLocks
- suite: apiSettings
# - suite: apiNotification
- suite: apiCors
- suite: apiGraphUser
- suite: apiGraph
- suite: apiGraphGroup
# - suite: apiSpaces
- suite: apiSpacesShares
- suite: apiSpacesDavOperation
- suite: apiDownloads
- suite: apiAsyncUpload
- suite: apiDepthInfinity
- suite: apiArchiver
- suite: apiActivities
- suite: apiSearch1
- suite: apiSearch2
# - suite: apiSearchContent
- suite: apiSharingNgShares
- suite: apiReshare
- suite: apiSharingNgPermissions
- suite: apiSharingNgAdditionalShareRole
- suite: apiSharingNgDriveInvitation
# - suite: apiSharingNgItemInvitation
- suite: apiSharingNgDriveLinkShare
- suite: apiSharingNgItemLinkShare
- suite: apiSharingNgLinkShareManagement
- suite: apiAuthApp
# - suite: apiAntivirus
- suite: apiOcm
# - suite: apiCollaboration
# - suite: "coreApiAuth,coreApiCapabilities,coreApiFavorites,coreApiMain,coreApiVersions"
- suite: "coreApiShareManagementBasicToShares,coreApiShareManagementToShares"
- suite: "coreApiSharees"
- suite: "coreApiSharePublicLink2"
- suite: "coreApiShareOperationsToShares1,coreApiShareOperationsToShares2,coreApiSharePublicLink1,coreApiShareCreateSpecialToShares1,coreApiShareCreateSpecialToShares2,coreApiShareUpdateToShares"
- suite: "coreApiTrashbin,coreApiTrashbinRestore,coreApiWebdavEtagPropagation1,coreApiWebdavEtagPropagation2"
- suite: "coreApiWebdavDelete,coreApiWebdavOperations,coreApiWebdavMove2"
- suite: "coreApiWebdavProperties"
# - suite: "coreApiWebdavMove1,coreApiWebdavPreviews,coreApiWebdavUpload,coreApiWebdavUploadTUS"
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup PHP ${{ env.PHP_VERSION }}
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: ${{ env.PHP_VERSION }}
extensions: curl, xml, mbstring, zip, ldap, gd
tools: composer
- name: Download k3d
run: |
curl -L \
-o k3d \
https://github.com/k3d-io/k3d/releases/download/${{ env.K3D_VERSION }}/k3d-linux-amd64
echo "dbaa79a76ace7f4ca230a1ff41dc7d8a5036a8ad0309e9c54f9bf3836dbe853e k3d" | sha256sum --check
chmod +x k3d
sudo mv k3d /usr/local/bin/
k3d version
- name: Install Helm
run: |
curl -fsSL -o helm-${{ env.HELM_VERSION }}-linux-amd64.tar.gz https://get.helm.sh/helm-${{ env.HELM_VERSION }}-linux-amd64.tar.gz
tar -zxvf helm-${{ env.HELM_VERSION }}-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/helm
helm version --short
- name: Prepare hosts
run: |
echo "127.0.0.1 ocis-server clamav email collabora onlyoffice fakeoffice tika federation-ocis-server" \
| sudo tee -a /etc/hosts
- name: Spin up K3d Cluster
run: make -C tests/config/k8s create-cluster
- name: Prepare Helm Charts & Deploy oCIS
env:
ENABLE_ANTIVIRUS: ${{ matrix.suite == 'apiAntivirus' }}
ENABLE_EMAIL: ${{ matrix.suite == 'apiNotification' || matrix.suite == 'apiSettings' || matrix.suite == 'apiOcm' }}
ENABLE_TIKA: ${{ matrix.suite == 'apiSearchContent' }}
ENABLE_WOPI: ${{ matrix.suite == 'apiCollaboration' }}
ENABLE_OCM: ${{ matrix.suite == 'apiOcm' }}
ENABLE_AUTH_APP: ${{ matrix.suite == 'apiAuthApp' }}
run: |
cd tests/config/k8s
make prepare-charts
kubectl get pods -n ocis-server -Aw &
make deploy-ocis
if [[ "${{ matrix.suite }}" == "apiOcm" ]]; then
OCM=true make prepare-charts
OCM=true make deploy-ocis
fi
- name: Deploy Suite-Specific External Backends
run: |
if [[ "${{ matrix.suite }}" == "apiNotification" || \
"${{ matrix.suite }}" == "apiSettings" || \
"${{ matrix.suite }}" == "apiOcm" ]]; then
docker run -d \
-p 1025:1025 \
-p 8025:8025 \
--name mailpit \
axllent/mailpit:v1.22.3
bash tests/config/k8s/expose-external-svc.sh email:1025
fi
if [[ "${{ matrix.suite }}" == "apiAntivirus" ]]; then
docker run -d \
-p 3310:3310 \
--name clamav \
owncloudci/clamavd
bash tests/config/k8s/expose-external-svc.sh clamav:3310
fi
if [[ "${{ matrix.suite }}" == "apiSearchContent" ]]; then
docker run -d \
-p 9998:9998 \
--name tika \
apache/tika:3.2.2.0-full
bash tests/config/k8s/expose-external-svc.sh tika:9998
fi
- name: Wait for oCIS to be ready
env:
FILE_URL: ${{ env.TEST_SERVER_URL }}/remote.php/dav/files/admin/hello1.txt
run: |
kubectl wait \
--namespace ocis-server \
--for=condition=Available \
deployment \
--all \
--timeout=10m
kubectl wait \
--namespace ocis-server \
--for=condition=Ready \
pod \
--all \
--timeout=10m
kubectl get pods -n ocis-server
echo "Creating test file in oCIS..."
request() {
local method=$1
shift
curl -ks -o /dev/null -w "%{http_code}" \
-X "$method" \
-u admin:admin \
"$@" \
"$FILE_URL"
}
retry_http() {
local expected=$1
shift
for i in {1..30}; do
status=$("$@")
if [ "$status" = "$expected" ]; then
echo "Succeeded (HTTP $status)"
return 0
fi
echo "Attempt $i failed (HTTP $status), retrying in 10s..."
sleep 10
done
echo "Failed after 30 attempts"
return 1
}
put_file() {
request PUT \
-H "Content-Type: text/plain" \
--data "Hello from GitHub Actions!"
}
delete_file() {
request DELETE
}
echo "Creating test file..."
retry_http 201 put_file || exit 1
echo "Deleting test file..."
retry_http 204 delete_file || exit 1
- name: Expose debug ports
run: bash tests/config/k8s/expose-debug-svc.sh
- name: Build ociswrapper
run: make -C tests/ociswrapper/
- name: Start ociswrapper
run: |
tests/ociswrapper/bin/ociswrapper serve \
--url ${{ env.TEST_SERVER_URL }} \
--admin-username admin \
--admin-password admin \
--skip-ocis-run \
-n ocis-server &
- name: Prepare expected failures
if: startsWith( matrix.suite, 'core' )
env:
EXPECTED_FAILURES_FILE: tests/acceptance/expected-failures-API-on-OCIS-storage.md
WITH_REMOTE_PHP: "false"
run: |
if [[ "$WITH_REMOTE_PHP" != "true" ]]; then
cat tests/acceptance/expected-failures-without-remotephp.md >> \
"$EXPECTED_FAILURES_FILE"
fi
- name: Run API ${{ matrix.suite }} tests
if: startsWith( matrix.suite, 'api' )
env:
TEST_SERVER_URL: ${{ env.TEST_SERVER_URL }}
TEST_SERVER_FED_URL: https://federation-ocis-server
STORAGE_DRIVER: ${{ env.STORAGE_DRIVER }}
BEHAT_SUITES: ${{ matrix.suite }}
BEHAT_FILTER_TAGS: "~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage"
EXPECTED_FAILURES_FILE: tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
OCIS_WRAPPER_URL: ${{ env.OCIS_WRAPPER_URL }}
COLLABORATION_SERVICE_URL: http://ocis-server:9304
K8S: ${{ env.K8S }}
run: make test-acceptance-api
- name: Run Core ${{ matrix.suite }} tests
if: startsWith( matrix.suite, 'core' )
env:
TEST_SERVER_URL: ${{ env.TEST_SERVER_URL }}
OCIS_REVA_DATA_ROOT: ""
STORAGE_DRIVER: ocis
BEHAT_FILTER_TAGS: "~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage"
BEHAT_SUITES: ${{ matrix.suite }}
ACCEPTANCE_TEST_TYPE: core-api
EXPECTED_FAILURES_FILE: tests/acceptance/expected-failures-API-on-OCIS-storage.md
UPLOAD_DELETE_WAIT_TIME: "0"
OCIS_WRAPPER_URL: ${{ env.OCIS_WRAPPER_URL }}
WITH_REMOTE_PHP: "false"
K8S: ${{ env.K8S }}
run: make test-acceptance-api
+17 -13
View File
@@ -109,9 +109,11 @@ jobs:
path: |
.
!.git
!web
retention-days: 1
docker-build:
if: false
name: docker-build (${{ matrix.arch }}, ${{ matrix.repo }})
runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
needs: [determine-release-type, generate-code, security-scan-trivy]
@@ -125,8 +127,8 @@ jobs:
with:
name: generated-code
path: .
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -152,7 +154,7 @@ jobs:
printf "tags<<EOF\n%s\nEOF\n" \
"${REPO}:${VERSION}-linux-${ARCH}" >> $GITHUB_OUTPUT
- id: build
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: ocis
file: ocis/docker/Dockerfile.linux.${{ matrix.arch }}
@@ -165,7 +167,7 @@ jobs:
VERSION=${{ needs.determine-release-type.outputs.version }}
tags: ${{ steps.tags.outputs.tags }}
- id: trivy
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
continue-on-error: true
with:
image-ref: ${{ steps.tags.outputs.tags }}
@@ -196,7 +198,7 @@ jobs:
repo: ${{ fromJSON(needs.determine-release-type.outputs.docker_repos) }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
- uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
id: trivy
continue-on-error: true
with:
@@ -217,6 +219,7 @@ jobs:
exit 1
docker-manifest:
if: false
name: docker-manifest (${{ matrix.repo }})
runs-on: ubuntu-latest
needs: [determine-release-type, docker-build, docker-scan]
@@ -224,7 +227,7 @@ jobs:
matrix:
repo: ${{ fromJSON(needs.determine-release-type.outputs.docker_repos) }}
steps:
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -242,6 +245,7 @@ jobs:
"${{ matrix.repo }}:${{ needs.determine-release-type.outputs.version }}-linux-arm64"
docker-readme:
if: false
name: docker-readme (${{ matrix.repo }})
runs-on: ubuntu-latest
needs: [determine-release-type, docker-manifest]
@@ -289,7 +293,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
- uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
scan-type: fs
format: table
@@ -313,6 +317,10 @@ jobs:
with:
go-version-file: go.mod
- run: npm install --silent -g yarn npx "pnpm@$PNPM_VERSION" --force
# web is excluded from the generated-code artifact (see generate-code) to
# avoid OOM on upload, so its node_modules — which provides the
# license-checker-rseidelsohn binary — must be reinstalled here.
- run: cd web && pnpm install
- run: make ci-node-check-licenses && make ci-node-save-licenses
- run: make ci-go-check-licenses && make ci-go-save-licenses
- run: tar -czf third-party-licenses.tar.gz -C third-party-licenses .
@@ -347,7 +355,7 @@ jobs:
create-github-release:
runs-on: ubuntu-latest
needs: [determine-release-type, build-binaries, license-check, generate-changelog, security-scan-trivy, docker-readme]
needs: [determine-release-type, build-binaries, license-check, generate-changelog, security-scan-trivy]
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
@@ -378,10 +386,6 @@ jobs:
needs:
- determine-release-type
- generate-code
- docker-build
- docker-scan
- docker-manifest
- docker-readme
- build-binaries
- security-scan-trivy
- license-check
@@ -405,7 +409,7 @@ jobs:
python3 scripts/audit-release.py \
--version "${{ needs.determine-release-type.outputs.version }}" \
--dir release-assets/ \
--github-release --docker
--github-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -102,7 +102,7 @@ Before starting to set up an instance, we **highly** recommend reading the [Prer
### Use the Official Documentation
See the [Install Infinite Scale on a Server](https://doc.owncloud.com/ocis/next/depl-examples/ubuntu-compose/ubuntu-compose-prod.html) for a production ready deployment starting with a Raspberry Pi, a single server or VM.
See the [Install Infinite Scale on a Server](https://doc.owncloud.com/ocis/next/admin/depl-examples/ubuntu-compose/ubuntu-compose-prod.html) for a production ready deployment starting with a Raspberry Pi, a single server or VM.
### Use the ocis Repo as Source
@@ -0,0 +1,15 @@
Bugfix: Prevent deleting your own account in the user management
In the admin settings user management, the account you are currently logged in
as could be selected and included in a delete action, even though the backend
always rejects self-deletion. Deleting a selection that included your own
account produced a "Failed to delete 1 user" error and made your own row
temporarily disappear from the list until the page was refreshed.
The delete action now excludes the current user from the request, so all other
selected users are deleted while your own account is left untouched. When your
own account is part of the selection, the delete confirmation dialog shows a
hint that it will not be deleted.
https://github.com/owncloud/ocis/pull/12657
https://github.com/owncloud/ocis/issues/12582
@@ -0,0 +1,10 @@
Bugfix: Stop breadcrumb items from being announced twice
Each breadcrumb list item had `tabindex="0"`, putting the item itself in the
keyboard/screen reader focus order in addition to the link or button nested
inside it. This caused every breadcrumb segment to be announced twice in a
row. The list item is no longer a separate focus stop; only its inner link
or button is, while the item remains focusable enough for existing
drag-and-drop styling to keep working.
https://github.com/owncloud/ocis/pull/12643
@@ -0,0 +1,8 @@
Bugfix: Fix invisible group icon in share collaborator list
The icon shown next to group entries in the share collaborator autocomplete
list used a color variable that no longer resolved to a valid value, making
the icon effectively invisible against the background. The icon now uses the
correct default text color variable so it renders properly again.
https://github.com/owncloud/ocis/pull/12722
@@ -0,0 +1,12 @@
Bugfix: Announce IDP sign-in errors and fix keyboard use
The login, consent, and account chooser pages did not announce error
messages when they appeared, and invalid username/password fields gave no
indication of their error state. The consent screen's scope list also had no
programmatic link between each entry and its checkbox, and the account
chooser's "continue as" and "use another account" entries could not be
reached or activated with a keyboard. A visible focus outline on the login
form's input fields had also been removed with no replacement. All of these
have been fixed.
https://github.com/owncloud/ocis/pull/12649
@@ -0,0 +1,10 @@
Bugfix: Return the created user in the invitation response
The invitations service created the guest account but returned the original request
body unchanged, so the `invitedUser` relation defined by the Graph invitation
response was always empty. Clients had no way to learn the identity of the user that
was just created. The service now populates `invitedUser` with the created user (id,
email address and user type), where the id is the OWNCLOUD_ID that oCIS uses once the
guest is provisioned locally.
https://github.com/owncloud/ocis/pull/12467
@@ -0,0 +1,28 @@
Bugfix: Fix low-contrast form controls in dark and vault themes
Several form controls were hard to see against dark and vault theme
backgrounds. The view-options range slider had no visible track border and
relied on an opacity dip on hover, making it barely visible at rest. The
switch component's off-state track and thumb, and its on-state thumb, used
colors too close to their surrounding background to read as a toggle. The
select combobox's highlighted/selected option text used a color too close to
the highlight background.
The global search input's text color was forced with `!important`,
overriding the theme-specific search text color some themes set, which made
typed text render in white on a white search input background in the vault
"Dark Theme – High Contrast". The search placeholder color also used an
invalid CSS custom property fallback (a bare property name instead of a
nested `var()`), silently breaking the placeholder color for any theme that
didn't define a search-specific placeholder token, and the vault "Dark
Theme"'s placeholder color was too close to its input's text and border color
to read as muted.
The slider now has a visible border and no longer dims on rest, the switch
and select now use colors with sufficient contrast against their
backgrounds, the `!important` override blocking theme-specific search colors
has been removed, the invalid placeholder fallback has been fixed, and the
vault "Dark Theme" placeholder color has been changed to one with visible
contrast against the input text.
https://github.com/owncloud/ocis/pull/12639
@@ -0,0 +1,9 @@
Bugfix: Fix keyboard navigation in "New" and "Upload" dropdown menus
Opening the "New" or "Upload" dropdown menu in the Files app toolbar did
not move focus into the menu, so pressing the arrow keys had no effect
on the highlighted item, unlike the existing right-click context menu.
Both dropdowns now focus their first item on open, restoring arrow key
navigation.
https://github.com/owncloud/ocis/pull/12646
@@ -0,0 +1,28 @@
Bugfix: Release the quota of upload sessions with unreadable node metadata
When an upload's target node lost its metadata, e.g. because an ancestor was
moved to the trash while the upload was still in flight, the upload could never
finish processing. It stayed in "Processing" forever, could not be downloaded or
deleted, and kept consuming the space quota.
Cleaning such a session up with `ocis storage-users uploads sessions --clean`
did not help either: it removed the uploaded bytes and the session info file
before failing to revert the node, so it destroyed the only copy of the data
without releasing any quota.
Cleanup now reverts the node before removing anything irreversible and falls
back to the session metadata when the node cannot be read, so the quota is
released and the orphaned node is removed. If the quota cannot be released the
upload is kept so it can be retried instead of being lost.
A new `--orphaned` filter lists the affected sessions:
```
ocis storage-users uploads sessions --orphaned
ocis storage-users uploads sessions --orphaned --clean
```
Note that evaluating the filter reads the node metadata of every session, so it
is only done when the flag is set.
https://github.com/owncloud/ocis/pull/12739
@@ -0,0 +1,13 @@
Bugfix: Sync the `.psec` file name when a password-protected folder is renamed
Renaming a password-protected folder did not update its `.psec` pointer file,
so the main file listing kept showing the old name. This happened both when
renaming the folder via the hidden `.PasswordProtectedFolders` location and
when renaming it from inside the folder-view modal.
Renaming the real folder now also renames its `.psec` counterpart. Inside the
folder-view modal, the framed public-link session notifies the parent window
at the moment of rename, so the pointer file stays in sync even on refresh or
another device.
https://github.com/owncloud/ocis/pull/12684
@@ -0,0 +1,10 @@
Bugfix: Remove keyboard focus from open file name in top bar
When opening a file such as a text or markdown document, the file name shown
in the top bar could be reached via keyboard tabbing even though it was not
clickable and triggered no action. This made keyboard navigation confusing.
The file name is no longer part of the tab order, since it is a purely
informational, non-interactive element.
https://github.com/owncloud/ocis/pull/12752
@@ -0,0 +1,10 @@
Bugfix: Remove unneeded keyboard focus stops
Some icons and date columns in tables (spaces list, file list) could
unexpectedly receive keyboard focus even though they don't trigger any
action, adding unnecessary stops when tabbing through the page. The
contextual helper icon also carried a label that duplicated the label
already present on its surrounding button. These redundant focus stops
and duplicate labels have been removed.
https://github.com/owncloud/ocis/pull/12645
@@ -0,0 +1,14 @@
Bugfix: Truncate long resource names instead of overlapping the next column
In resource tables, a name that was too long for its column was not truncated.
Instead it kept its full width and was painted over the value of the adjacent
column, making both unreadable. This was most visible in the Spaces overview,
where a long space name overlapped the "Manager" column, but it affected every
resource table using the name column, including the files list and search
results, as well as the parent folder path shown below a search result.
The name is now truncated with an ellipsis at the column boundary, and the
rename button stays inside the name column. The full name remains available via
the title tooltip on hover.
https://github.com/owncloud/ocis/pull/12754
@@ -0,0 +1,15 @@
Bugfix: Restore hover feedback in high-contrast and dark themes
The Light and Dark High-Contrast themes set the background-highlight color
token equal to the default page background, making hover backgrounds
indistinguishable from the resting background wherever background-highlight
was used for interactive feedback, such as the global search results
dropdown. The non-high-contrast Dark theme had the same collision.
background-highlight now matches background-hover in the affected theme
definitions, and the search results dropdown and create-shortcut context
menu now use the background-hover color directly for their hover and active
states, since background-highlight is otherwise used for static surfaces
like cards, modals and form fields rather than interaction feedback.
https://github.com/owncloud/ocis/pull/12613
@@ -0,0 +1,9 @@
Bugfix: Fix share metadata corruption during concurrent share operations
When multiple sharing service replicas processed share operations concurrently
for the same user, the share metadata could become corrupted with references to
missing data, making all shares inaccessible to that user. The received share
cache now uses compare-and-swap (etag) validation to detect concurrent writes
and retries gracefully, preventing metadata corruption.
https://github.com/owncloud/ocis/pull/12621
@@ -0,0 +1,12 @@
Bugfix: Preserve accessibility focus in the file versions sidebar
Opening the file versions panel with a keyboard or screen reader could move
focus to the main page, and restoring a version could briefly move focus to the
main page before selecting the sidebar's back button. The sidebar now manages
focus throughout panel transitions and loading states, restores focus to the
control that opened it when closed, and returns focus to the restored version's
Restore button after the operation completes. Version dates and action labels
also provide clearer context for screen reader users without duplicate
announcements or additional tab stops.
https://github.com/owncloud/ocis/pull/12630
@@ -0,0 +1,11 @@
Bugfix: Allow space managers to remove shares created by other users
Space managers with permission to manage a resource's shares were unable to
remove shares that other users had created on that resource. Attempting to
remove such a share failed with a generic server error instead of succeeding.
Space managers can now remove any share on a resource within their space,
regardless of who created it, as long as they hold the required permission
on that resource.
https://github.com/owncloud/ocis/pull/12705
@@ -0,0 +1,14 @@
Bugfix: Vault navigation labels not updating on switch
The Files app navigation labels for the personal space and spaces list
sometimes kept showing the regular names instead of the vault-specific
ones after switching into the vault, and vice versa. This happened
because the vault detection only looked at the plain URL path and
missed cases such as hash-based routes or the redirect right after
logging in.
The vault detection has been centralized and now also recognizes
hash-based vault routes and the post-login redirect target, so the
navigation labels correctly reflect whether the user is in the vault.
https://github.com/owncloud/ocis/pull/12729
@@ -0,0 +1,11 @@
Bugfix: Fix missing labels and low-contrast elements across the web UI
Several icon-only buttons (search, hide-share, create-user, gallery
navigation) were missing labels, and loading spinners and progress bars did
not expose a name describing what they represent. The global search and
create shortcut dropdowns now use correct roles and states. Tooltips no longer
get caught mid-fade with a low-contrast color when the reduced-motion system
setting is enabled, and low-contrast colors were fixed in the select combobox
search input and in markdown editor links and inline code.
https://github.com/owncloud/ocis/pull/12526
+1
View File
@@ -8,3 +8,4 @@ https://github.com/owncloud/ocis/pull/12137
https://github.com/owncloud/ocis/pull/12302
https://github.com/owncloud/ocis/pull/12439
https://github.com/owncloud/ocis/pull/12266
https://github.com/owncloud/ocis/pull/12730
@@ -0,0 +1,10 @@
Change: Respect proxy environment variables for OIDC requests
The proxy and webfinger services now route OIDC requests through the
`HTTP_PROXY` and `HTTPS_PROXY` settings from the environment. Deployments that
should not send the OIDC issuer host through the proxy, or whose proxy cannot
reach that host, must list the issuer hostname in `NO_PROXY`, otherwise
authentication can fail when oCIS's own external hostname is reached through
the proxy.
https://github.com/owncloud/ocis/pull/12703
@@ -0,0 +1,12 @@
Enhancement: Add EPUB library
The EPUB reader now includes a library for discovering and organizing books
stored across accessible personal and project spaces. The library extracts
metadata and cover images in the browser and supports search, sorting, filters,
favorites, custom shelves, reading statuses, grid and list views, and resuming
from the reader's saved position.
Book metadata and covers are cached locally. Library preferences are stored in
the browser and are not synchronized between browsers or devices.
https://github.com/owncloud/ocis/pull/12648
@@ -0,0 +1,10 @@
Enhancement: Improve page structure on several pages
We've added missing `main` and `footer` regions to several pages (404,
private link resolving, missing config, logout, access denied, public link
resolving) for a more consistent page structure. We've also fixed the
"Skip to main" link, which previously did nothing on pages using the plain
layout (login, logout, public/private link pages) due to a missing target id
and a stale cached DOM reference.
https://github.com/owncloud/ocis/pull/12637
@@ -0,0 +1,16 @@
Enhancement: Configurable Keycloak invitation actions and working ocis_full SMTP
The invitations service now lets operators configure the Keycloak required actions
that are sent to invited guests via the execute-actions email, using the new
`INVITATIONS_KEYCLOAK_EXECUTE_ACTIONS` environment variable. It defaults to
`UPDATE_PASSWORD,VERIFY_EMAIL`; configured values are passed to Keycloak as-is, and
the service falls back to the defaults when none are configured, so an invited guest
always has a way to set up their account.
The Keycloak realm shipped with the `ocis_full` example deployment now points its
SMTP server at the bundled mailpit instance. Previously the realm shipped with an
empty SMTP configuration, so Keycloak silently dropped every mail it tried to send
(including the guest invitation email) even though the invitations service
correctly requested it.
https://github.com/owncloud/ocis/pull/12467
@@ -0,0 +1,6 @@
Enhancement: Apply Kiteworks branding to the web theme
The default oCIS theme now uses the Kiteworks OSPO name, slogan and logos
across all regular and vault mode themes.
https://github.com/owncloud/ocis/pull/12464
@@ -0,0 +1,19 @@
Enhancement: Add an opt-in bounded LDAP connection pool
The auth-basic, users, groups and graph services can now be switched from a
single long-lived reconnecting LDAP connection to a bounded pool of connections,
so concurrent requests no longer serialize on one socket. Connections are dialed
and bound lazily on checkout, unhealthy connections are discarded and lazily
re-dialed rather than eagerly reconnected, and checkout blocks with a configurable
timeout once the pool is exhausted.
Pooling is off by default and fully backwards compatible. Enable it per service
via 'OCIS_LDAP_POOL_ENABLED' (or the service-specific '<SERVICE>_LDAP_POOL_ENABLED'
override), and tune it with 'OCIS_LDAP_POOL_SIZE' (default 5) and
'OCIS_LDAP_POOL_CHECKOUT_TIMEOUT' (default 30s).
The graph service's identity backend now shares the same LDAP client
implementation used by the reva auth/user/group managers instead of maintaining
its own separate reconnecting client.
https://github.com/owncloud/ocis/pull/12689
@@ -0,0 +1,14 @@
Enhancement: Eliminate redundant LDAP read-after-write on create and update
The graph LDAP backend no longer re-reads an entry immediately after writing it
just to recover the entry ID for the response. When oCIS generates the ID itself
(GRAPH_LDAP_SERVER_UUID disabled), the create response is now synthesized from the
data already sent to the directory, and update responses are built by folding the
applied modifications onto the entry that was read before the write. This avoids a
round-trip that, against a replicated directory reached through a proxy, could hit
a lagging replica and fail or return stale data.
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.
https://github.com/owncloud/ocis/pull/12618
@@ -0,0 +1,16 @@
Enhancement: Retry LDAP operations against a lagging replica
The graph LDAP backend can now retry operations against a replicated directory
where a write to the primary is followed by a read that lands on a replica which
has not yet caught up. This covers the read-back that recovers a directory-assigned
ID after a create (GRAPH_LDAP_SERVER_UUID enabled), which is retried until the entry
becomes visible. The retry count and backoff are tunable through
`GRAPH_LDAP_RETRY_MAX_COUNT`, `GRAPH_LDAP_RETRY_BASE_DELAY` and
`GRAPH_LDAP_RETRY_MAX_DELAY`; the defaults keep the previous behaviour (a single
immediate retry with no delay), so existing deployments are unaffected.
Retries now distinguish reads from writes: a write is no longer retried on a network
error, which can surface after the request was already sent and would otherwise apply
the mutation twice.
https://github.com/owncloud/ocis/pull/12672
@@ -0,0 +1,21 @@
Enhancement: Add a command to recalculate the treesize of a space
The reported quota usage of a space can drift from the data actually stored on
disk. The treesize of a directory is maintained as a running counter that is
updated on every change, so a failed or incomplete update leaves the counter
wrong. Removing a node without propagating the size change, for example, leaves
its size counted against the quota forever, with no way to reclaim it.
The new command walks a space bottom up, recalculates the treesize of every
directory from the actual size of its children and corrects the stored values:
```
ocis storage-users spaces recalculate-treesize --space-id <id>
ocis storage-users spaces recalculate-treesize --space-id <id> --dry-run=false
```
Omit `--space-id` to process all spaces. As with the other maintenance commands,
`--dry-run` defaults to true, so the command reports what it would change until
it is explicitly told to write.
https://github.com/owncloud/ocis/pull/12746
@@ -0,0 +1,7 @@
Enhancement: Show the select-all checkbox label in tile view
The label of the select-all checkbox in the resource tiles view is now
visible, improving the user experience by making it clear what the
checkbox is for.
https://github.com/owncloud/ocis/pull/12640
@@ -0,0 +1,8 @@
Enhancement: Use a more distinctive icon for the software license link
The "Software License Information" entry in the help menu and apps menu used
the generic "scales" icon, which is easy to confuse with other justice- or
balance-related icons. It now uses the "file-shield" icon, which better
conveys a legal/license document.
https://github.com/owncloud/ocis/pull/12669
@@ -0,0 +1,12 @@
Enhancement: Add "Undo" action to the delete success notification
Deleting a file or folder now shows an "Undo" action alongside the
"moved to trash bin" notification, letting users restore the deleted
resources directly from the toast instead of navigating to the trash
bin. The action is only shown when the resources can be resolved in
the trash and the space supports restoring from it. The notification
pauses its auto-dismiss timer while hovered or focused, so it does not
disappear before the action can be used. Pressing Ctrl+Z (or Cmd+Z on
macOS) while the notification is visible triggers the same undo.
https://github.com/owncloud/ocis/pull/12650
@@ -0,0 +1,18 @@
Bugfix: Fix concurrent map access when listing shares
Listing shares could abort the whole oCIS process with the Go runtime error
"fatal error: concurrent map read and map write". This is an unrecoverable
runtime fault, so it could not be caught and recovered from, and it dropped all
connections that were in flight at that moment.
When converting CS3 shares into Graph DriveItems, the worker goroutines read
from the shared driveItems map while the collecting loop was already writing
results into the very same map. The results channel is buffered, so the workers
never blocked when handing over an item and the collecting loop started writing
while workers were still running. The results are now collected after all
workers have finished, which removes the overlapping access.
Note that lowering the maximum concurrency did not avoid this, as a single
worker could still run concurrently with the collecting loop.
https://github.com/owncloud/ocis/pull/12674
@@ -0,0 +1,13 @@
Bugfix: Return correct issuerAssignedId on /me
The `/graph/v1.0/me` endpoint reported the internal user UUID as
`identities[].issuerAssignedId` instead of the issuer-assigned identity (the
OIDC `sub`). The endpoint took a fast path that built the user model from the
CS3 user in the request context, which does not carry the external identity, so
it fell back to the internal UUID. `/me` now always resolves the user through
the identity backend, which reads the stored external identity and returns the
correct value. Group memberships are still only expanded when
`$expand=memberOf` is requested.
https://github.com/owncloud/ocis/pull/12431
https://github.com/owncloud/ocis/pull/12411
@@ -0,0 +1,17 @@
Bugfix: Open files whose name contains a hash or question mark
Cmd+Clicking or middle-clicking a file with a `#` or `?` in its name opened the
space root instead of the file, and the top bar showed the space name rather than
the file name. The file's path is carried in a route parameter which the router
percent-encodes when it builds the URL, but the editor route was resolved twice
and resolving twice does not encode twice: the second pass rebuilt the URL from
the still-decoded parameter with the encoding step skipped. The browser then read
everything from the `#` onward as a fragment, discarding the query string along
with the `fileId` needed to identify the file. Left clicks were unaffected because
they never leave the app.
Editor routes are now handed to links unresolved, so the file name is encoded
exactly once and survives both a new tab and an in-app navigation. Hash and
question mark remain valid characters in file names.
https://github.com/owncloud/ocis/pull/12740
@@ -0,0 +1,20 @@
Bugfix: Reject space images which are too large to be rendered
Setting a space image larger than the thumbnails service accepts appeared to
succeed but never changed the space image. Uploading the file and assigning it
as the space image are two separate requests, and both completed successfully,
so clients reported success. Only a later preview request, which the assigning
client never observes, was rejected because the image exceeded
`THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE`. As space images are rendered
exclusively as thumbnails, the image was not merely degraded, it was invisible
with no error anywhere in the UI.
The graph service now checks the file size when a space image is assigned and
rejects the request with `413 Request Entity Too Large` instead of storing a
reference which cannot be displayed. The previous space image is left
untouched. The limit is read from the new `GRAPH_MAX_IMAGE_FILE_SIZE` setting,
which defaults to `50MB` and must be less than or equal to
`THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE`. Space descriptions (`readme`) are not
affected.
https://github.com/owncloud/ocis/pull/12701
@@ -0,0 +1,12 @@
Bugfix: Do not collide vault and non-vault share mountpoints
Received shares mounted from the Vault storage and received shares mounted
from regular drives were treated as one flat namespace when computing a
unique mountpoint name. Sharing a resource with the same name once from a
regular drive and once from the Vault caused the second one to get a
spurious ` (1)` suffix, even though the two shares are rendered in
completely separate, segregated lists and never actually collide.
Mountpoint name collisions are now only checked against other shares within
the same vault/non-vault group.
https://github.com/owncloud/ocis/pull/12730
@@ -0,0 +1,18 @@
Bugfix: Log unmapped thumbnail errors and always report a sabredav exception
The webdav service logged failures of the thumbnails service at debug level only.
Errors which are not a property of the requested file, such as the thumbnails
service being unreachable, were therefore 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.
In addition, `codesEnum` only mapped four status codes, so error responses for
all other codes were rendered with an empty `<s:exception></s:exception>`
element. The missing entries for 403, 425 and 429 have been added and any
remaining unmapped code now falls back to a generic exception name, so clients
always receive a usable exception.
https://github.com/owncloud/ocis/pull/12668
@@ -0,0 +1,14 @@
Enhancement: Add audience restriction for OIDC access tokens
We added a new proxy configuration option `PROXY_OIDC_ACCESS_TOKEN_VERIFY_AUD`
which lets operators restrict the JWT access tokens that are accepted to a list
of allowed audiences. When set, a token is only accepted if one of the
configured values is present in its `aud` (audience) claim or matches its `azp`
(authorized party) claim. This is useful when the OIDC provider (IDP) is shared
between multiple applications, so that tokens issued for another application are
not accepted by ownCloud Infinite Scale.
The check is disabled by default (empty list) to preserve the existing behavior.
https://github.com/owncloud/ocis/pull/12634
@@ -0,0 +1,5 @@
Security: Restrict group member data to authorized users
The groups API could return group membership details to callers who should not have had access to it. Access to group member data is now properly restricted based on the caller's permissions.
https://github.com/owncloud/ocis/pull/12573
@@ -0,0 +1,8 @@
Security: Harden origin validation for embed mode delegated authentication
Hardened origin validation for the delegated authentication feature in Web's
embed mode. Deployments using `WEB_OPTION_EMBED_DELEGATE_AUTHENTICATION` should
ensure `WEB_OPTION_EMBED_DELEGATE_AUTHENTICATION_ORIGIN` is explicitly
configured.
https://github.com/owncloud/ocis/pull/12572
+7 -2
View File
@@ -11,11 +11,16 @@
},
"require-dev": {
"ext-simplexml": "*",
"bamarni/composer-bin-plugin": "^1.8"
"bamarni/composer-bin-plugin": "^1.8",
"playwright-php/playwright": "^1.2"
},
"extra": {
"bamarni-bin": {
"bin-links": false
}
},
"require": {
"khanamiryan/qrcode-detector-decoder": "^2.0",
"spomky-labs/otphp": "^11.5"
}
}
}
@@ -1964,7 +1964,15 @@
"contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';",
"strictTransportSecurity": "max-age=31536000; includeSubDomains"
},
"smtpServer": {},
"smtpServer": {
"host": "mailserver",
"port": "1025",
"from": "keycloak@owncloud.test",
"fromDisplayName": "oCIS",
"ssl": "false",
"starttls": "false",
"auth": "false"
},
"eventsEnabled": false,
"eventsListeners": [
"jboss-logging"
@@ -2,7 +2,7 @@
printenv
# replace oCIS domain in keycloak realm import
mkdir /opt/keycloak/data/import
sed -e "s/ocis.owncloud.test/${OCIS_DOMAIN}/g" /opt/keycloak/data/import-dist/ocis-realm.json > /opt/keycloak/data/import/oCIS-realm.json
sed -e "s/ocis.owncloud.test/${OCIS_DOMAIN}/g" -e "s/ocis.ocm.owncloud.test/${OCIS_OCM_DOMAIN}/g" /opt/keycloak/data/import-dist/ocis-realm.json > /opt/keycloak/data/import/oCIS-realm.json
# sed -e "s/ocis.ocm.owncloud.test/${OCIS_OCM_DOMAIN}/g" /opt/keycloak/data/import-dist/ocis-realm.json > /opt/keycloak/data/import/oCIS-realm.json
# run original docker-entrypoint
@@ -192,7 +192,8 @@ services:
OCIS_LDAP_BIND_PASSWORD: ${LDAP_ADMIN_PASSWORD:-admin}
OCIS_LDAP_GROUP_BASE_DN: "ou=groups,dc=owncloud,dc=com"
GRAPH_LDAP_GROUP_CREATE_BASE_DN: "ou=groups-8d24cb5f-6ee6-4b98-86df-c4c268dddb46,ou=groups,dc=owncloud,dc=com"
OCIS_LDAP_GROUP_OBJECTCLASS: "owncloudGroup"
OCIS_LDAP_GROUP_OBJECTCLASS: "groupOfNames"
OCIS_LDAP_GROUP_ADDITIONAL_OBJECTCLASSES: "ownCloudGroup"
OCIS_LDAP_USER_BASE_DN: "ou=users,dc=owncloud,dc=com"
OCIS_LDAP_USER_OBJECTCLASS: "inetOrgPerson"
LDAP_LOGIN_ATTRIBUTES: "uid"
@@ -272,6 +273,7 @@ services:
- "./config/keycloak/ocis-realm.dist.json:/opt/keycloak/data/import-dist/ocis-realm.json"
environment:
OCIS_DOMAIN: ${OCIS_DOMAIN:-ocis.owncloud.test}
OCIS_OCM_DOMAIN: ${OCIS_OCM_DOMAIN:-ocis.ocm.owncloud.test}
KC_HOSTNAME: ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
KC_DB: postgres
KC_DB_URL: "jdbc:postgresql://postgres:5432/keycloak"
+137 -101
View File
@@ -6130,10 +6130,10 @@ IDM_ADMIN_USER_ID:
removalVersion: ""
deprecationInfo: ""
IDM_CREATE_DEMO_USERS:
name: SETTINGS_SETUP_DEFAULT_ASSIGNMENTS;IDM_CREATE_DEMO_USERS
name: IDM_CREATE_DEMO_USERS
defaultValue: "false"
type: bool
description: The default role assignments the demo users should be setup.
description: Flag to enable or disable the creation of the demo users.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
@@ -7974,12 +7974,12 @@ OCDAV_WEBDAV_NAMESPACE:
removalVersion: ""
deprecationInfo: ""
OCIS_ADMIN_USER_ID:
name: OCIS_ADMIN_USER_ID;STORAGE_USERS_PURGE_TRASH_BIN_USER_ID
name: OCIS_ADMIN_USER_ID;IDM_ADMIN_USER_ID
defaultValue: ""
type: string
description: ID of the user who collects all necessary information for deletion.
Consider that the UUID can be encoded in some LDAP deployment configurations like
in .ldif files. These need to be decoded beforehand.
description: ID of the user that should receive admin privileges. Consider that
the UUID can be encoded in some LDAP deployment configurations like in .ldif files.
These need to be decoded beforehand.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
@@ -8004,28 +8004,28 @@ OCIS_ASYNC_UPLOADS:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_AUTH_PASSWORD:
name: OCIS_CACHE_AUTH_PASSWORD;STORAGE_SYSTEM_CACHE_AUTH_PASSWORD
name: OCIS_CACHE_AUTH_PASSWORD;GATEWAY_PROVIDER_CACHE_AUTH_PASSWORD
defaultValue: ""
type: string
description: Password for the configured store. Only applies when store type 'nats-js-kv'
is configured.
description: The password to use for authentication. Only applies when store type
'nats-js-kv' is configured.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_AUTH_USERNAME:
name: OCIS_CACHE_AUTH_USERNAME;STORAGE_SYSTEM_CACHE_AUTH_USERNAME
name: OCIS_CACHE_AUTH_USERNAME;GATEWAY_PROVIDER_CACHE_AUTH_USERNAME
defaultValue: ""
type: string
description: Username for the configured store. Only applies when store type 'nats-js-kv'
is configured.
description: The username to use for authentication. Only applies when store type
'nats-js-kv' is configured.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_DATABASE:
name: OCIS_CACHE_DATABASE
defaultValue: storage-system
defaultValue: cache-providers
type: string
description: The database name the configured store should use.
introductionVersion: pre5.0
@@ -8033,18 +8033,18 @@ OCIS_CACHE_DATABASE:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_DISABLE_PERSISTENCE:
name: OCIS_CACHE_DISABLE_PERSISTENCE;STORAGE_SYSTEM_CACHE_DISABLE_PERSISTENCE
name: OCIS_CACHE_DISABLE_PERSISTENCE;GATEWAY_PROVIDER_CACHE_DISABLE_PERSISTENCE
defaultValue: "false"
type: bool
description: Disables persistence of the cache. Only applies when store type 'nats-js-kv'
is configured. Defaults to false.
description: Disables persistence of the provider cache. Only applies when store
type 'nats-js-kv' is configured. Defaults to false.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_STORE:
name: OCIS_CACHE_STORE;STORAGE_SYSTEM_CACHE_STORE
defaultValue: memory
name: OCIS_CACHE_STORE;GATEWAY_PROVIDER_CACHE_STORE
defaultValue: noop
type: string
description: 'The type of the cache store. Supported values are: ''memory'', ''redis-sentinel'',
''nats-js-kv'', ''noop''. See the text description for details.'
@@ -8053,7 +8053,7 @@ OCIS_CACHE_STORE:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_STORE_NODES:
name: OCIS_CACHE_STORE_NODES;STORAGE_SYSTEM_CACHE_STORE_NODES
name: OCIS_CACHE_STORE_NODES;GATEWAY_PROVIDER_CACHE_STORE_NODES
defaultValue: '[127.0.0.1:9233]'
type: '[]string'
description: A list of nodes to access the configured store. This has no effect
@@ -8065,11 +8065,11 @@ OCIS_CACHE_STORE_NODES:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_TTL:
name: OCIS_CACHE_TTL;STORAGE_SYSTEM_CACHE_TTL
defaultValue: 24m0s
name: OCIS_CACHE_TTL;GATEWAY_PROVIDER_CACHE_TTL
defaultValue: 5m0s
type: Duration
description: Default time to live for user info in the user info cache. Only applied
when access tokens has no expiration. See the Environment Variable Types description
description: Default time to live for user info in the cache. Only applied when
access tokens has no expiration. See the Environment Variable Types description
for more details.
introductionVersion: pre5.0
deprecationVersion: ""
@@ -8113,46 +8113,46 @@ OCIS_CLAIM_MANAGED_SPACES_REGEXP:
removalVersion: ""
deprecationInfo: ""
OCIS_CORS_ALLOW_CREDENTIALS:
name: OCIS_CORS_ALLOW_CREDENTIALS;SSE_CORS_ALLOW_CREDENTIALS
name: OCIS_CORS_ALLOW_CREDENTIALS;ACTIVITYLOG_CORS_ALLOW_CREDENTIALS
defaultValue: "true"
type: bool
description: 'Allow credentials for CORS.See following chapter for more details:
*Access-Control-Allow-Credentials* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials.'
introductionVersion: "5.0"
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CORS_ALLOW_HEADERS:
name: OCIS_CORS_ALLOW_HEADERS;SSE_CORS_ALLOW_HEADERS
name: OCIS_CORS_ALLOW_HEADERS;ACTIVITYLOG_CORS_ALLOW_HEADERS
defaultValue: '[Authorization Origin Content-Type Accept X-Requested-With X-Request-Id
Ocs-Apirequest]'
type: '[]string'
description: 'A list of allowed CORS headers. See following chapter for more details:
*Access-Control-Request-Headers* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers.
See the Environment Variable Types description for more details.'
introductionVersion: "5.0"
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CORS_ALLOW_METHODS:
name: OCIS_CORS_ALLOW_METHODS;SSE_CORS_ALLOW_METHODS
name: OCIS_CORS_ALLOW_METHODS;ACTIVITYLOG_CORS_ALLOW_METHODS
defaultValue: '[GET]'
type: '[]string'
description: 'A list of allowed CORS methods. See following chapter for more details:
*Access-Control-Request-Method* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method.
See the Environment Variable Types description for more details.'
introductionVersion: "5.0"
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CORS_ALLOW_ORIGINS:
name: OCIS_CORS_ALLOW_ORIGINS;SSE_CORS_ALLOW_ORIGINS
name: OCIS_CORS_ALLOW_ORIGINS;ACTIVITYLOG_CORS_ALLOW_ORIGINS
defaultValue: '[*]'
type: '[]string'
description: 'A list of allowed CORS origins. See following chapter for more details:
*Access-Control-Allow-Origin* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin.
See the Environment Variable Types description for more details.'
introductionVersion: "5.0"
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -8196,7 +8196,7 @@ OCIS_DEFAULT_LANGUAGE:
type: string
description: The default language used by services and the WebUI. If not defined,
English will be used as default. See the documentation for more details.
introductionVersion: "5.0"
introductionVersion: 7.0.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -8242,7 +8242,7 @@ OCIS_DISABLE_VERSIONING:
removalVersion: ""
deprecationInfo: ""
OCIS_EDITION:
name: OCIS_EDITION;FRONTEND_EDITION
name: OCIS_EDITION;OCDAV_EDITION
defaultValue: Community
type: string
description: Edition of oCIS. Used for branding purposes.
@@ -8260,27 +8260,48 @@ OCIS_EMAIL_TEMPLATE_PATH:
removalVersion: ""
deprecationInfo: ""
OCIS_ENABLE_OCM:
name: OCIS_ENABLE_OCM
name: OCIS_ENABLE_OCM;GRAPH_INCLUDE_OCM_SHAREES
defaultValue: "false"
type: bool
description: Include OCM sharees when listing sharees.
description: Include OCM sharees when listing users.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_ENABLE_PUBLIC_SHARING:
name: OCIS_ENABLE_PUBLIC_SHARING
defaultValue: "true"
type: bool
description: Enables public link sharing. When disabled, creating new public links
is rejected. Direct sharing with users and groups is not affected.
introductionVersion: '%%NEXT_PRODUCTION_VERSION%%'
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_ENABLE_USER_SHARING:
name: OCIS_ENABLE_USER_SHARING
defaultValue: "true"
type: bool
description: Enables direct sharing with users and groups. When disabled, creating
new user, group or federated shares via the drive item invite endpoints is rejected.
Public link sharing and space membership are not affected.
introductionVersion: '%%NEXT_PRODUCTION_VERSION%%'
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_ENABLE_VAULT_MODE:
name: OCIS_ENABLE_VAULT_MODE;FRONTEND_ENABLE_VAULT_MODE
name: OCIS_ENABLE_VAULT_MODE;GATEWAY_ENABLE_VAULT_MODE
defaultValue: "false"
type: bool
description: Enable vault mode. When enabled, the capabilities endpoint will report
vault as enabled and the capabilities?vault=true endpoint will return capabilities
with public sharing and federation disabled.
description: Set this to true to enable the default rule for vault storage provider
configuration. Only applicable if the storage-users-vault service, a specially
configured storage-users service, is configured.
introductionVersion: 8.1.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_AUTH_PASSWORD:
name: OCIS_EVENTS_AUTH_PASSWORD;SSE_EVENTS_AUTH_PASSWORD
name: OCIS_EVENTS_AUTH_PASSWORD
defaultValue: ""
type: string
description: The password to authenticate with the events broker. The events broker
@@ -8290,7 +8311,7 @@ OCIS_EVENTS_AUTH_PASSWORD:
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_AUTH_USERNAME:
name: OCIS_EVENTS_AUTH_USERNAME;SSE_EVENTS_AUTH_USERNAME
name: OCIS_EVENTS_AUTH_USERNAME
defaultValue: ""
type: string
description: The username to authenticate with the events broker. The events broker
@@ -8300,7 +8321,7 @@ OCIS_EVENTS_AUTH_USERNAME:
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_CLUSTER:
name: OCIS_EVENTS_CLUSTER;SSE_EVENTS_CLUSTER
name: OCIS_EVENTS_CLUSTER
defaultValue: ocis-cluster
type: string
description: The clusterID of the event system. The event system is the message
@@ -8311,7 +8332,7 @@ OCIS_EVENTS_CLUSTER:
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_ENABLE_TLS:
name: OCIS_EVENTS_ENABLE_TLS;SSE_EVENTS_ENABLE_TLS
name: OCIS_EVENTS_ENABLE_TLS
defaultValue: "false"
type: bool
description: Enable TLS for the connection to the events broker. The events broker
@@ -8321,7 +8342,7 @@ OCIS_EVENTS_ENABLE_TLS:
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_ENDPOINT:
name: OCIS_EVENTS_ENDPOINT;SSE_EVENTS_ENDPOINT
name: OCIS_EVENTS_ENDPOINT
defaultValue: 127.0.0.1:9233
type: string
description: The address of the event system. The event system is the message queuing
@@ -8331,21 +8352,21 @@ OCIS_EVENTS_ENDPOINT:
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE:
name: OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SSE_EVENTS_TLS_ROOT_CA_CERTIFICATE
name: OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE
defaultValue: ""
type: string
description: The root CA certificate used to validate the server's TLS certificate.
If provided SSE_EVENTS_TLS_INSECURE will be seen as false.
If provided NOTIFICATIONS_EVENTS_TLS_INSECURE will be seen as false.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_GATEWAY_GRPC_ADDR:
name: OCIS_GATEWAY_GRPC_ADDR;STORAGE_USERS_GATEWAY_GRPC_ADDR
name: OCIS_GATEWAY_GRPC_ADDR;GATEWAY_GRPC_ADDR
defaultValue: 127.0.0.1:9142
type: string
description: The bind address of the gateway GRPC address.
introductionVersion: "5.0"
description: The bind address of the GRPC service.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -8413,7 +8434,7 @@ OCIS_HTTP_TLS_KEY:
removalVersion: ""
deprecationInfo: ""
OCIS_INSECURE:
name: OCIS_INSECURE;SSE_EVENTS_TLS_INSECURE
name: OCIS_INSECURE
defaultValue: "false"
type: bool
description: Whether to verify the server TLS certificates.
@@ -8733,7 +8754,7 @@ OCIS_LDAP_PRECISE_SEARCH_ATTRIBUTE:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_SERVER_WRITE_ENABLED:
name: OCIS_LDAP_SERVER_WRITE_ENABLED;FRONTEND_LDAP_SERVER_WRITE_ENABLED
name: OCIS_LDAP_SERVER_WRITE_ENABLED;GRAPH_LDAP_SERVER_WRITE_ENABLED
defaultValue: "true"
type: bool
description: Allow creating, modifying and deleting LDAP users via the GRAPH API.
@@ -8830,7 +8851,7 @@ OCIS_LDAP_USER_SCHEMA_DISPLAYNAME:
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: 'LDAP_USER_SCHEMA_DISPLAY_NAME changing name for consistency | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '
deprecationInfo: 'LDAP_USER_SCHEMA_DISPLAY_NAME changing name for consistency | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '
OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID:
name: OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID;GRAPH_LDAP_EXTERNAL_ID_ATTRIBUTE
defaultValue: owncloudExternalID
@@ -8939,23 +8960,23 @@ OCIS_LOG_PRETTY:
removalVersion: ""
deprecationInfo: ""
OCIS_MACHINE_AUTH_API_KEY:
name: OCIS_MACHINE_AUTH_API_KEY;FRONTEND_MACHINE_AUTH_API_KEY
name: OCIS_MACHINE_AUTH_API_KEY;AUTH_MACHINE_API_KEY
defaultValue: ""
type: string
description: The machine auth API key used to validate internal requests necessary
to access resources from other services.
description: Machine auth API key used to validate internal requests necessary for
the access to resources from other services.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_MAX_CONCURRENCY:
name: OCIS_MAX_CONCURRENCY;FRONTEND_MAX_CONCURRENCY
defaultValue: "1"
name: OCIS_MAX_CONCURRENCY;STORAGE_USERS_S3NG_MAX_CONCURRENCY
defaultValue: "5"
type: int
description: Maximum number of concurrent go-routines. Higher values can potentially
get work done faster but will also cause more load on the system. Values of 0
or below will be ignored and the default value will be used.
introductionVersion: 7.0.0
or below will be ignored and the default value of 100 will be used.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -8986,8 +9007,8 @@ OCIS_MFA_ENABLED:
name: OCIS_MFA_ENABLED
defaultValue: "false"
type: bool
description: Set to true to enable multi factor authentication. See the documentation
for more details.
description: Enable MFA enforcement. If enabled users need to complete MFA before
they can access specific paths
introductionVersion: 7.3.0
deprecationVersion: ""
removalVersion: ""
@@ -8997,9 +9018,8 @@ OCIS_MFA_SESSION_DURATION:
defaultValue: "3600"
type: int
description: The duration in seconds that a multi-factor authentication session
is valid. After this time the user will be prompted to re-authenticate. Defaults
to 3600 (1 hour).
introductionVersion: 8.1.0
is valid for non-OIDC requests. Defaults to 3600 (1 hour).
introductionVersion: 7.3.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -9090,7 +9110,7 @@ OCIS_OIDC_ISSUER:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST:
name: OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
name: OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;SHARING_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
defaultValue: ""
type: string
description: Path to the 'banned passwords list' file. This only impacts public
@@ -9100,7 +9120,7 @@ OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_DISABLED:
name: OCIS_PASSWORD_POLICY_DISABLED;FRONTEND_PASSWORD_POLICY_DISABLED
name: OCIS_PASSWORD_POLICY_DISABLED;SHARING_PASSWORD_POLICY_DISABLED
defaultValue: "false"
type: bool
description: Disable the password policy. Defaults to false if not set.
@@ -9109,7 +9129,7 @@ OCIS_PASSWORD_POLICY_DISABLED:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_CHARACTERS:
name: OCIS_PASSWORD_POLICY_MIN_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_CHARACTERS
name: OCIS_PASSWORD_POLICY_MIN_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_CHARACTERS
defaultValue: "8"
type: int
description: Define the minimum password length. Defaults to 8 if not set.
@@ -9118,7 +9138,7 @@ OCIS_PASSWORD_POLICY_MIN_CHARACTERS:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_DIGITS:
name: OCIS_PASSWORD_POLICY_MIN_DIGITS;FRONTEND_PASSWORD_POLICY_MIN_DIGITS
name: OCIS_PASSWORD_POLICY_MIN_DIGITS;SHARING_PASSWORD_POLICY_MIN_DIGITS
defaultValue: "1"
type: int
description: Define the minimum number of digits. Defaults to 1 if not set.
@@ -9127,7 +9147,7 @@ OCIS_PASSWORD_POLICY_MIN_DIGITS:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:
name: OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
name: OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
defaultValue: "1"
type: int
description: Define the minimum number of uppercase letters. Defaults to 1 if not
@@ -9137,7 +9157,7 @@ OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:
name: OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
name: OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
defaultValue: "1"
type: int
description: Define the minimum number of characters from the special characters
@@ -9147,7 +9167,7 @@ OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:
name: OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
name: OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
defaultValue: "1"
type: int
description: Define the minimum number of lowercase letters. Defaults to 1 if not
@@ -9157,7 +9177,7 @@ OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE:
name: OCIS_PERSISTENT_STORE;EVENTHISTORY_STORE
name: OCIS_PERSISTENT_STORE;ACTIVITYLOG_STORE
defaultValue: nats-js-kv
type: string
description: 'The type of the store. Supported values are: ''memory'', ''nats-js-kv'',
@@ -9167,7 +9187,7 @@ OCIS_PERSISTENT_STORE:
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE_AUTH_PASSWORD:
name: OCIS_PERSISTENT_STORE_AUTH_PASSWORD;EVENTHISTORY_STORE_AUTH_PASSWORD
name: OCIS_PERSISTENT_STORE_AUTH_PASSWORD;ACTIVITYLOG_STORE_AUTH_PASSWORD
defaultValue: ""
type: string
description: The password to authenticate with the store. Only applies when store
@@ -9177,7 +9197,7 @@ OCIS_PERSISTENT_STORE_AUTH_PASSWORD:
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE_AUTH_USERNAME:
name: OCIS_PERSISTENT_STORE_AUTH_USERNAME;EVENTHISTORY_STORE_AUTH_USERNAME
name: OCIS_PERSISTENT_STORE_AUTH_USERNAME;ACTIVITYLOG_STORE_AUTH_USERNAME
defaultValue: ""
type: string
description: The username to authenticate with the store. Only applies when store
@@ -9187,7 +9207,7 @@ OCIS_PERSISTENT_STORE_AUTH_USERNAME:
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE_NODES:
name: OCIS_PERSISTENT_STORE_NODES;EVENTHISTORY_STORE_NODES
name: OCIS_PERSISTENT_STORE_NODES;ACTIVITYLOG_STORE_NODES
defaultValue: '[127.0.0.1:9233]'
type: '[]string'
description: A list of nodes to access the configured store. This has no effect
@@ -9199,11 +9219,11 @@ OCIS_PERSISTENT_STORE_NODES:
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE_TTL:
name: OCIS_PERSISTENT_STORE_TTL;EVENTHISTORY_STORE_TTL
defaultValue: 336h0m0s
name: OCIS_PERSISTENT_STORE_TTL;ACTIVITYLOG_STORE_TTL
defaultValue: 0s
type: Duration
description: Time to live for events in the store. Defaults to '336h' (2 weeks).
See the Environment Variable Types description for more details.
description: Time to live for events in the store. See the Environment Variable
Types description for more details.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
@@ -9249,7 +9269,7 @@ OCIS_REVA_GATEWAY_TLS_MODE:
removalVersion: ""
deprecationInfo: ""
OCIS_SERVICE_ACCOUNT_ID:
name: OCIS_SERVICE_ACCOUNT_ID;FRONTEND_SERVICE_ACCOUNT_ID
name: OCIS_SERVICE_ACCOUNT_ID;ACTIVITYLOG_SERVICE_ACCOUNT_ID
defaultValue: ""
type: string
description: The ID of the service account the service should use. See the 'auth-service'
@@ -9259,7 +9279,7 @@ OCIS_SERVICE_ACCOUNT_ID:
removalVersion: ""
deprecationInfo: ""
OCIS_SERVICE_ACCOUNT_SECRET:
name: OCIS_SERVICE_ACCOUNT_SECRET;FRONTEND_SERVICE_ACCOUNT_SECRET
name: OCIS_SERVICE_ACCOUNT_SECRET;ACTIVITYLOG_SERVICE_ACCOUNT_SECRET
defaultValue: ""
type: string
description: The service account secret.
@@ -9268,7 +9288,7 @@ OCIS_SERVICE_ACCOUNT_SECRET:
removalVersion: ""
deprecationInfo: ""
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:
name: OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
name: OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
defaultValue: "true"
type: bool
description: Set this to true if you want to enforce passwords on all public shares.
@@ -9277,21 +9297,22 @@ OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:
removalVersion: ""
deprecationInfo: ""
OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD:
name: OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD
name: OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD
defaultValue: "false"
type: bool
description: Set this to true if you want to enforce passwords for writable shares.
Only effective if the setting for 'passwords on all public shares' is set to false.
description: Set this to true if you want to enforce passwords on Uploader, Editor
or Contributor shares.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_SPACES_MAX_QUOTA:
name: OCIS_SPACES_MAX_QUOTA;FRONTEND_MAX_QUOTA
name: OCIS_SPACES_MAX_QUOTA;STORAGE_USERS_OCIS_MAX_QUOTA
defaultValue: "0"
type: uint64
description: Set the global max quota value in bytes. A value of 0 equals unlimited.
The value is provided via capabilities.
description: Set a global max quota for spaces in bytes. A value of 0 equals unlimited.
If not using the global OCIS_SPACES_MAX_QUOTA, you must define the FRONTEND_MAX_QUOTA
in the frontend service.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
@@ -9318,7 +9339,7 @@ OCIS_SYSTEM_USER_ID:
removalVersion: ""
deprecationInfo: ""
OCIS_SYSTEM_USER_IDP:
name: OCIS_SYSTEM_USER_IDP;SHARING_PUBLIC_CS3_SYSTEM_USER_IDP
name: OCIS_SYSTEM_USER_IDP;SETTINGS_SYSTEM_USER_IDP
defaultValue: internal
type: string
description: IDP of the oCIS STORAGE-SYSTEM system user.
@@ -9368,19 +9389,19 @@ OCIS_TRANSFER_SECRET:
name: OCIS_TRANSFER_SECRET
defaultValue: ""
type: string
description: Transfer secret for signing file up- and download requests.
description: The storage transfer secret.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_TRANSLATION_PATH:
name: OCIS_TRANSLATION_PATH;USERLOG_TRANSLATION_PATH
name: OCIS_TRANSLATION_PATH;ACTIVITYLOG_TRANSLATION_PATH
defaultValue: ""
type: string
description: (optional) Set this to a path with custom translations to overwrite
the builtin translations. Note that file and folder naming rules apply, see the
documentation for more details.
introductionVersion: pre5.0
introductionVersion: 7.0.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -9395,20 +9416,21 @@ OCIS_URL:
removalVersion: ""
deprecationInfo: ""
OCIS_USER_SEARCH_DISPLAYED_ATTRIBUTES:
name: OCIS_USER_SEARCH_DISPLAYED_ATTRIBUTES;FRONTEND_USER_SEARCH_DISPLAYED_ATTRIBUTES
name: OCIS_USER_SEARCH_DISPLAYED_ATTRIBUTES
defaultValue: '[]'
type: '[]string'
description: A list of user attributes to display in the user search results.
description: The attributes to display in the user search results.
introductionVersion: 7.3.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_WOPI_DISABLE_CHAT:
name: APP_PROVIDER_WOPI_DISABLE_CHAT;OCIS_WOPI_DISABLE_CHAT
name: COLLABORATION_WOPI_DISABLE_CHAT;OCIS_WOPI_DISABLE_CHAT
defaultValue: "false"
type: bool
description: Disable the chat functionality of the office app.
introductionVersion: pre5.0
description: Disable chat in the office web frontend. This feature applies to OnlyOffice
and Microsoft.
introductionVersion: 7.0.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -10986,13 +11008,28 @@ PROXY_MACHINE_AUTH_API_KEY:
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
PROXY_OIDC_ACCESS_TOKEN_VERIFY_AUD:
name: PROXY_OIDC_ACCESS_TOKEN_VERIFY_AUD
defaultValue: '[]'
type: '[]string'
description: A list of accepted audiences for OIDC access tokens, usually the OIDC
client IDs used to access ownCloud (for example the web and desktop client IDs).
When set, a JWT access token is only accepted if one of these values is present
in its 'aud' claim or matches its 'azp' claim. This prevents tokens issued for
other applications of a shared IDP from being accepted. When set via the environment
variable, use a comma-separated list. Has no effect when 'access_token_verify_method'
is 'none'. Leave empty to disable the check (default).
introductionVersion: 8.2.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD:
name: PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD
defaultValue: jwt
type: string
description: Sets how OIDC access tokens should be verified. Possible values are
'none' and 'jwt'. When using 'none', no special validation apart from using it
for accessing the IPD's userinfo endpoint will be done. When using 'jwt', it tries
for accessing the IDP's userinfo endpoint will be done. When using 'jwt', it tries
to parse the access token as a jwt token and verifies the signature using the
keys published on the IDP's 'jwks_uri'.
introductionVersion: pre5.0
@@ -11166,9 +11203,8 @@ PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE:
name: OCIS_CACHE_STORE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE
defaultValue: nats-js-kv
type: string
description: 'The type of the signing key store. Supported values are: ''redis-sentinel'',
''nats-js-kv'' and ''ocisstoreservice'' (deprecated). See the text description
for details.'
description: 'The type of the signing key store. Supported values are: ''redis-sentinel''
and ''nats-js-kv''. See the text description for details.'
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
@@ -1,7 +1,7 @@
// # Added Variables between oCIS 8.1.0 and oCIS 8.2.0
// commenting the headline to make it better includable
// table created per 2026.07.09
// table created per 2026.07.15
// the table should be recreated/updated on source () changes
[width="100%",cols="~,~,~,~",options="header"]
@@ -23,5 +23,9 @@
| The maximum duration to wait for the storage to respond while resolving a single received share's resource when listing 'sharedWithMe'. Bounding each resource lookup individually prevents one slow or unreachable resource from consuming the request deadline shared by all the other shares. A share whose resource cannot be statted within this time is still listed as a degraded item instead of being dropped. Defaults to '10s'. See the Environment Variable Types description for more details.
| 10s
| xref:{s-path}/proxy.adoc[Proxy]
| PROXY_OIDC_ACCESS_TOKEN_VERIFY_AUD
| A list of accepted audiences for OIDC access tokens, usually the OIDC client IDs used to access ownCloud (for example the web and desktop client IDs). When set, a JWT access token is only accepted if one of these values is present in its 'aud' claim or matches its 'azp' claim. This prevents tokens issued for other applications of a shared IDP from being accepted. When set via the environment variable, use a comma-separated list. Has no effect when 'PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD' is set to 'none'. Leave empty to disable the check (default).
|
|===
+36 -37
View File
@@ -1,6 +1,6 @@
module github.com/owncloud/ocis/v2
go 1.25.11
go 1.26
require (
dario.cat/mergo v1.0.2
@@ -10,21 +10,22 @@ require (
github.com/MicahParks/keyfunc/v2 v2.1.0
github.com/Nerzal/gocloak/v13 v13.9.0
github.com/bbalet/stopwords v1.0.0
github.com/beevik/etree v1.6.0
github.com/beevik/etree v1.7.0
github.com/blevesearch/bleve/v2 v2.6.0
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.19.0
github.com/cenkalti/backoff/v5 v5.0.3
github.com/coreos/go-oidc/v3 v3.20.0
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1
github.com/davidbyttow/govips/v2 v2.18.0
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
github.com/egirna/icap-client v0.1.1
github.com/gabriel-vasile/mimetype v1.4.13
github.com/gabriel-vasile/mimetype v1.4.15
github.com/ggwhite/go-masker v1.1.0
github.com/go-chi/chi/v5 v5.3.0
github.com/go-chi/chi/v5 v5.3.1
github.com/go-chi/httprate v0.16.0
github.com/go-chi/render v1.0.3
github.com/go-ldap/ldap/v3 v3.4.13
github.com/go-ldap/ldap/v3 v3.4.14
github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3
github.com/go-micro/plugins/v4/client/grpc v1.2.1
github.com/go-micro/plugins/v4/logger/zerolog v1.2.0
@@ -50,28 +51,28 @@ require (
github.com/jellydator/ttlcache/v3 v3.4.1
github.com/jinzhu/now v1.1.5
github.com/justinas/alice v1.2.0
github.com/kovidgoyal/imaging v1.8.22
github.com/kovidgoyal/imaging v1.8.23
github.com/leonelquinteros/gotext v1.7.2
github.com/libregraph/idm v0.5.0
github.com/libregraph/lico v0.67.0
github.com/mitchellh/mapstructure v1.5.0
github.com/mna/pigeon v1.3.0
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/nats-io/nats-server/v2 v2.14.3
github.com/nats-io/nats-server/v2 v2.14.4
github.com/nats-io/nats.go v1.52.0
github.com/olekukonko/tablewriter v1.1.4
github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 v2.32.0
github.com/onsi/gomega v1.42.1
github.com/open-policy-agent/opa v1.18.2
github.com/open-policy-agent/opa v1.19.0
github.com/orcaman/concurrent-map v1.0.0
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
github.com/owncloud/reva/v2 v2.0.0-20260710104539-1f85e04c1e35
github.com/owncloud/reva/v2 v2.0.0-20260806084131-831afd01e5d4
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.12
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/client_golang v1.24.1
github.com/r3labs/sse/v2 v2.10.0
github.com/rogpeppe/go-internal v1.15.0
github.com/rogpeppe/go-internal v1.16.0
github.com/rs/cors v1.11.1
github.com/rs/zerolog v1.35.1
github.com/shamaton/msgpack/v2 v2.4.1
@@ -96,16 +97,16 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0
go.opentelemetry.io/otel/sdk v1.44.0
go.opentelemetry.io/otel/trace v1.44.0
golang.org/x/crypto v0.53.0
golang.org/x/crypto v0.54.0
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
golang.org/x/image v0.43.0
golang.org/x/net v0.56.0
golang.org/x/image v0.44.0
golang.org/x/net v0.57.0
golang.org/x/oauth2 v0.36.0
golang.org/x/sync v0.21.0
golang.org/x/term v0.44.0
golang.org/x/text v0.38.0
golang.org/x/sync v0.22.0
golang.org/x/term v0.45.0
golang.org/x/text v0.40.0
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa
google.golang.org/grpc v1.82.0
google.golang.org/grpc v1.83.0
google.golang.org/protobuf v1.36.11
gopkg.in/yaml.v2 v2.4.0
gotest.tools/v3 v3.5.2
@@ -127,7 +128,7 @@ require (
github.com/ajg/form v1.5.1 // indirect
github.com/alexedwards/argon2id v1.0.0 // indirect
github.com/amoghe/go-crypt v0.0.0-20220222110647-20eada5f5964 // indirect
github.com/antithesishq/antithesis-sdk-go v0.7.0-default-no-op // indirect
github.com/antithesishq/antithesis-sdk-go v0.7.2-default-no-op // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.55.8 // indirect
@@ -154,7 +155,6 @@ require (
github.com/blevesearch/zapx/v17 v17.1.2 // indirect
github.com/bluele/gcache v0.0.2 // indirect
github.com/bombsimon/logrusr/v3 v3.1.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/ceph/go-ceph v0.40.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 // indirect
@@ -186,7 +186,7 @@ require (
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/gdexlab/go-render v1.0.1 // indirect
github.com/go-acme/lego/v4 v4.34.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/go-git/go-git/v5 v5.19.1 // indirect
@@ -194,7 +194,7 @@ require (
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-micro/plugins/v4/events/natsjs v1.2.2 // indirect
github.com/go-micro/plugins/v4/store/nats-js v1.2.1 // indirect
@@ -215,7 +215,6 @@ require (
github.com/goccy/go-json v0.10.6 // indirect
github.com/goccy/go-yaml v1.19.2 // indirect
github.com/gofrs/flock v0.13.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/snappy v1.0.0 // indirect
@@ -240,7 +239,7 @@ require (
github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12 // indirect
github.com/juliangruber/go-intersect v1.1.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.18.6 // indirect
github.com/klauspost/compress v1.19.1 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/klauspost/crc32 v1.3.0 // indirect
github.com/kovidgoyal/go-parallel v1.1.1 // indirect
@@ -260,7 +259,7 @@ require (
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.21 // indirect
github.com/mattn/go-runewidth v0.0.23 // indirect
github.com/mattn/go-sqlite3 v1.14.47 // indirect
github.com/mattn/go-sqlite3 v1.14.49 // indirect
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b // indirect
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 // indirect
github.com/miekg/dns v1.1.72 // indirect
@@ -295,8 +294,8 @@ require (
github.com/pquerna/cachecontrol v0.2.0 // indirect
github.com/prometheus/alertmanager v0.33.1 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.67.5 // indirect
github.com/prometheus/procfs v0.20.1 // indirect
github.com/prometheus/common v0.70.1 // indirect
github.com/prometheus/procfs v0.21.1 // indirect
github.com/prometheus/statsd_exporter v0.22.8 // indirect
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
github.com/rs/xid v1.6.0 // indirect
@@ -308,7 +307,7 @@ require (
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/sercand/kuberesolver/v5 v5.1.1 // indirect
github.com/sergi/go-diff v1.4.0 // indirect
github.com/sethvargo/go-password v0.3.1 // indirect
github.com/sethvargo/go-password v0.4.0 // indirect
github.com/skeema/knownhosts v1.3.1 // indirect
github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 // indirect
github.com/spf13/pflag v1.0.10 // indirect
@@ -321,7 +320,7 @@ require (
github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208 // indirect
github.com/trustelem/zxcvbn v1.0.1 // indirect
github.com/valyala/fastjson v1.6.10 // indirect
github.com/vektah/gqlparser/v2 v2.5.34 // indirect
github.com/vektah/gqlparser/v2 v2.5.36 // indirect
github.com/wk8/go-ordered-map v1.0.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
@@ -329,22 +328,22 @@ require (
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/yashtewari/glob-intersection v0.2.0 // indirect
github.com/zeebo/xxh3 v1.1.0 // indirect
go.etcd.io/etcd/api/v3 v3.6.13 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.13 // indirect
go.etcd.io/etcd/client/v3 v3.6.13 // indirect
go.etcd.io/etcd/api/v3 v3.7.1 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.7.1 // indirect
go.etcd.io/etcd/client/v3 v3.7.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 // indirect
go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.uber.org/zap v1.27.1 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.36.0 // indirect
golang.org/x/sys v0.46.0 // indirect
golang.org/x/mod v0.37.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/time v0.15.0 // indirect
golang.org/x/tools v0.45.0 // indirect
golang.org/x/tools v0.47.0 // indirect
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
+72 -73
View File
@@ -90,8 +90,8 @@ github.com/amoghe/go-crypt v0.0.0-20220222110647-20eada5f5964 h1:I9YN9WMo3SUh7p/
github.com/amoghe/go-crypt v0.0.0-20220222110647-20eada5f5964/go.mod h1:eFiR01PwTcpbzXtdMces7zxg6utvFM5puiWHpWB8D/k=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/antithesishq/antithesis-sdk-go v0.7.0-default-no-op h1:Z/MZK75wC/NSrkgqeNIa7jexam9uWzhLmFTSCPI/kn0=
github.com/antithesishq/antithesis-sdk-go v0.7.0-default-no-op/go.mod h1:FQyySiasQQM8735Ddel3MRojmy4dA1IqCeyJ5jmPMbI=
github.com/antithesishq/antithesis-sdk-go v0.7.2-default-no-op h1:p2zFsAzvhIpFya8AIOHIbWf7NGvO34QpLGclyf7nXj8=
github.com/antithesishq/antithesis-sdk-go v0.7.2-default-no-op/go.mod h1:FQyySiasQQM8735Ddel3MRojmy4dA1IqCeyJ5jmPMbI=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
@@ -104,8 +104,8 @@ github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ
github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk=
github.com/bbalet/stopwords v1.0.0 h1:0TnGycCtY0zZi4ltKoOGRFIlZHv0WqpoIGUsObjztfo=
github.com/bbalet/stopwords v1.0.0/go.mod h1:sAWrQoDMfqARGIn4s6dp7OW7ISrshUD8IP2q3KoqPjc=
github.com/beevik/etree v1.6.0 h1:u8Kwy8pp9D9XeITj2Z0XtA5qqZEmtJtuXZRQi+j03eE=
github.com/beevik/etree v1.6.0/go.mod h1:bh4zJxiIr62SOf9pRzN7UUYaEDa9HEKafK25+sLc0Gc=
github.com/beevik/etree v1.7.0 h1:xjBk9O4p4x7D1YajePjfLzdaFC4/uYUENA7P0pv6gXA=
github.com/beevik/etree v1.7.0/go.mod h1:bh4zJxiIr62SOf9pRzN7UUYaEDa9HEKafK25+sLc0Gc=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -162,8 +162,6 @@ github.com/bombsimon/logrusr/v3 v3.1.0 h1:zORbLM943D+hDMGgyjMhSAz/iDz86ZV72qaak/
github.com/bombsimon/logrusr/v3 v3.1.0/go.mod h1:PksPPgSFEL2I52pla2glgCyyd2OqOHAnFF5E+g8Ixco=
github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw=
github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
github.com/bytecodealliance/wasmtime-go/v44 v44.0.0 h1:WRZXnLPIer/TWs5aYPaMlmVcOlzmR6Ur6wjLRIQOhTQ=
github.com/bytecodealliance/wasmtime-go/v44 v44.0.0/go.mod h1:GP93piU+39CoFVCQ5xfHrPOUtL0APlMnkbblJ2d3YY0=
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
@@ -188,8 +186,8 @@ github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJ
github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8=
github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/coreos/go-oidc/v3 v3.19.0 h1:F/xyOi3x1UnG1U27YVnM1N6bHiL1K2upi6U/0qr8r+I=
github.com/coreos/go-oidc/v3 v3.19.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
github.com/coreos/go-oidc/v3 v3.20.0 h1:EtE0WIBHk03N+DqGkY4+UONzzZHk7amKt6IyNd7OsZE=
github.com/coreos/go-oidc/v3 v3.20.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=
@@ -220,8 +218,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1/go.mod h1:ZXNYxsqcloTdSy/rNShjY
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=
github.com/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo=
github.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE=
github.com/dgraph-io/badger/v4 v4.9.2 h1:Wb5qw8gElqwV1a8msHTeQKova9b1V10heFKMIiPd80E=
github.com/dgraph-io/badger/v4 v4.9.2/go.mod h1:nJjaJTUOSsQEBhsq209FmwCvMJzEA3e74RjZw6V2pQI=
github.com/dgraph-io/badger/v4 v4.9.4 h1:bcw+waCpzRZ2nmcSPbnPvDVhiEsn98TKmvnAhK7r7LM=
github.com/dgraph-io/badger/v4 v4.9.4/go.mod h1:nJjaJTUOSsQEBhsq209FmwCvMJzEA3e74RjZw6V2pQI=
github.com/dgraph-io/ristretto v0.2.0 h1:XAfl+7cmoUDWW/2Lx8TGZQjjxIQ2Ley9DSf52dru4WE=
github.com/dgraph-io/ristretto v0.2.0/go.mod h1:8uBHCU/PBV4Ag0CJrP47b9Ofby5dqWNh4FicAdoqFNU=
github.com/dgraph-io/ristretto/v2 v2.2.0 h1:bkY3XzJcXoMuELV8F+vS8kzNgicwQFAaGINAEJdWGOM=
@@ -268,8 +266,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho=
github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo=
github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM=
github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
github.com/gabriel-vasile/mimetype v1.4.15 h1:05iP/CYtZ/w455R/KZM6rZ5ieAdh99UPtd+d3YzLmaI=
github.com/gabriel-vasile/mimetype v1.4.15/go.mod h1:azpTcoLcDZRNgFou5j+APrqQx9HqVPWa6ijYQIIVswQ=
github.com/gdexlab/go-render v1.0.1 h1:rxqB3vo5s4n1kF0ySmoNeSPRYkEsyHgln4jFIQY7v0U=
github.com/gdexlab/go-render v1.0.1/go.mod h1:wRi5nW2qfjiGj4mPukH4UV0IknS1cHD4VgFTmJX5JzM=
github.com/ggwhite/go-masker v1.1.0 h1:kN/KIvktu2U+hd3KWrSlLj7xBGD1iBfc9/xdbVgFbRc=
@@ -286,10 +284,10 @@ github.com/go-acme/lego/v4 v4.34.0 h1:oRsIuPJ4ORX7ufviXvelUpBSez2XxeKGwo5pNG9BVe
github.com/go-acme/lego/v4 v4.34.0/go.mod h1:gsmdlx/ZS6OUeXbOj0U+VnCLLfEFj4WCYRkcGpZw+pc=
github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-asn1-ber/asn1-ber v1.4.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 h1:BP4M0CvQ4S3TGls2FvczZtj5Re/2ZzkV9VwqPHH/3Bo=
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-chi/chi/v5 v5.3.0 h1:halUjDxhshgXHMrao5bB8eNBXo/rnzwr8m5m36glehM=
github.com/go-chi/chi/v5 v5.3.0/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto=
github.com/go-asn1-ber/asn1-ber v1.5.8 h1:H9AZkK22UOmfX8J84ubyaZxKJZ3FMHVwn8swoMML7iQ=
github.com/go-asn1-ber/asn1-ber v1.5.8/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8=
github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto=
github.com/go-chi/httprate v0.16.0 h1:8V5DH9j6pSK6UQoBsTpvMyFxycqaKEIToyPKzHJjUa8=
github.com/go-chi/httprate v0.16.0/go.mod h1:A8lo+qRhk+s9LiuP5saS7XCGDXRXMcrueq0NfIuCa/I=
github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4=
@@ -317,8 +315,8 @@ github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBj
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
github.com/go-ldap/ldap/v3 v3.1.7/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q=
github.com/go-ldap/ldap/v3 v3.4.13 h1:+x1nG9h+MZN7h/lUi5Q3UZ0fJ1GyDQYbPvbuH38baDQ=
github.com/go-ldap/ldap/v3 v3.4.13/go.mod h1:LxsGZV6vbaK0sIvYfsv47rfh4ca0JXokCoKjZxsszv0=
github.com/go-ldap/ldap/v3 v3.4.14 h1:D6PYdEgsaVzsXyr6w/yDC06Ria4uUhWm+Rb+er8lfAs=
github.com/go-ldap/ldap/v3 v3.4.14/go.mod h1:S4eJUMUNjDkE0ZJtIZdybwyb03sGGLW6gxXT1Hs8VKA=
github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3 h1:sfz1YppV05y4sYaW7kXZtrocU/+vimnIWt4cxAYh7+o=
github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3/go.mod h1:ZXFhGda43Z2TVbfGZefXyMJzsDHhCh0go3bZUcwTx7o=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
@@ -327,8 +325,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8=
github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-micro/plugins/v4/client/grpc v1.2.1 h1:7xAwZRCO6mdUtBHsYIQs1/eCTdhCrnjF70GB+AVd6L0=
@@ -398,7 +396,6 @@ github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx
github.com/gofrs/uuid/v5 v5.4.0 h1:EfbpCTjqMuGyq5ZJwxqzn3Cbr2d0rUZU7v5ycAk/e/0=
github.com/gofrs/uuid/v5 v5.4.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
@@ -576,8 +573,8 @@ github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao=
github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/compress v1.19.1 h1:VsB4HPswih7mmZ8WleSFQ75c/Ui1M4trX5oAsJnhSlk=
github.com/klauspost/compress v1.19.1/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
@@ -597,8 +594,8 @@ github.com/kovidgoyal/go-parallel v1.1.1 h1:1OzpNjtrUkBPq3UaqrnvOoB2F9RttSt811ui
github.com/kovidgoyal/go-parallel v1.1.1/go.mod h1:BJNIbe6+hxyFWv7n6oEDPj3PA5qSw5OCtf0hcVxWJiw=
github.com/kovidgoyal/go-shm v1.0.0 h1:HJEel9D1F9YhULvClEHJLawoRSj/1u/EDV7MJbBPgQo=
github.com/kovidgoyal/go-shm v1.0.0/go.mod h1:Yzb80Xf9L3kaoB2RGok9hHwMIt7Oif61kT6t3+VnZds=
github.com/kovidgoyal/imaging v1.8.22 h1:CtpoRXQpS79xxJsKu8+LUJJE/0i4FLquJZy0QH+QNlM=
github.com/kovidgoyal/imaging v1.8.22/go.mod h1:y8wo4JTv4D+skbtQf6fHg8nA1qtagvCcn8J2Nu5k2Jg=
github.com/kovidgoyal/imaging v1.8.23 h1:4WsboyQ/E8tic2kX49P93Rvscg33SPsCwTBG5EZZF54=
github.com/kovidgoyal/imaging v1.8.23/go.mod h1:k3Iot3H0v2rSWXIxQISfT3e9wIryqzAHLHCuhG7z9lM=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@@ -652,8 +649,8 @@ github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLG
github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=
github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
github.com/mattn/go-sqlite3 v1.14.47 h1:jOBI62gS7nKeZv+as1oGEy0+1qISgXwH/QBlR6KbfIo=
github.com/mattn/go-sqlite3 v1.14.47/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w=
github.com/mattn/go-sqlite3 v1.14.49 h1:B8jBHC3xhxZgxztrgruTuLucebnULQnx4W7cF7SAE9w=
github.com/mattn/go-sqlite3 v1.14.49/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b h1:Q53idHrTuQDDHyXaxZ6pUl0I9uyD6Z6uKFK3ocX6LzI=
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b/go.mod h1:KirJrATYGbTyUwVR26xIkaipRqRcMRXBf8N5dacvGus=
@@ -699,8 +696,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nats-io/jwt/v2 v2.8.2 h1:XXRgB60MSTnqsRwejQurVDs/hcv2dkt+86GjI+I/bMc=
github.com/nats-io/jwt/v2 v2.8.2/go.mod h1:Ag/56sq9OblL4JgdYufDd16Egb17Kr/8WwwuO/forVc=
github.com/nats-io/nats-server/v2 v2.14.3 h1:+xjydPt7rkit67G+04TN0mcO2n+8nveZE7tK/PPV53A=
github.com/nats-io/nats-server/v2 v2.14.3/go.mod h1:5IlCtBzfwyzQzPMjmoJ9W2/LKmnJRtNyuOs/OT+NHDY=
github.com/nats-io/nats-server/v2 v2.14.4 h1:efgjZ8cdExAKRuqSg8UPJFprb+l7NlBtSDPhDlw3rO4=
github.com/nats-io/nats-server/v2 v2.14.4/go.mod h1:BltdpOYestjbtQSnVO2zGHdg5SGBZjt+GYTgB9LZq/I=
github.com/nats-io/nats.go v1.52.0 h1:n3avV4VBsCgsdwh71TppsTwtv+QdPs7ntSKM8qJLGsc=
github.com/nats-io/nats.go v1.52.0/go.mod h1:26HypzazeOkyO3/mqd1zZd53STJN0EjCYF9Uy2ZOBno=
github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg=
@@ -730,8 +727,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.42.1 h1:iN1rCUX+44NZ1Dc97MPoeFYbFR0vh8zxoxMFwKdyZ6I=
github.com/onsi/gomega v1.42.1/go.mod h1:REff/hsDsodHoKlWsP2mAPhu1+5/6hVYNf9rIEBpeSg=
github.com/open-policy-agent/opa v1.18.2 h1:VBiLJpioTuk7XTW1JoQi4ILo+FVxD2/8uD8iP9/OcxY=
github.com/open-policy-agent/opa v1.18.2/go.mod h1:9GY+hER4ZEXtxPlMjftVbqJJY9xLtCD3Q0oufRCfAKo=
github.com/open-policy-agent/opa v1.19.0 h1:+j2OCsjMezZEML2T1lI9giJdGJS/PL1XFKgkHPGIhpo=
github.com/open-policy-agent/opa v1.19.0/go.mod h1:pb6Y6klyf7X7X8uXNDflruA9dQC2gMqWROXI5w/kvv0=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
@@ -739,8 +736,8 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 h1:JRidLTAKhnvyLMRtVtSF4lhBa0NSAOs6fof+d6JnKII=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245/go.mod h1:z61VMGAJRtR1nbgXWiNoCkxUXP1B3Je9rMuJbnGd+Og=
github.com/owncloud/reva/v2 v2.0.0-20260710104539-1f85e04c1e35 h1:40KHez6z6Ea+MHatRfZp4ZTX1TASGRG5UfvOpsQRbgU=
github.com/owncloud/reva/v2 v2.0.0-20260710104539-1f85e04c1e35/go.mod h1:m2fGRZDsnNSBszbnwysuq7uhlitQ90+weX4FFQRdkak=
github.com/owncloud/reva/v2 v2.0.0-20260806084131-831afd01e5d4 h1:Cnq24qhteHD30DfTG8o0bf3cnVL/2b+afz//0qGjAeU=
github.com/owncloud/reva/v2 v2.0.0-20260806084131-831afd01e5d4/go.mod h1:XBnHPPDOGYq+Uf/PD1wGXne3xTvoghBxXPUULcSZjlc=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pablodz/inotifywaitgo v0.0.12 h1:DVJJTFMDlSAdO46yisPF2vzozs/r+4k6ih8MVghq78M=
@@ -780,8 +777,8 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_golang v1.24.1 h1:JnJkREXzWxUdCuPFpIWZiPispT9xVV59uiuyR2bPlnU=
github.com/prometheus/client_golang v1.24.1/go.mod h1:F+oSRECHg4sse5ucfYpYDeIv/hu68Zo0uoHKetWnzcE=
github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -796,8 +793,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4=
github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw=
github.com/prometheus/common v0.70.1 h1:1HvjP4D5oL3t8RsPlwxA9onvvStjtIHYE5XuuwOi/PY=
github.com/prometheus/common v0.70.1/go.mod h1:VdFUQDMZK3VLkurFUVhia6uys/0suUp86TJz5qbJRhc=
github.com/prometheus/procfs v0.0.0-20170703101242-e645f4e5aaa8/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
@@ -805,8 +802,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc=
github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo=
github.com/prometheus/procfs v0.21.1 h1:GljZCt+zSTS+NZq88cyQ1LjZ+RCHp3uVuabBWA5+OJI=
github.com/prometheus/procfs v0.21.1/go.mod h1:aB55Cww9pdSJVHk0hUf0inxWyyjPogFIjmHKYgMKmtY=
github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI=
github.com/prometheus/statsd_exporter v0.22.8 h1:Qo2D9ZzaQG+id9i5NYNGmbf1aa/KxKbB9aKfMS+Yib0=
github.com/prometheus/statsd_exporter v0.22.8/go.mod h1:/DzwbTEaFTE0Ojz5PqcSk6+PFHOPWGxdXVr6yC8eFOM=
@@ -815,8 +812,8 @@ github.com/r3labs/sse/v2 v2.10.0/go.mod h1:Igau6Whc+F17QUgML1fYe1VPZzTV6EMCnYktE
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 h1:bsUq1dX0N8AOIL7EB/X911+m4EHsnWEHeJ0c+3TTBrg=
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.15.0 h1:D0RCU5rMAp+SpgkiNdrjfJ+LX4J1M32V2NeCY7EJ6hc=
github.com/rogpeppe/go-internal v1.15.0/go.mod h1:DrUVZyrJU+txYW5/1kwtXQSMFio52ZOxX7yM1VHvnxs=
github.com/rogpeppe/go-internal v1.16.0 h1:O9DK+vNMDVGLr2BeZqmpLeMjiMNkuXfcqntWbZV6S5g=
github.com/rogpeppe/go-internal v1.16.0/go.mod h1:DrUVZyrJU+txYW5/1kwtXQSMFio52ZOxX7yM1VHvnxs=
github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=
github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
@@ -839,8 +836,8 @@ github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aep
github.com/sercand/kuberesolver/v5 v5.1.1/go.mod h1:Fs1KbKhVRnB2aDWN12NjKCB+RgYMWZJ294T3BtmVCpQ=
github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw=
github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
github.com/sethvargo/go-password v0.3.1 h1:WqrLTjo7X6AcVYfC6R7GtSyuUQR9hGyAj/f1PYQZCJU=
github.com/sethvargo/go-password v0.3.1/go.mod h1:rXofC1zT54N7R8K/h1WDUdkf9BOx5OptoxrMBcrXzvs=
github.com/sethvargo/go-password v0.4.0 h1:eSidVKQw5C7CmTDAtH3RipBTSjdU1ZRxQaynD2GWLVU=
github.com/sethvargo/go-password v0.4.0/go.mod h1:PO3nYHwUpcHPR0F9woy7a4abZPvzRuqJr0GaeIYTm3k=
github.com/shamaton/msgpack/v2 v2.4.1 h1:JtJ141QoQ3NqgPDsjq2v9VXlaON8SiQOwEaoNLEK/MQ=
github.com/shamaton/msgpack/v2 v2.4.1/go.mod h1:6khjYnkx73f7VQU7wjcFS9DFjs+59naVWJv1TB7qdOI=
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
@@ -887,6 +884,8 @@ github.com/tchap/go-patricia/v2 v2.3.3 h1:xfNEsODumaEcCcY3gI0hYPZ/PcpVv5ju6RMAhg
github.com/tchap/go-patricia/v2 v2.3.3/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=
github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE=
github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU=
github.com/tetratelabs/wazero v1.12.0 h1:DuWcpNu/FzgEXgGBDp8J1Spc+CWOvvtvVyjKlaZopYU=
github.com/tetratelabs/wazero v1.12.0/go.mod h1:LvKtzl2RqO4gyF27BiXU+nKAjcV8f38U+kP/q2vgxh0=
github.com/thanhpk/randstr v1.0.6 h1:psAOktJFD4vV9NEVb3qkhRSMvYh4ORRaj1+w/hn4B+o=
github.com/thanhpk/randstr v1.0.6/go.mod h1:M/H2P1eNLZzlDwAzpkkkUvoyNNMbzRGhESZuEQk3r0U=
github.com/thejerf/suture/v4 v4.0.6 h1:QsuCEsCqb03xF9tPAsWAj8QOAJBgQI1c0VqJNaingg8=
@@ -915,8 +914,8 @@ github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
github.com/valyala/fastjson v1.6.10 h1:/yjJg8jaVQdYR3arGxPE2X5z89xrlhS0eGXdv+ADTh4=
github.com/valyala/fastjson v1.6.10/go.mod h1:e6FubmQouUNP73jtMLmcbxS6ydWIpOfhz34TSfO3JaE=
github.com/vektah/gqlparser/v2 v2.5.34 h1:MEea5P0qhdcqfBL45ghKE+qr9laidVHTMHjav5h7ckk=
github.com/vektah/gqlparser/v2 v2.5.34/go.mod h1:mFdHLGCio7OGX1fby9ZjTW6FN+qxgmbnBcRIeeScE5s=
github.com/vektah/gqlparser/v2 v2.5.36 h1:CN9mKVHgMkc+XftdOWIhb4HEL8wKSYkFAqhf8booa7s=
github.com/vektah/gqlparser/v2 v2.5.36/go.mod h1:cAJ9qwVgPaUkWv6Gn8vn0mqOE0Ui5Pn56wNy5396XWo=
github.com/wk8/go-ordered-map v1.0.0 h1:BV7z+2PaK8LTSd/mWgY12HyMAo5CEgkHqbkVq2thqr8=
github.com/wk8/go-ordered-map v1.0.0/go.mod h1:9ZIbRunKbuvfPKyBP1SIKLcXNlv74YCOZ3t3VTS6gRk=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
@@ -950,12 +949,12 @@ github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
go.etcd.io/bbolt v1.5.0 h1:S7GAl7Fxv12yohbwFfIbQCGDWbQbtDGPET4P/bD4lxU=
go.etcd.io/bbolt v1.5.0/go.mod h1:mkltfYE5aUHQxUct9N9V+Kp7aSjFqjgrhcXIS70Lrdk=
go.etcd.io/etcd/api/v3 v3.6.13 h1:AvHPZv15LYEe7tZDyFglv7xnbiuF6GMZpZqKpIzXTt0=
go.etcd.io/etcd/api/v3 v3.6.13/go.mod h1:X9+3gaKwzjlOxzo6TZ2u3b7HcHBcAL+Ph7EBPjI/VWk=
go.etcd.io/etcd/client/pkg/v3 v3.6.13 h1:7QeMOisYByx8dBA7/CKcwCaPWfjb5C0xpmrIov/8WyY=
go.etcd.io/etcd/client/pkg/v3 v3.6.13/go.mod h1:Dn2zUBOCu/6xYcd6iAjB7LgoY16OTQjDZfWHLwvuQj4=
go.etcd.io/etcd/client/v3 v3.6.13 h1:0E+9ZYGpMsi9KlOJVoCdONh9PUDawKDTy5mSNY8wOEI=
go.etcd.io/etcd/client/v3 v3.6.13/go.mod h1:rtVI3vwobljb8xlTGcp1Yhz7hBIuBWULXwB848kqJGw=
go.etcd.io/etcd/api/v3 v3.7.1 h1:KJG0/DcWGfe3Y1otDf/fsBf0TSSgpxZ5RO/L8SFt73E=
go.etcd.io/etcd/api/v3 v3.7.1/go.mod h1:8bXIpCMeV7E3/XL0Ix123ATn3dB+0V7d9zklHbB0m78=
go.etcd.io/etcd/client/pkg/v3 v3.7.1 h1:rKYsj3pRkR0eK3yjT3XOgrhqfmIfj9pzNgxjh7mfFv4=
go.etcd.io/etcd/client/pkg/v3 v3.7.1/go.mod h1:cnzZGIUzSfjEwLC6UBVsSXlEK1eepS/JUD7wE6PLRT0=
go.etcd.io/etcd/client/v3 v3.7.1 h1:0PEMMC0KuZmVIN+RAbdqfkZ45pYTgKVtmBEbRCvZFUg=
go.etcd.io/etcd/client/v3 v3.7.1/go.mod h1:ffNqALa8tRCYhYo1F9oR489y23K39Gz+BSR3ApAGYq0=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
@@ -998,8 +997,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
@@ -1015,8 +1014,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto=
golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio=
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1031,8 +1030,8 @@ golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJk
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.43.0 h1:FLxcP4ec2350nTfOC8ysKtqYSIFbk/QGjw1ZHNP4tsY=
golang.org/x/image v0.43.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
golang.org/x/image v0.44.0 h1:+tDekMZED9+LrtB3G5xzRggpVh9CARjZqROla3R3R+I=
golang.org/x/image v0.44.0/go.mod h1:V8K3KE9KKKE+pLpQDOeN18w9oacNSvy1tDOirTu4xtY=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -1054,8 +1053,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4=
golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ=
golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ=
golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1099,8 +1098,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec=
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1124,8 +1123,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1188,8 +1187,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
@@ -1197,8 +1196,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc=
golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y=
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1210,8 +1209,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1264,8 +1263,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210112230658-8b4aab62c064/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8=
golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0=
golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q=
golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1343,8 +1342,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.82.0 h1:vguDnZUPjE26w09A63VoxZPnvPjB5Riyc0mkXPFmAIU=
google.golang.org/grpc v1.82.0/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
google.golang.org/grpc v1.83.0 h1:JeNZEKJFbQxArAMl+hiytHauacDNqJUllNfmIMmpqnQ=
google.golang.org/grpc v1.83.0/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ=
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e h1:m7aQHHqd0q89mRwhwS9Bx2rjyl/hsFAeta+uGrHsQaU=
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+1 -1
View File
@@ -213,7 +213,7 @@ func (c *ConcreteClient) getKeyCloakID(u *libregraph.User) (string, error) {
func convertUserActions(userActions []UserAction) *[]string {
stringActions := make([]string, len(userActions))
for i, a := range userActions {
stringActions[i] = userActionsToString[a]
stringActions[i] = string(a)
}
return &stringActions
}
+26 -11
View File
@@ -7,23 +7,38 @@ import (
libregraph "github.com/owncloud/libre-graph-api-go"
)
// UserAction defines a type for user actions
type UserAction int8
// UserAction is a Keycloak required-action provider ID. It is a free-form
// string so operators can configure any action Keycloak supports; it is passed
// to Keycloak verbatim. The constants below are the common built-ins, provided
// for convenience only - the list does not need to be exhaustive or kept in
// sync with Keycloak.
type UserAction string
// An incomplete list of UserActions
const (
// UserActionUpdatePassword sets it that the user needs to change their password.
UserActionUpdatePassword UserAction = iota
UserActionUpdatePassword UserAction = "UPDATE_PASSWORD"
// UserActionVerifyEmail sets it that the user needs to verify their email address.
UserActionVerifyEmail
UserActionVerifyEmail UserAction = "VERIFY_EMAIL"
// UserActionUpdateProfile sets it that the user needs to update their profile.
UserActionUpdateProfile UserAction = "UPDATE_PROFILE"
// UserActionConfigureTOTP sets it that the user needs to configure a one-time password.
UserActionConfigureTOTP UserAction = "CONFIGURE_TOTP"
// UserActionTermsAndConditions sets it that the user needs to accept the terms and conditions.
UserActionTermsAndConditions UserAction = "TERMS_AND_CONDITIONS"
// UserActionVerifyProfile sets it that the user needs to verify their profile.
UserActionVerifyProfile UserAction = "VERIFY_PROFILE"
// UserActionDeleteAccount sets it that the user is allowed to delete their account.
UserActionDeleteAccount UserAction = "delete_account"
// UserActionUpdateLocale sets it that the user needs to update their locale.
UserActionUpdateLocale UserAction = "update_user_locale"
// UserActionWebauthnRegister sets it that the user needs to register a WebAuthn authenticator.
UserActionWebauthnRegister UserAction = "webauthn-register"
// UserActionWebauthnRegisterPasswordless sets it that the user needs to register a passwordless WebAuthn authenticator.
UserActionWebauthnRegisterPasswordless UserAction = "webauthn-register-passwordless"
// UserActionConfigureRecoveryAuthnCodes sets it that the user needs to configure recovery authentication codes.
UserActionConfigureRecoveryAuthnCodes UserAction = "CONFIGURE_RECOVERY_AUTHN_CODES"
)
// A lookup table to translate user actions to their string equivalents
var userActionsToString = map[UserAction]string{
UserActionUpdatePassword: "UPDATE_PASSWORD",
UserActionVerifyEmail: "VERIFY_EMAIL",
}
// PIIReport is a structure of all the PersonalIdentifiableInformation contained in keycloak.
type PIIReport struct {
UserData *libregraph.User
+21
View File
@@ -0,0 +1,21 @@
package keycloak_test
import (
"testing"
"github.com/owncloud/ocis/v2/ocis-pkg/keycloak"
"github.com/stretchr/testify/assert"
)
func TestUserActionStringValues(t *testing.T) {
// UserAction is a free-form string passed to Keycloak verbatim; the
// convenience constants must carry the exact Keycloak required-action
// provider IDs.
assert.Equal(t, "UPDATE_PASSWORD", string(keycloak.UserActionUpdatePassword))
assert.Equal(t, "VERIFY_EMAIL", string(keycloak.UserActionVerifyEmail))
assert.Equal(t, "delete_account", string(keycloak.UserActionDeleteAccount))
assert.Equal(t, "webauthn-register", string(keycloak.UserActionWebauthnRegister))
// Arbitrary, non-builtin actions are valid - there is no allowlist.
assert.Equal(t, "CUSTOM_ACTION", string(keycloak.UserAction("CUSTOM_ACTION")))
}
+23 -3
View File
@@ -22,8 +22,8 @@ var (
ErrUnsupportedType = errors.New("unsupported type")
)
// OcisLocale based on gotext.Locale, helps to pass go 1.24 vet on non-constant strings
// Without the interface, go 1.24 vet will complain about non-constant strings used in gotext printf
// OcisLocale based on gotext.Locale, helps to pass go vet on non-constant strings
// Without the interface, go vet will complain about non-constant strings used in gotext printf
// Alternatives would be to use a different workaround or a different library
type OcisLocale interface {
Get(str string, vars ...interface{}) string
@@ -32,6 +32,26 @@ type OcisLocale interface {
GetNC(str, plural string, n int, ctx string, vars ...interface{}) string
}
// ocisLocale forwards to gotext.Locale through func fields instead of embedding it directly.
// go vet's printf analyzer statically detects gotext.Locale.Get as a printf-wrapper and flags
// every non-constant call to it, even through the OcisLocale interface; routing calls through
// func fields hides that static trail.
type ocisLocale struct {
get func(str string, vars ...interface{}) string
getN func(str, plural string, n int, vars ...interface{}) string
getC func(str, ctx string, vars ...interface{}) string
getNC func(str, plural string, n int, ctx string, vars ...interface{}) string
}
func (o ocisLocale) Get(str string, vars ...interface{}) string { return o.get(str, vars...) }
func (o ocisLocale) GetN(str, plural string, n int, vars ...interface{}) string {
return o.getN(str, plural, n, vars...)
}
func (o ocisLocale) GetC(str, ctx string, vars ...interface{}) string { return o.getC(str, ctx, vars...) }
func (o ocisLocale) GetNC(str, plural string, n int, ctx string, vars ...interface{}) string {
return o.getNC(str, plural, n, ctx, vars...)
}
// Template marks a string as translatable
func Template(s string) string { return s }
@@ -75,7 +95,7 @@ func (t Translator) Locale(locale string) OcisLocale {
l = gotext.NewLocaleFS(t.defaultLocale, t.fs)
l.AddDomain(t.domain) // make domain configurable only if needed
}
return l
return ocisLocale{get: l.Get, getN: l.GetN, getC: l.GetC, getNC: l.GetNC}
}
// TranslateEntity function provides the generic way to translate a struct, array or slice.
+53 -17
View File
@@ -8,6 +8,7 @@ import (
"io"
"mime"
"net/http"
"slices"
"strconv"
"strings"
"sync"
@@ -53,13 +54,14 @@ type oidcClient struct {
// Logger to use for logging, must be set
Logger log.Logger
issuer string
provider *ProviderMetadata
providerLock *sync.Mutex
skipIssuerValidation bool
accessTokenVerifyMethod string
remoteKeySet KeySet
algorithms []string
issuer string
provider *ProviderMetadata
providerLock *sync.Mutex
skipIssuerValidation bool
accessTokenVerifyMethod string
accessTokenVerifyAudiences []string
remoteKeySet KeySet
algorithms []string
JWKSOptions config.JWKS
JWKS *keyfunc.JWKS
@@ -88,16 +90,17 @@ func NewOIDCClient(opts ...Option) OIDCClient {
options := newOptions(opts...)
return &oidcClient{
Logger: options.Logger,
issuer: options.OIDCIssuer,
httpClient: options.HTTPClient,
accessTokenVerifyMethod: options.AccessTokenVerifyMethod,
JWKSOptions: options.JWKSOptions, // TODO I don't like that we pass down config options ...
JWKS: options.JWKS,
providerLock: &sync.Mutex{},
jwksLock: &sync.Mutex{},
remoteKeySet: options.KeySet,
provider: options.ProviderMetadata,
Logger: options.Logger,
issuer: options.OIDCIssuer,
httpClient: options.HTTPClient,
accessTokenVerifyMethod: options.AccessTokenVerifyMethod,
accessTokenVerifyAudiences: options.AccessTokenVerifyAudiences,
JWKSOptions: options.JWKSOptions, // TODO I don't like that we pass down config options ...
JWKS: options.JWKS,
providerLock: &sync.Mutex{},
jwksLock: &sync.Mutex{},
remoteKeySet: options.KeySet,
provider: options.ProviderMetadata,
}
}
@@ -314,9 +317,42 @@ func (c *oidcClient) verifyAccessTokenJWT(token string) (RegClaimsWithSID, jwt.M
return claims, mapClaims, err
}
// Verify the token was issued for this instance. Keycloak puts a generic
// value (e.g. "account") in "aud" and the real client id in "azp", so we
// accept the token when the allowlist matches either claim.
if err := c.verifyAudience(claims.Audience, azpFromClaims(mapClaims)); err != nil {
c.Logger.Info().Err(err).Msg("Access token rejected: audience not allowed.")
return claims, mapClaims, err
}
return claims, mapClaims, nil
}
// verifyAudience checks that the token's "aud" or "azp" claim matches the
// configured allowlist. An empty allowlist disables the check.
func (c *oidcClient) verifyAudience(audiences jwt.ClaimStrings, azp string) error {
if len(c.accessTokenVerifyAudiences) == 0 {
return nil
}
for _, allowed := range c.accessTokenVerifyAudiences {
allowed = strings.TrimSpace(allowed)
if allowed == "" {
continue
}
if allowed == azp || slices.Contains(audiences, allowed) {
return nil
}
}
return errors.New("oidc: access token audience is not allowed")
}
func azpFromClaims(claims jwt.MapClaims) string {
if azp, ok := claims["azp"].(string); ok {
return azp
}
return ""
}
func (c *oidcClient) VerifyLogoutToken(ctx context.Context, rawToken string) (*LogoutToken, error) {
var claims LogoutToken
if err := c.lookupWellKnownOpenidConfiguration(ctx); err != nil {
+115
View File
@@ -9,6 +9,7 @@ import (
"github.com/MicahParks/keyfunc/v2"
"github.com/golang-jwt/jwt/v5"
"github.com/owncloud/ocis/v2/ocis-pkg/oidc"
"github.com/owncloud/ocis/v2/services/proxy/pkg/config"
)
type signingKey struct {
@@ -186,6 +187,120 @@ func (l logoutVerificationTest) run(t *testing.T) {
}
}
func TestVerifyAccessTokenAudience(t *testing.T) {
const issuer = "https://foo"
key := newRSAKey(t)
tests := []struct {
name string
// allowlist configured on the client (empty disables the check)
verifyAud []string
// claims of the presented access token
aud interface{}
azp string
wantErr bool
}{
{
name: "check disabled accepts foreign audience",
verifyAud: nil,
aud: "account",
azp: "evil-app",
wantErr: false,
},
{
name: "rejects foreign azp with generic aud (keycloak style)",
verifyAud: []string{"web"},
aud: "account",
azp: "evil-app",
wantErr: true,
},
{
name: "accepts matching azp with generic aud (keycloak style)",
verifyAud: []string{"web"},
aud: "account",
azp: "web",
wantErr: false,
},
{
name: "accepts matching aud (builtin idp style)",
verifyAud: []string{"web"},
aud: "web",
azp: "",
wantErr: false,
},
{
name: "accepts when one of multiple audiences matches",
verifyAud: []string{"desktop", "web"},
aud: []string{"account", "web"},
azp: "evil-app",
wantErr: false,
},
{
name: "rejects when neither aud nor azp match",
verifyAud: []string{"web", "desktop"},
aud: []string{"account", "other"},
azp: "evil-app",
wantErr: true,
},
{
name: "rejects when azp is empty and aud does not match",
verifyAud: []string{"web", "desktop"},
aud: []string{"account", "other"},
azp: "",
wantErr: true,
},
{
name: "tolerates whitespace around configured audience",
verifyAud: []string{" web ", "desktop"},
aud: "account",
azp: "web",
wantErr: false,
},
{
name: "blank configured audience does not match missing azp",
verifyAud: []string{" "},
aud: "account",
azp: "",
wantErr: true,
},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
claims := jwt.MapClaims{
"iss": issuer,
"sub": "einstein",
"aud": tc.aud,
}
if tc.azp != "" {
claims["azp"] = tc.azp
}
tok := jwt.NewWithClaims(jwt.SigningMethodRS256, claims)
tok.Header["kid"] = "1"
signed, err := tok.SignedString(key.priv)
if err != nil {
t.Fatal(err)
}
client := oidc.NewOIDCClient(
oidc.WithOidcIssuer(issuer),
oidc.WithJWKS(key.jwks),
oidc.WithProviderMetadata(&oidc.ProviderMetadata{}),
oidc.WithAccessTokenVerifyMethod(config.AccessTokenVerificationJWT),
oidc.WithAccessTokenVerifyAudiences(tc.verifyAud),
)
_, _, err = client.VerifyAccessToken(context.Background(), signed)
if tc.wantErr && err == nil {
t.Errorf("expected error, got nil")
}
if !tc.wantErr && err != nil {
t.Errorf("expected no error, got %v", err)
}
})
}
}
func newRSAKey(t testing.TB) *signingKey {
priv, err := rsa.GenerateKey(rand.Reader, 1028)
if err != nil {
+13
View File
@@ -35,6 +35,11 @@ type Options struct {
// AccessTokenVerifyMethod to use when verifying access tokens
// TODO pass a function or interface to verify? an AccessTokenVerifier?
AccessTokenVerifyMethod string
// AccessTokenVerifyAudiences is the list of accepted audiences for JWT
// access tokens. When non-empty, a token is only accepted if one of these
// values is present in its "aud" claim or matches its "azp" claim. An empty
// list disables the check.
AccessTokenVerifyAudiences []string
// Config to use
Config *goidc.Config
@@ -74,6 +79,14 @@ func WithAccessTokenVerifyMethod(val string) Option {
}
}
// WithAccessTokenVerifyAudiences provides a function to set the
// accessTokenVerifyAudiences option.
func WithAccessTokenVerifyAudiences(val []string) Option {
return func(o *Options) {
o.AccessTokenVerifyAudiences = val
}
}
// WithHTTPClient provides a function to set the httpClient option.
func WithHTTPClient(val *http.Client) Option {
return func(o *Options) {
+8
View File
@@ -2,6 +2,7 @@ package config
import (
"context"
"time"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
)
@@ -66,6 +67,9 @@ type LDAPProvider struct {
Insecure bool `yaml:"insecure" env:"OCIS_LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE" desc:"Disable TLS certificate validation for the LDAP connections. Do not set this in production environments." introductionVersion:"pre5.0"`
BindDN string `yaml:"bind_dn" env:"OCIS_LDAP_BIND_DN;AUTH_BASIC_LDAP_BIND_DN" desc:"LDAP DN to use for simple bind authentication with the target LDAP server." introductionVersion:"pre5.0"`
BindPassword string `yaml:"bind_password" env:"OCIS_LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD" desc:"Password to use for authenticating the 'bind_dn'." introductionVersion:"pre5.0"`
RetryMaxCount int `yaml:"retry_max_count" env:"OCIS_LDAP_RETRY_MAX_COUNT;AUTH_BASIC_LDAP_RETRY_MAX_COUNT" desc:"Maximum number of retries for failed LDAP operations. Applies to both read and write operations (with different retryable error sets). Default 1." introductionVersion:"8.2.0"`
RetryBaseDelay time.Duration `yaml:"retry_base_delay" env:"OCIS_LDAP_RETRY_BASE_DELAY;AUTH_BASIC_LDAP_RETRY_BASE_DELAY" desc:"Base delay for exponential backoff between LDAP retries (e.g. '100ms'). Set to 0 to disable backoff." introductionVersion:"8.2.0"`
RetryMaxDelay time.Duration `yaml:"retry_max_delay" env:"OCIS_LDAP_RETRY_MAX_DELAY;AUTH_BASIC_LDAP_RETRY_MAX_DELAY" desc:"Maximum delay cap for exponential backoff between LDAP retries (e.g. '5s'). 0 (default) uses the library default cap of 60s." introductionVersion:"8.2.0"`
UserBaseDN string `yaml:"user_base_dn" env:"OCIS_LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN" desc:"Search base DN for looking up LDAP users." introductionVersion:"pre5.0"`
GroupBaseDN string `yaml:"group_base_dn" env:"OCIS_LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN" desc:"Search base DN for looking up LDAP groups." introductionVersion:"pre5.0"`
UserScope string `yaml:"user_scope" env:"OCIS_LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE" desc:"LDAP search scope to use when looking up users. Supported values are 'base', 'one' and 'sub'." introductionVersion:"pre5.0"`
@@ -83,6 +87,10 @@ type LDAPProvider struct {
UserGuestAttribute string `yaml:"user_guest_attribute" env:"OCIS_LDAP_USER_GUEST_ATTRIBUTE" desc:"LDAP attribute that marks a user as a guest of an instance." introductionVersion:"7.0"`
UserSchema LDAPUserSchema `yaml:"user_schema"`
GroupSchema LDAPGroupSchema `yaml:"group_schema"`
PoolEnabled bool `yaml:"pool_enabled" env:"OCIS_LDAP_POOL_ENABLED;AUTH_BASIC_LDAP_POOL_ENABLED" desc:"Enable a bounded pool of LDAP connections instead of a single long-lived reconnecting connection. Concurrent requests then no longer serialize on one connection." introductionVersion:"8.2.0"`
PoolSize int `yaml:"pool_size" env:"OCIS_LDAP_POOL_SIZE;AUTH_BASIC_LDAP_POOL_SIZE" desc:"Maximum number of concurrently open LDAP connections when 'OCIS_LDAP_POOL_ENABLED' is 'true'. Defaults to 5 when unset or <= 0." introductionVersion:"8.2.0"`
PoolCheckoutTimeout time.Duration `yaml:"pool_checkout_timeout" env:"OCIS_LDAP_POOL_CHECKOUT_TIMEOUT;AUTH_BASIC_LDAP_POOL_CHECKOUT_TIMEOUT" desc:"Maximum time to wait for a pooled LDAP connection to become available once the pool is exhausted. Defaults to 30s when unset or <= 0. See the Environment Variable Types description for more details." introductionVersion:"8.2.0"`
}
type LDAPUserSchema struct {
@@ -2,6 +2,7 @@ package defaults
import (
"path/filepath"
"time"
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
ocisldap "github.com/owncloud/ocis/v2/ocis-pkg/ldap"
@@ -52,9 +53,13 @@ func DefaultConfig() *config.Config {
UserObjectClass: "inetOrgPerson",
GroupObjectClass: "groupOfNames",
BindDN: "uid=reva,ou=sysusers,o=libregraph-idm",
RetryMaxCount: 1,
DisableUserMechanism: "attribute",
LdapDisabledUsersGroupDN: "cn=DisabledUsersGroup,ou=groups,o=libregraph-idm",
IDP: "https://localhost:9200",
PoolEnabled: false,
PoolSize: 5,
PoolCheckoutTimeout: 30 * time.Second,
UserSchema: config.LDAPUserSchema{
ID: "ownclouduuid",
Mail: "mail",
@@ -62,6 +62,9 @@ func ldapConfigFromString(cfg config.LDAPProvider) map[string]interface{} {
"insecure": cfg.Insecure,
"bind_username": cfg.BindDN,
"bind_password": cfg.BindPassword,
"retry_max_count": cfg.RetryMaxCount,
"retry_base_delay": cfg.RetryBaseDelay,
"retry_max_delay": cfg.RetryMaxDelay,
"user_base_dn": cfg.UserBaseDN,
"group_base_dn": cfg.GroupBaseDN,
"user_filter": cfg.UserFilter,
@@ -75,6 +78,9 @@ func ldapConfigFromString(cfg config.LDAPProvider) map[string]interface{} {
"user_enabled_property": cfg.UserSchema.Enabled,
"group_local_disabled_dn": cfg.LdapDisabledUsersGroupDN,
"idp": cfg.IDP,
"pool_enabled": cfg.PoolEnabled,
"pool_size": cfg.PoolSize,
"pool_checkout_timeout": cfg.PoolCheckoutTimeout,
"user_schema": map[string]interface{}{
"id": cfg.UserSchema.ID,
"idIsOctetString": cfg.UserSchema.IDIsOctetString,
@@ -128,6 +128,20 @@ func WopiContextAuthMiddleware(cfg *config.Config, st microstore.Store, next htt
claims.WopiContext.AccessToken = wopiContextAccessToken
// The view only token is encrypted the same way as the access token
// (see GenerateWopiToken). Decrypt it so downstream consumers get the
// plaintext reva token. It is only set for view only shares, so skip
// the decryption when it is empty.
if claims.WopiContext.ViewOnlyToken != "" {
wopiContextViewOnlyToken, err := DecryptAES([]byte(cfg.Wopi.Secret), claims.WopiContext.ViewOnlyToken)
if err != nil {
wopiLogger.Error().Err(err).Msg("failed to decrypt view only token")
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
return
}
claims.WopiContext.ViewOnlyToken = wopiContextViewOnlyToken
}
ctx = context.WithValue(ctx, wopiContextKey, claims.WopiContext)
// authentication for the CS3 api
ctx = metadata.AppendToOutgoingContext(ctx, ctxpkg.TokenHeader, claims.WopiContext.AccessToken)
@@ -201,6 +215,18 @@ func GenerateWopiToken(wopiContext WopiContext, cfg *config.Config, st microstor
return "", 0, err
}
// The view only token is a reva token that impersonates the resource owner.
// It must never be exposed in plaintext inside the (readable) WOPI JWT, so
// encrypt it the same way as the access token. It is only set for view only
// shares, so skip the encryption when it is empty.
if wopiContext.ViewOnlyToken != "" {
cryptedViewOnlyToken, err := EncryptAES([]byte(cfg.Wopi.Secret), wopiContext.ViewOnlyToken)
if err != nil {
return "", 0, err
}
wopiContext.ViewOnlyToken = cryptedViewOnlyToken
}
cs3Claims := &jwt.RegisteredClaims{}
_, err = jwt.ParseWithClaims(wopiContext.AccessToken, cs3Claims, func(token *jwt.Token) (interface{}, error) {
if token.Method != jwt.SigningMethodHS256 {
@@ -11,6 +11,7 @@ import (
appprovider "github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1"
userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
providerv1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/golang-jwt/jwt/v5"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/owncloud/ocis/v2/services/collaboration/pkg/config"
@@ -168,6 +169,60 @@ var _ = Describe("Wopi Context Middleware", func() {
mw.ServeHTTP(resp, req)
Expect(resp.Code).To(Equal(http.StatusOK))
})
It("Should encrypt the ViewOnlyToken inside the WOPI token and restore it on the way in", func() {
// a known, recognizable plaintext so we can assert it is not readable in the JWT
const viewOnlyPlaintext = "my-secret-view-only-token"
// capture the WopiContext the middleware hands to the next handler
var captured middleware.WopiContext
var capturedErr error
capturingNext := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
captured, capturedErr = middleware.WopiContextFromCtx(r.Context())
w.WriteHeader(http.StatusOK)
})
capturingMw := middleware.WopiContextAuthMiddleware(cfg, nil, capturingNext)
token, err := tknMngr.MintToken(ctx, user, nil)
Expect(err).ToNot(HaveOccurred())
wopiContext := middleware.WopiContext{
AccessToken: token,
ViewOnlyToken: viewOnlyPlaintext,
ViewMode: appprovider.ViewMode_VIEW_MODE_VIEW_ONLY,
FileReference: &providerv1beta1.Reference{
ResourceId: rid,
Path: ".",
},
}
wopiToken, ttl, err := middleware.GenerateWopiToken(wopiContext, cfg, nil)
Expect(err).ToNot(HaveOccurred())
// Security property: the plaintext view-only token must not be recoverable
// from the (readable) JWT. Parse the JWT and assert the ViewOnlyToken claim
// is present but is ciphertext, not the plaintext value.
claims := &middleware.Claims{}
_, err = jwt.ParseWithClaims(wopiToken, claims, func(t *jwt.Token) (interface{}, error) {
return []byte(cfg.Wopi.Secret), nil
})
Expect(err).ToNot(HaveOccurred())
Expect(claims.WopiContext.ViewOnlyToken).ToNot(BeEmpty())
Expect(claims.WopiContext.ViewOnlyToken).ToNot(Equal(viewOnlyPlaintext))
// No-regression property: the middleware must decrypt the token back to the
// original plaintext so downstream consumers get a usable reva token.
req := httptest.NewRequest("GET", src.String(), nil).WithContext(ctx)
q := req.URL.Query()
q.Add("access_token", wopiToken)
q.Add("access_token_ttl", strconv.FormatInt(ttl, 10))
req.URL.RawQuery = q.Encode()
resp := httptest.NewRecorder()
capturingMw.ServeHTTP(resp, req)
Expect(resp.Code).To(Equal(http.StatusOK))
Expect(capturedErr).ToNot(HaveOccurred())
Expect(captured.ViewOnlyToken).To(Equal(viewOnlyPlaintext))
})
It("Should authorize successful with template reference", func() {
req := httptest.NewRequest("GET", src.String(), nil).WithContext(ctx)
token, err := tknMngr.MintToken(ctx, user, nil)
+10
View File
@@ -59,6 +59,16 @@ is based on the [OData Specification](https://docs.oasis-open.org/odata/odata/v4
See the [Libre Graph API](https://owncloud.dev/libre-graph-api/#/users/ListUsers) for examples
on the filters supported when querying users.
## Space Image File Size
A space can have an image, set by assigning a file in the space's `.space` folder via `PATCH /graph/v1beta1/drives/{drive-id}`. Space images are rendered exclusively as thumbnails and there is no raw download fallback, which means an image that the `thumbnails` service refuses to process cannot be displayed at all.
The graph service therefore rejects an assignment with `413/Request Entity Too Large` if the referenced file exceeds `GRAPH_MAX_IMAGE_FILE_SIZE`, defaulting to `50MB`. Without this check, assigning a too large image would succeed but the image would silently never appear. A previously set space image is left unchanged when an assignment is rejected. Set the value to `0` to not limit the file size.
This limit is independent of `THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE` of the `thumbnails` service, which is the upper bound for any image that can be rendered at all. A deployment can set a stricter limit for space images than for thumbnails in general, but `GRAPH_MAX_IMAGE_FILE_SIZE` must be less than or equal to `THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE`. Both default to `50MB`. If the graph limit is set higher, images between the two values are accepted as a space image but cannot be rendered.
Only the file size is enforced. The independent dimension limits of the `thumbnails` service, `THUMBNAILS_MAX_INPUT_WIDTH` and `THUMBNAILS_MAX_INPUT_HEIGHT`, are not checked here, because image dimensions cannot be determined without downloading and decoding the image. A small image with very large dimensions can therefore still be accepted and still fail to render.
## Caching
The `graph` service can use a configured store via `GRAPH_CACHE_STORE`. Possible stores are:
+19 -11
View File
@@ -63,16 +63,23 @@ type Spaces struct {
}
type LDAP struct {
URI string `yaml:"uri" env:"OCIS_LDAP_URI;GRAPH_LDAP_URI" desc:"URI of the LDAP Server to connect to. Supported URI schemes are 'ldaps://' and 'ldap://'" introductionVersion:"pre5.0"`
CACert string `yaml:"cacert" env:"OCIS_LDAP_CACERT;GRAPH_LDAP_CACERT" desc:"Path/File name for the root CA certificate (in PEM format) used to validate TLS server certificates of the LDAP service. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH/idm." introductionVersion:"pre5.0"`
Insecure bool `yaml:"insecure" env:"OCIS_LDAP_INSECURE;GRAPH_LDAP_INSECURE" desc:"Disable TLS certificate validation for the LDAP connections. Do not set this in production environments." introductionVersion:"pre5.0"`
BindDN string `yaml:"bind_dn" env:"OCIS_LDAP_BIND_DN;GRAPH_LDAP_BIND_DN" desc:"LDAP DN to use for simple bind authentication with the target LDAP server." introductionVersion:"pre5.0"`
BindPassword string `yaml:"bind_password" env:"OCIS_LDAP_BIND_PASSWORD;GRAPH_LDAP_BIND_PASSWORD" desc:"Password to use for authenticating the 'bind_dn'." introductionVersion:"pre5.0"`
UseServerUUID bool `yaml:"use_server_uuid" env:"GRAPH_LDAP_SERVER_UUID" desc:"If set to true, rely on the LDAP Server to generate a unique ID for users and groups, like when using 'entryUUID' as the user ID attribute." introductionVersion:"pre5.0"`
UsePasswordModExOp bool `yaml:"use_password_modify_exop" env:"GRAPH_LDAP_SERVER_USE_PASSWORD_MODIFY_EXOP" desc:"Use the 'Password Modify Extended Operation' for updating user passwords." introductionVersion:"pre5.0"`
WriteEnabled bool `yaml:"write_enabled" env:"OCIS_LDAP_SERVER_WRITE_ENABLED;GRAPH_LDAP_SERVER_WRITE_ENABLED" desc:"Allow creating, modifying and deleting LDAP users via the GRAPH API. This can only be set to 'true' when keeping default settings for the LDAP user and group attribute types (the 'OCIS_LDAP_USER_SCHEMA_* and 'OCIS_LDAP_GROUP_SCHEMA_* variables)." introductionVersion:"pre5.0"`
UpdateUserLastSignInDate bool `yaml:"update_user_last_sign_in_date" env:"OCIS_LDAP_UPDATE_LAST_SIGNIN_DATE;GRAPH_LDAP_UPDATE_LAST_SIGNIN_DATE" desc:"Update the 'oCLastSignInTimestamp' LDAP attribute of a user when the user signs in. The attribute is only persisted when 'OCIS_LDAP_SERVER_WRITE_ENABLED' is also enabled. Set this to 'false' to avoid an LDAP write on every sign-in, e.g. when the last sign-in timestamp is not needed or the LDAP write load should be reduced." introductionVersion:"8.2.0"`
RefintEnabled bool `yaml:"refint_enabled" env:"GRAPH_LDAP_REFINT_ENABLED" desc:"Signals that the server has the refint plugin enabled, which makes some actions not needed." introductionVersion:"pre5.0"`
URI string `yaml:"uri" env:"OCIS_LDAP_URI;GRAPH_LDAP_URI" desc:"URI of the LDAP Server to connect to. Supported URI schemes are 'ldaps://' and 'ldap://'" introductionVersion:"pre5.0"`
CACert string `yaml:"cacert" env:"OCIS_LDAP_CACERT;GRAPH_LDAP_CACERT" desc:"Path/File name for the root CA certificate (in PEM format) used to validate TLS server certificates of the LDAP service. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH/idm." introductionVersion:"pre5.0"`
Insecure bool `yaml:"insecure" env:"OCIS_LDAP_INSECURE;GRAPH_LDAP_INSECURE" desc:"Disable TLS certificate validation for the LDAP connections. Do not set this in production environments." introductionVersion:"pre5.0"`
BindDN string `yaml:"bind_dn" env:"OCIS_LDAP_BIND_DN;GRAPH_LDAP_BIND_DN" desc:"LDAP DN to use for simple bind authentication with the target LDAP server." introductionVersion:"pre5.0"`
BindPassword string `yaml:"bind_password" env:"OCIS_LDAP_BIND_PASSWORD;GRAPH_LDAP_BIND_PASSWORD" desc:"Password to use for authenticating the 'bind_dn'." introductionVersion:"pre5.0"`
UseServerUUID bool `yaml:"use_server_uuid" env:"GRAPH_LDAP_SERVER_UUID" desc:"If set to true, rely on the LDAP Server to generate a unique ID for users and groups, like when using 'entryUUID' as the user ID attribute." introductionVersion:"pre5.0"`
UsePasswordModExOp bool `yaml:"use_password_modify_exop" env:"GRAPH_LDAP_SERVER_USE_PASSWORD_MODIFY_EXOP" desc:"Use the 'Password Modify Extended Operation' for updating user passwords." introductionVersion:"pre5.0"`
WriteEnabled bool `yaml:"write_enabled" env:"OCIS_LDAP_SERVER_WRITE_ENABLED;GRAPH_LDAP_SERVER_WRITE_ENABLED" desc:"Allow creating, modifying and deleting LDAP users via the GRAPH API. This can only be set to 'true' when keeping default settings for the LDAP user and group attribute types (the 'OCIS_LDAP_USER_SCHEMA_* and 'OCIS_LDAP_GROUP_SCHEMA_* variables)." introductionVersion:"pre5.0"`
UpdateUserLastSignInDate bool `yaml:"update_user_last_sign_in_date" env:"OCIS_LDAP_UPDATE_LAST_SIGNIN_DATE;GRAPH_LDAP_UPDATE_LAST_SIGNIN_DATE" desc:"Update the 'oCLastSignInTimestamp' LDAP attribute of a user when the user signs in. The attribute is only persisted when 'OCIS_LDAP_SERVER_WRITE_ENABLED' is also enabled. Set this to 'false' to avoid an LDAP write on every sign-in, e.g. when the last sign-in timestamp is not needed or the LDAP write load should be reduced." introductionVersion:"8.2.0"`
RetryMaxCount int `yaml:"retry_max_count" env:"OCIS_LDAP_RETRY_MAX_COUNT;GRAPH_LDAP_RETRY_MAX_COUNT" desc:"Maximum number of retries for failed LDAP operations. Reads retry on transient and network errors; writes retry only when the connection failed before the request was sent (e.g. a reused idle connection found closed), so the request provably never reached the server and cannot be double-applied. Default 1." introductionVersion:"8.2.0"`
RetryBaseDelay time.Duration `yaml:"retry_base_delay" env:"OCIS_LDAP_RETRY_BASE_DELAY;GRAPH_LDAP_RETRY_BASE_DELAY" desc:"Base delay for exponential backoff between LDAP retries (e.g. '100ms'). Set to 0 to disable backoff." introductionVersion:"8.2.0"`
RetryMaxDelay time.Duration `yaml:"retry_max_delay" env:"OCIS_LDAP_RETRY_MAX_DELAY;GRAPH_LDAP_RETRY_MAX_DELAY" desc:"Maximum delay cap for exponential backoff between LDAP retries (e.g. '5s'). 0 (default) uses the library default cap of 60s." introductionVersion:"8.2.0"`
RefintEnabled bool `yaml:"refint_enabled" env:"GRAPH_LDAP_REFINT_ENABLED" desc:"Signals that the server has the refint plugin enabled, which makes some actions not needed." introductionVersion:"pre5.0"`
PoolEnabled bool `yaml:"pool_enabled" env:"OCIS_LDAP_POOL_ENABLED;GRAPH_LDAP_POOL_ENABLED" desc:"Enable a bounded pool of LDAP connections instead of a single long-lived reconnecting connection. Concurrent requests then no longer serialize on one connection." introductionVersion:"8.2.0"`
PoolSize int `yaml:"pool_size" env:"OCIS_LDAP_POOL_SIZE;GRAPH_LDAP_POOL_SIZE" desc:"Maximum number of concurrently open LDAP connections when 'OCIS_LDAP_POOL_ENABLED' is 'true'. Defaults to 5 when unset or <= 0." introductionVersion:"8.2.0"`
PoolCheckoutTimeout time.Duration `yaml:"pool_checkout_timeout" env:"OCIS_LDAP_POOL_CHECKOUT_TIMEOUT;GRAPH_LDAP_POOL_CHECKOUT_TIMEOUT" desc:"Maximum time to wait for a pooled LDAP connection to become available once the pool is exhausted. Defaults to 30s when unset or <= 0. See the Environment Variable Types description for more details." introductionVersion:"8.2.0"`
UserBaseDN string `yaml:"user_base_dn" env:"OCIS_LDAP_USER_BASE_DN;GRAPH_LDAP_USER_BASE_DN" desc:"Search base DN for looking up LDAP users." introductionVersion:"pre5.0"`
UserSearchScope string `yaml:"user_search_scope" env:"OCIS_LDAP_USER_SCOPE;GRAPH_LDAP_USER_SCOPE" desc:"LDAP search scope to use when looking up users. Supported scopes are 'base', 'one' and 'sub'." introductionVersion:"pre5.0"`
@@ -182,7 +189,8 @@ type ServiceAccount struct {
}
type Validation struct {
MaxTagLength int `yaml:"max_tag_length" env:"OCIS_MAX_TAG_LENGTH" desc:"Define the maximum tag length. Defaults to 100 if not set. Set to 0 to not limit the tag length. Changes only impact the validation of new tags." introductionVersion:"7.2.0"`
MaxTagLength int `yaml:"max_tag_length" env:"OCIS_MAX_TAG_LENGTH" desc:"Define the maximum tag length. Defaults to 100 if not set. Set to 0 to not limit the tag length. Changes only impact the validation of new tags." introductionVersion:"7.2.0"`
MaxImageFileSize string `yaml:"max_image_file_size" env:"GRAPH_MAX_IMAGE_FILE_SIZE" desc:"The maximum file size of an image which can be set as a space image. Must be less than or equal to 'THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE' of the thumbnails service, otherwise images between the two values are accepted but cannot be rendered. Usable common abbreviations: [KB, KiB, MB, MiB, GB, GiB, TB, TiB, PB, PiB, EB, EiB], example: 2GB. Set to 0 to not limit the file size." introductionVersion:"8.3.0"`
}
// MultiInstanceConfig holds configuration for multi-instance-ocis
@@ -88,10 +88,14 @@ func DefaultConfig() *config.Config {
Insecure: false,
CACert: path.Join(defaults.BaseDataPath(), "idm", "ldap.crt"),
BindDN: "uid=libregraph,ou=sysusers,o=libregraph-idm",
PoolEnabled: false,
PoolSize: 5,
PoolCheckoutTimeout: 30 * time.Second,
UseServerUUID: false,
UsePasswordModExOp: true,
WriteEnabled: true,
UpdateUserLastSignInDate: true,
RetryMaxCount: 1,
UserBaseDN: "ou=users,o=libregraph-idm",
UserSearchScope: "sub",
UserFilter: "",
@@ -135,7 +139,8 @@ func DefaultConfig() *config.Config {
AvailableRoles: nil, // will be populated with defaults in EnsureDefaults
},
Validation: config.Validation{
MaxTagLength: 100,
MaxTagLength: 100,
MaxImageFileSize: "50MB",
},
}
}
+81 -9
View File
@@ -12,6 +12,7 @@ import (
"time"
"github.com/CiscoM31/godata"
backoff "github.com/cenkalti/backoff/v5"
"github.com/go-ldap/ldap/v3"
"github.com/google/uuid"
"github.com/libregraph/idm/pkg/ldapdn"
@@ -54,6 +55,11 @@ type LDAP struct {
refintEnabled bool
usePwModifyExOp bool
// bounds for the read-back retry in readBackAfterWrite
retryMaxCount int
retryBaseDelay time.Duration
retryMaxDelay time.Duration
userBaseDN string
userFilter string
userObjectClass string
@@ -149,6 +155,15 @@ func NewLDAPBackend(lc ldap.Client, config config.LDAP, logger *log.Logger, inst
if config.GroupNameAttribute == "" || config.GroupIDAttribute == "" {
return nil, errors.New("invalid group attribute mappings")
}
// Octet-string ID attributes (e.g. Active Directory's objectGUID) are assigned by
// the directory server, which requires UseServerUUID=true. With UseServerUUID=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. Reject
// this incompatible combination at startup instead of silently returning bad IDs.
if !config.UseServerUUID && (config.UserIDIsOctetString || config.GroupIDIsOctetString) {
return nil, errors.New("invalid config: octet-string ID attributes require GRAPH_LDAP_SERVER_UUID=true")
}
gam := groupAttributeMap{
name: config.GroupNameAttribute,
id: config.GroupIDAttribute,
@@ -195,6 +210,9 @@ func NewLDAPBackend(lc ldap.Client, config config.LDAP, logger *log.Logger, inst
return &LDAP{
useServerUUID: config.UseServerUUID,
usePwModifyExOp: config.UsePasswordModExOp,
retryMaxCount: config.RetryMaxCount,
retryBaseDelay: config.RetryBaseDelay,
retryMaxDelay: config.RetryMaxDelay,
userBaseDN: config.UserBaseDN,
userFilter: config.UserFilter,
userObjectClass: config.UserObjectClass,
@@ -266,10 +284,21 @@ func (i *LDAP) CreateUser(ctx context.Context, user libregraph.User) (*libregrap
}
}
// Read back user from LDAP to get the generated UUID
e, err := i.getUserByDN(ar.DN, "")
if err != nil {
return nil, err
var e *ldap.Entry
if i.useServerUUID {
// The directory assigns the ID and conn.Add cannot return it, so we must
// read the entry back to recover the generated UUID.
e, err = i.readBackAfterWrite(func() (*ldap.Entry, error) {
return i.getUserByDN(ar.DN, "")
})
if err != nil {
return nil, err
}
} else {
// oCIS generated the ID and wrote it into the AddRequest, so everything the
// model builder needs is already in hand — synthesize the entry instead of
// reading it back (avoids a read-after-write against a lagging replica).
e = ldap.NewEntry(ar.DN, attrsFromAddRequest(ar))
}
return i.createUserModelFromLDAP(e), nil
}
@@ -439,11 +468,12 @@ func (i *LDAP) UpdateUser(ctx context.Context, nameOrID string, user libregraph.
}
}
// Read back user from LDAP to get the generated UUID
e, err = i.getUserByDN(e.DN, "")
if err != nil {
return nil, err
}
// Fold the applied changes onto the pre-read entry instead of reading it back.
// The ID is immutable on update (rejected above) and every field the model builder
// reads is either already on e or in the ModifyRequest just applied, so no
// read-after-write is needed. The rename branch (changeUserName) is handled above
// and keeps its own read-back.
e = applyModifyToEntry(e, &mr)
returnUser := i.createUserModelFromLDAP(e)
@@ -523,6 +553,13 @@ func (i *LDAP) getEntryByDN(dn string, attrs []string, filter string) (*ldap.Ent
Msg("getEntryByDN")
res, err := i.conn.Search(searchRequest)
if err != nil {
// A lagging replica returns NoSuchObject(32) for a base search on a
// not-yet-replicated DN; a slower one returns success with 0 entries. Both
// mean "not there yet", so map to the same ErrNotFound that readBackAfterWrite
// retries on.
if ldap.IsErrorWithCode(err, ldap.LDAPResultNoSuchObject) {
return nil, ErrNotFound
}
i.logger.Error().Err(err).Str("backend", "ldap").Str("dn", dn).Msg("Search ldap by DN failed")
return nil, errorcode.New(errorcode.ItemNotFound, "user lookup failed")
}
@@ -533,7 +570,40 @@ func (i *LDAP) getEntryByDN(dn string, attrs []string, filter string) (*ldap.Ent
return res.Entries[0], nil
}
// readBackAfterWrite runs readFn, retrying on ErrNotFound with backoff. A 0-entry
// read after a successful write means the read hit a replica lagging behind the
// primary; the connection-level retry only sees error codes, not this empty result,
// so the retry happens here. Bounds default to one immediate re-read (count=1,
// delay=0) and are tunable via the shared LDAP retry config.
func (i *LDAP) readBackAfterWrite(readFn func() (*ldap.Entry, error)) (*ldap.Entry, error) {
maxRetries := i.retryMaxCount
if maxRetries < 1 {
maxRetries = 1
}
var bo *backoff.ExponentialBackOff
for try := 0; ; try++ {
e, err := readFn()
if !errors.Is(err, ErrNotFound) || try >= maxRetries {
return e, err
}
if i.retryBaseDelay > 0 {
if bo == nil {
bo = backoff.NewExponentialBackOff()
bo.InitialInterval = i.retryBaseDelay
if i.retryMaxDelay > 0 {
bo.MaxInterval = i.retryMaxDelay
}
bo.Reset()
}
time.Sleep(bo.NextBackOff())
}
}
}
func (i *LDAP) searchLDAPEntryByFilter(basedn string, attrs []string, filter string) (*ldap.Entry, error) {
i.logger.Debug().Str("backend", "ldap").Msg("searchLDAPEntryByFilter")
if filter == "" {
filter = "(objectclass=*)"
}
@@ -593,6 +663,7 @@ func (i *LDAP) getLDAPUserByID(id string) (*ldap.Entry, error) {
}
func (i *LDAP) getLDAPUserByNameOrID(nameOrID string) (*ldap.Entry, error) {
i.logger.Debug().Str("backend", "ldap").Msg("getLDAPUserByNameOrID")
idString, err := filterEscapeUUID(i.userIDisOctetString, nameOrID)
// err != nil just means that this is not an uuid, so we can skip the uuid filter part
// and just filter by name
@@ -1159,6 +1230,7 @@ func (i *LDAP) getUserLDAPDN(user libregraph.User) string {
}
func (i *LDAP) userToAddRequest(user libregraph.User) (*ldap.AddRequest, error) {
i.logger.Debug().Str("backend", "ldap").Msg("userToAddRequest")
ar := ldap.NewAddRequest(i.getUserLDAPDN(user), nil)
attrMap, err := i.userToLDAPAttrValues(user)
@@ -1,414 +0,0 @@
package ldap
// LDAP automatic reconnection mechanism, inspired by:
// https://gist.github.com/emsearcy/cba3295d1a06d4c432ab4f6173b65e4f#file-ldap_snippet-go
import (
"context"
"crypto/tls"
"errors"
"fmt"
"time"
"github.com/go-ldap/ldap/v3"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
)
var (
errMaxRetries = errors.New("max retries")
)
type ldapConnection struct {
Conn *ldap.Conn
Error error
}
// ConnWithReconnect implements the ldap.Client interface
type ConnWithReconnect struct {
conn chan ldapConnection
reset chan *ldap.Conn
retries int
logger *log.Logger
}
type Config struct {
URI string
BindDN string
BindPassword string
TLSConfig *tls.Config
}
func NewLDAPWithReconnect(logger *log.Logger, config Config) ConnWithReconnect {
conn := ConnWithReconnect{
conn: make(chan ldapConnection),
reset: make(chan *ldap.Conn),
retries: 1,
logger: logger,
}
go conn.ldapAutoConnect(config)
return conn
}
// Search implements the ldap.Client interface
func (c ConnWithReconnect) Search(sr *ldap.SearchRequest) (*ldap.SearchResult, error) {
conn, err := c.GetConnection()
if err != nil {
return nil, err
}
var res *ldap.SearchResult
for try := 0; try <= c.retries; try++ {
res, err = conn.Search(sr)
if !ldap.IsErrorWithCode(err, ldap.ErrorNetwork) {
// non network error, return it to the client
return res, err
}
c.logger.Debug().Msgf("Network Error. attempt %d", try)
conn, err = c.reconnect(conn)
if err != nil {
return nil, err
}
c.logger.Debug().Msg("retrying LDAP Search")
}
// if we get here we reached the maximum retries. So return an error
return nil, ldap.NewError(ldap.ErrorNetwork, errMaxRetries)
}
// Add implements the ldap.Client interface
func (c ConnWithReconnect) Add(a *ldap.AddRequest) error {
conn, err := c.GetConnection()
if err != nil {
return err
}
for try := 0; try <= c.retries; try++ {
err = conn.Add(a)
if !ldap.IsErrorWithCode(err, ldap.ErrorNetwork) {
// non network error, return it to the client
return err
}
c.logger.Debug().Msgf("Network Error. attempt %d", try)
conn, err = c.reconnect(conn)
if err != nil {
return err
}
c.logger.Debug().Msg("retrying LDAP Add")
}
// if we get here we reached the maximum retries. So return an error
return ldap.NewError(ldap.ErrorNetwork, errMaxRetries)
}
// Del implements the ldap.Client interface
func (c ConnWithReconnect) Del(d *ldap.DelRequest) error {
conn, err := c.GetConnection()
if err != nil {
return err
}
for try := 0; try <= c.retries; try++ {
err = conn.Del(d)
if !ldap.IsErrorWithCode(err, ldap.ErrorNetwork) {
// non network error, return it to the client
return err
}
c.logger.Debug().Msgf("Network Error. attempt %d", try)
conn, err = c.reconnect(conn)
if err != nil {
return err
}
c.logger.Debug().Msg("retrying LDAP Del")
}
// if we get here we reached the maximum retries. So return an error
return ldap.NewError(ldap.ErrorNetwork, errMaxRetries)
}
// Modify implements the ldap.Client interface
func (c ConnWithReconnect) Modify(m *ldap.ModifyRequest) error {
conn, err := c.GetConnection()
if err != nil {
return err
}
for try := 0; try <= c.retries; try++ {
err = conn.Modify(m)
if !ldap.IsErrorWithCode(err, ldap.ErrorNetwork) {
// non network error, return it to the client
return err
}
c.logger.Debug().Msgf("Network Error. attempt %d", try)
conn, err = c.reconnect(conn)
if err != nil {
return err
}
c.logger.Debug().Msg("retrying LDAP Modify")
}
// if we get here we reached the maximum retries. So return an error
return ldap.NewError(ldap.ErrorNetwork, errMaxRetries)
}
// PasswordModify implements the ldap.Client interface
func (c ConnWithReconnect) PasswordModify(m *ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error) {
conn, err := c.GetConnection()
if err != nil {
return nil, err
}
var res *ldap.PasswordModifyResult
for try := 0; try <= c.retries; try++ {
res, err = conn.PasswordModify(m)
if !ldap.IsErrorWithCode(err, ldap.ErrorNetwork) {
// non network error, return it to the client
return res, err
}
c.logger.Debug().Msgf("Network Error. attempt %d", try)
conn, err = c.reconnect(conn)
if err != nil {
return nil, err
}
c.logger.Debug().Msg("retrying LDAP Password Modify")
}
// if we get here we reached the maximum retries. So return an error
return nil, ldap.NewError(ldap.ErrorNetwork, errMaxRetries)
}
// ModifyDN implements the ldap.Client interface
func (c ConnWithReconnect) ModifyDN(m *ldap.ModifyDNRequest) error {
conn, err := c.GetConnection()
if err != nil {
return err
}
for try := 0; try <= c.retries; try++ {
err = conn.ModifyDN(m)
if !ldap.IsErrorWithCode(err, ldap.ErrorNetwork) {
// non network error, return it to the client
return err
}
c.logger.Debug().Msgf("Network Error. attempt %d", try)
conn, err = c.reconnect(conn)
if err != nil {
return err
}
c.logger.Debug().Msg("retrying LDAP ModifyDN")
}
// if we get here we reached the maximum retries. So return an error
return ldap.NewError(ldap.ErrorNetwork, errMaxRetries)
}
// GetConnection implements the ldap.Client interface
func (c ConnWithReconnect) GetConnection() (*ldap.Conn, error) {
conn := <-c.conn
if conn.Conn != nil && !ldap.IsErrorWithCode(conn.Error, ldap.ErrorNetwork) {
c.logger.Debug().Msg("using existing Connection")
return conn.Conn, conn.Error
}
return c.reconnect(conn.Conn)
}
// ldapAutoConnect implements the ldap.Client interface
func (c ConnWithReconnect) ldapAutoConnect(config Config) {
var (
l *ldap.Conn
err error
)
for {
select {
case resConn := <-c.reset:
// Only close the connection and reconnect if the current
// connection, matches the one we got via the reset channel.
// If they differ we already reconnected
if l != nil && l == resConn {
c.logger.Debug().Msgf("closing connection %v", &l)
l.Close()
}
if l == resConn || l == nil {
c.logger.Debug().Msg("reconnecting to LDAP")
l, err = c.ldapConnect(config)
} else {
c.logger.Debug().Msg("already reconnected")
}
case c.conn <- ldapConnection{l, err}:
}
}
}
// ldapConnect implements the ldap.Client interface
func (c ConnWithReconnect) ldapConnect(config Config) (*ldap.Conn, error) {
c.logger.Debug().Msgf("Connecting to %s", config.URI)
var err error
var l *ldap.Conn
if config.TLSConfig != nil {
l, err = ldap.DialURL(config.URI, ldap.DialWithTLSConfig(config.TLSConfig))
} else {
l, err = ldap.DialURL(config.URI)
}
if err != nil {
c.logger.Error().Err(err).Msg("could not get ldap Connection")
} else {
c.logger.Debug().Msg("LDAP Connected")
if config.BindDN != "" {
c.logger.Debug().Msgf("Binding as %s", config.BindDN)
err = l.Bind(config.BindDN, config.BindPassword)
if err != nil {
c.logger.Error().Err(err).Msg("Bind failed")
l.Close()
return nil, err
}
}
}
return l, err
}
// reconnect implements the ldap.Client interface
func (c ConnWithReconnect) reconnect(resetConn *ldap.Conn) (*ldap.Conn, error) {
c.logger.Debug().Msg("LDAP connection reset")
c.reset <- resetConn
c.logger.Debug().Msg("Waiting for new connection")
result := <-c.conn
return result.Conn, result.Error
}
// Extended implements the ldap.Client interface
func (c ConnWithReconnect) Extended(req *ldap.ExtendedRequest) (*ldap.ExtendedResponse, error) {
conn, err := c.GetConnection()
if err != nil {
return nil, err
}
// TODO: in reva there is a good retry util function
var res *ldap.ExtendedResponse
for try := 0; try <= c.retries; try++ {
res, err = conn.Extended(req)
if !ldap.IsErrorWithCode(err, ldap.ErrorNetwork) {
// Non network error, return it to the client
return res, err
}
c.logger.Debug().Msgf("Network Error. attempt %d", try)
conn, err = c.reconnect(conn)
if err != nil {
return nil, err
}
c.logger.Debug().Msg("retrying LDAP Extended")
}
// Return error when reached the maximum retries.
return nil, ldap.NewError(ldap.ErrorNetwork, errMaxRetries)
}
// Remaining methods to fulfill ldap.Client interface
func (c ConnWithReconnect) Start() {}
// StartTLS implements the ldap.Client interface
func (c ConnWithReconnect) StartTLS(*tls.Config) error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// Close implements the ldap.Client interface
func (c ConnWithReconnect) Close() (err error) {
conn, err := c.GetConnection()
if err != nil {
return err
}
return conn.Close()
}
// GetLastError implements the ldap.Client interface
func (c ConnWithReconnect) GetLastError() error {
conn, err := c.GetConnection()
if err != nil {
return err
}
return conn.GetLastError()
}
// IsClosing implements the ldap.Client interface
func (c ConnWithReconnect) IsClosing() bool {
return false
}
// SetTimeout implements the ldap.Client interface
func (c ConnWithReconnect) SetTimeout(time.Duration) {}
// Bind implements the ldap.Client interface
func (c ConnWithReconnect) Bind(username, password string) error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// UnauthenticatedBind implements the ldap.Client interface
func (c ConnWithReconnect) UnauthenticatedBind(username string) error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// SimpleBind implements the ldap.Client interface
func (c ConnWithReconnect) SimpleBind(*ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error) {
return nil, ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// ExternalBind implements the ldap.Client interface
func (c ConnWithReconnect) ExternalBind() error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// ModifyWithResult implements the ldap.Client interface
func (c ConnWithReconnect) ModifyWithResult(m *ldap.ModifyRequest) (*ldap.ModifyResult, error) {
conn, err := c.GetConnection()
if err != nil {
return nil, err
}
return conn.ModifyWithResult(m)
}
// Compare implements the ldap.Client interface
func (c ConnWithReconnect) Compare(dn, attribute, value string) (bool, error) {
return false, ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// Compare implements the ldap.Client interface
func (c ConnWithReconnect) SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error) {
return nil, ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// SearchAsync implements the ldap.Client interface
func (c ConnWithReconnect) SearchAsync(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int) ldap.Response {
// unimplemented
return nil
}
// NTLMUnauthenticatedBind implements the ldap.Client interface
func (c ConnWithReconnect) NTLMUnauthenticatedBind(domain, username string) error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// TLSConnectionState implements the ldap.Client interface
func (c ConnWithReconnect) TLSConnectionState() (tls.ConnectionState, bool) {
return tls.ConnectionState{}, false
}
// Unbind implements the ldap.Client interface
func (c ConnWithReconnect) Unbind() error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// DirSync implements the ldap.Client interface
func (c ConnWithReconnect) DirSync(searchRequest *ldap.SearchRequest, flags, maxAttrCount int64, cookie []byte) (*ldap.SearchResult, error) {
return nil, ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// DirSyncAsync implements the ldap.Client interface
func (c ConnWithReconnect) DirSyncAsync(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, flags, maxAttrCount int64, cookie []byte) ldap.Response {
// unimplemented
return nil
}
// Syncrepl implements the ldap.Client interface
func (c ConnWithReconnect) Syncrepl(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, mode ldap.ControlSyncRequestMode, cookie []byte, reloadHint bool) ldap.Response {
// unimplemented
return nil
}
@@ -89,10 +89,20 @@ func (i *LDAP) CreateEducationClass(ctx context.Context, class libregraph.Educat
return nil, err
}
// Read back group from LDAP to get the generated UUID
e, err := i.getEducationClassByDN(ar.DN)
if err != nil {
return nil, err
var e *ldap.Entry
if i.useServerUUID {
// The directory assigns the ID and conn.Add cannot return it, so we must
// read the entry back to recover the generated UUID.
e, err = i.readBackAfterWrite(func() (*ldap.Entry, error) {
return i.getEducationClassByDN(ar.DN)
})
if err != nil {
return nil, err
}
} else {
// oCIS generated the ID and wrote it into the AddRequest, so synthesize the
// entry from data already in hand instead of reading it back.
e = ldap.NewEntry(ar.DN, attrsFromAddRequest(ar))
}
return i.createEducationClassModelFromLDAP(e), nil
}
@@ -142,7 +152,10 @@ func (i *LDAP) UpdateEducationClass(ctx context.Context, id string, class libreg
return nil, ErrReadOnly
}
g, err := i.getLDAPGroupByID(id, false)
// Request the full education-class attribute set (classification, externalID, …),
// not just [name, id], so the folded response entry carries everything the model
// builder reads — otherwise a displayName-only update would drop classification.
g, err := i.getEducationClassByID(id, false)
if err != nil {
return nil, err
}
@@ -174,12 +187,17 @@ func (i *LDAP) UpdateEducationClass(ctx context.Context, id string, class libreg
dn := g.DN
// The externalID lives in the RDN and is changed via ModifyDN, not the ModifyRequest.
// The model builder reads it from the externalID attribute, so we fold it on as an
// attribute replace below (deleteOldRDN=true updates the attribute server-side).
externalIDChanged := false
if eID := class.GetExternalId(); eID != "" {
if g.GetEqualFoldAttributeValue(i.educationConfig.classAttributeMap.externalID) != eID {
dn, err = i.updateClassExternalID(ctx, dn, eID)
if err != nil {
return nil, err
}
externalIDChanged = true
}
}
@@ -198,9 +216,14 @@ func (i *LDAP) UpdateEducationClass(ctx context.Context, id string, class libreg
}
}
g, err = i.getEducationClassByDN(dn)
if err != nil {
return nil, err
// Fold the applied changes onto the pre-read entry instead of reading it back.
// The externalID rename is modelled as an attribute replace so the returned model
// reflects the new externalID.
g = applyModifyToEntry(g, &mr)
if externalIDChanged {
extRename := ldap.ModifyRequest{DN: dn}
extRename.Replace(i.educationConfig.classAttributeMap.externalID, []string{class.GetExternalId()})
g = applyModifyToEntry(g, &extRename)
}
return i.createEducationClassModelFromLDAP(g), nil
@@ -50,7 +50,11 @@ func TestCreateEducationClass(t *testing.T) {
},
nil)
b, err := getMockedBackend(lm, eduConfig, &logger)
// useServerUUID=true keeps the read-back path (the directory assigns the ID),
// which is what this test asserts (Search called once, fixed entry returned).
c := eduConfig
c.UseServerUUID = true
b, err := getMockedBackend(lm, c, &logger)
assert.Nil(t, err)
assert.NotEqual(t, "", b.educationConfig.classObjectClass)
class := libregraph.NewEducationClass()
@@ -160,10 +160,20 @@ func (i *LDAP) CreateEducationSchool(ctx context.Context, school libregraph.Educ
return nil, err
}
// Read back school from LDAP to get the generated UUID
e, err := i.getSchoolByDN(ar.DN)
if err != nil {
return nil, err
var e *ldap.Entry
if i.useServerUUID {
// The directory assigns the ID and conn.Add cannot return it, so we must
// read the entry back to recover the generated UUID.
e, err = i.readBackAfterWrite(func() (*ldap.Entry, error) {
return i.getSchoolByDN(ar.DN)
})
if err != nil {
return nil, err
}
} else {
// oCIS generated the ID and wrote it into the AddRequest, so synthesize the
// entry from data already in hand instead of reading it back.
e = ldap.NewEntry(ar.DN, attrsFromAddRequest(ar))
}
return i.createSchoolModelFromLDAP(e), nil
}
@@ -240,7 +250,9 @@ func (i *LDAP) updateDisplayName(ctx context.Context, dn string, providedDisplay
// updateSchoolProperties updates the properties (other that displayName) of a school.
// It checks if a school number is already taken, before updating the school number
func (i *LDAP) updateSchoolProperties(ctx context.Context, dn string, currentSchool, updatedSchool libregraph.EducationSchool) error {
// updateSchoolProperties applies the ModifyRequest and returns it so the caller can
// fold the applied changes onto the pre-read entry (avoiding a read-after-write).
func (i *LDAP) updateSchoolProperties(ctx context.Context, dn string, currentSchool, updatedSchool libregraph.EducationSchool) (*ldap.ModifyRequest, error) {
logger := i.logger.SubloggerWithRequestID(ctx)
mr := ldap.NewModifyRequest(dn, nil)
@@ -248,7 +260,7 @@ func (i *LDAP) updateSchoolProperties(ctx context.Context, dn string, currentSch
if *updatedSchoolNumber != "" && currentSchool.GetSchoolNumber() != *updatedSchoolNumber {
_, err := i.getSchoolByNumber(*updatedSchoolNumber)
if err == nil {
return errSchoolNumberExists
return nil, errSchoolNumberExists
}
mr.Replace(i.educationConfig.schoolAttributeMap.schoolNumber, []string{*updatedSchoolNumber})
}
@@ -267,10 +279,10 @@ func (i *LDAP) updateSchoolProperties(ctx context.Context, dn string, currentSch
if err := i.conn.Modify(mr); err != nil {
logger.Debug().Err(err).Msg("error updating school number")
return err
return nil, err
}
return nil
return mr, nil
}
// UpdateEducationSchool updates the supplied school in the identity backend
@@ -287,6 +299,11 @@ func (i *LDAP) UpdateEducationSchool(ctx context.Context, numberOrID string, sch
}
currentSchool := i.createSchoolModelFromLDAP(e)
// Fold the applied changes onto the pre-read entry instead of reading it back.
// updateDisplayName mutates the RDN via ModifyDN; the model builder reads displayName
// from the attribute, so we model the rename as a displayName attribute replace.
// updateSchoolProperties returns the ModifyRequest it applied so we can fold it on.
fold := ldap.NewModifyRequest(e.DN, nil)
switch i.updateEducationSchoolOperation(school, *currentSchool) {
case tooManyValues:
return nil, fmt.Errorf("school name and school number cannot be updated in the same request")
@@ -297,17 +314,16 @@ func (i *LDAP) UpdateEducationSchool(ctx context.Context, numberOrID string, sch
if err := i.updateDisplayName(ctx, e.DN, school.GetDisplayName()); err != nil {
return nil, err
}
fold.Replace(i.educationConfig.schoolAttributeMap.displayName, []string{school.GetDisplayName()})
case schoolPropertiesUpdated:
if err := i.updateSchoolProperties(ctx, e.DN, *currentSchool, school); err != nil {
mr, err := i.updateSchoolProperties(ctx, e.DN, *currentSchool, school)
if err != nil {
return nil, err
}
fold.Changes = mr.Changes
}
// Read back school from LDAP
e, err = i.getSchoolByNumberOrID(i.getID(e))
if err != nil {
return nil, err
}
e = applyModifyToEntry(e, fold)
return i.createSchoolModelFromLDAP(e), nil
}
@@ -54,13 +54,6 @@ var schoolEntry1 = ldap.NewEntry("ou=Test School1",
"ocEducationSchoolNumber": {"0042"},
"owncloudUUID": {"hijk-defg"},
})
var schoolEntryWithTermination = ldap.NewEntry("ou=Test School",
map[string][]string{
"ou": {"Test School"},
"ocEducationSchoolNumber": {"0123"},
"owncloudUUID": {"abcd-defg"},
"ocEducationSchoolTerminationTimestamp": {"20420131120000Z"},
})
var (
filterSchoolSearchByIdExisting = "(&(objectClass=ocEducationSchool)(|(owncloudUUID=abcd-defg)(ocEducationSchoolNumber=abcd-defg)))"
@@ -177,7 +170,11 @@ func TestCreateEducationSchool(t *testing.T) {
Entries: []*ldap.Entry{schoolEntry},
},
nil)
b, err := getMockedBackend(lm, eduConfig, &logger)
// useServerUUID=true keeps the read-back path (the directory assigns the ID),
// which is what this test asserts (fixed entry returned with a known id).
c := eduConfig
c.UseServerUUID = true
b, err := getMockedBackend(lm, c, &logger)
assert.Nil(t, err)
assert.NotEqual(t, "", b.educationConfig.schoolObjectClass)
@@ -218,6 +215,7 @@ func TestUpdateEducationSchoolTerminationDate(t *testing.T) {
return false
}
lm.On("Modify", mock.MatchedBy(ldapSchoolTerminationRequestMatcher)).Return(nil)
// Single pre-read; the termination Replace is folded onto it (no read-back).
lm.On("Search", mock.Anything).
Return(
&ldap.SearchResult{
@@ -225,13 +223,6 @@ func TestUpdateEducationSchoolTerminationDate(t *testing.T) {
},
nil).
Once()
lm.On("Search", mock.Anything).
Return(
&ldap.SearchResult{
Entries: []*ldap.Entry{schoolEntryWithTermination},
},
nil).
Once()
b, err := getMockedBackend(lm, eduConfig, &logger)
assert.Nil(t, err)
@@ -240,7 +231,7 @@ func TestUpdateEducationSchoolTerminationDate(t *testing.T) {
terminationTime := time.Date(2042, time.January, 31, 12, 0, 0, 0, time.UTC)
school.SetTerminationDate(terminationTime)
resSchool, err := b.UpdateEducationSchool(context.Background(), "abcd-defg", *school)
lm.AssertNumberOfCalls(t, "Search", 2)
lm.AssertNumberOfCalls(t, "Search", 1)
assert.Nil(t, err)
assert.NotNil(t, resSchool)
assert.Equal(t, "Test School", resSchool.GetDisplayName())
@@ -44,10 +44,20 @@ func (i *LDAP) CreateEducationUser(ctx context.Context, user libregraph.Educatio
return nil, err
}
// Read back user from LDAP to get the generated UUID
e, err := i.getEducationUserByDN(ar.DN)
if err != nil {
return nil, err
var e *ldap.Entry
if i.useServerUUID {
// The directory assigns the ID and conn.Add cannot return it, so we must
// read the entry back to recover the generated UUID.
e, err = i.readBackAfterWrite(func() (*ldap.Entry, error) {
return i.getEducationUserByDN(ar.DN)
})
if err != nil {
return nil, err
}
} else {
// oCIS generated the ID and wrote it into the AddRequest, so synthesize the
// entry from data already in hand instead of reading it back.
e = ldap.NewEntry(ar.DN, attrsFromAddRequest(ar))
}
return i.createEducationUserModelFromLDAP(e), nil
}
@@ -170,11 +180,11 @@ func (i *LDAP) UpdateEducationUser(ctx context.Context, id string, user libregra
}
}
// Read back user from LDAP to get the generated UUID
e, err = i.getEducationUserByDN(e.DN)
if err != nil {
return nil, err
}
// Fold the applied changes onto the pre-read entry instead of reading it back.
// The ID is immutable on update (rejected above) and every field the model builder
// reads is either already on e or in the ModifyRequest just applied. The rename
// branch (changeUserName) is handled above and keeps its own read-back.
e = applyModifyToEntry(e, &mr)
returnUser := i.createEducationUserModelFromLDAP(e)
@@ -97,7 +97,11 @@ var sr3 *ldap.SearchRequest = &ldap.SearchRequest{
func TestCreateEducationUser(t *testing.T) {
lm := &mocks.Client{}
b, err := getMockedBackend(lm, eduConfig, &logger)
// useServerUUID=true keeps the read-back path (the directory assigns the ID),
// which is what this test asserts (Search called once, fixed entry returned).
c := eduConfig
c.UseServerUUID = true
b, err := getMockedBackend(lm, c, &logger)
assert.Nil(t, err)
//assert.NotEqual(t, "", b.educationConfig.schoolObjectClass)
lm.On("Add", mock.Anything).Return(nil)
+16 -6
View File
@@ -220,10 +220,20 @@ func (i *LDAP) CreateGroup(ctx context.Context, group libregraph.Group) (*libreg
}
}
// Read back group from LDAP to get the generated UUID
e, err := i.getGroupByDN(ar.DN)
if err != nil {
return nil, err
var e *ldap.Entry
if i.useServerUUID {
// The directory assigns the ID and conn.Add cannot return it, so we must
// read the entry back to recover the generated UUID.
e, err = i.readBackAfterWrite(func() (*ldap.Entry, error) {
return i.getGroupByDN(ar.DN)
})
if err != nil {
return nil, err
}
} else {
// oCIS generated the ID and wrote it into the AddRequest, so synthesize the
// entry from data already in hand instead of reading it back.
e = ldap.NewEntry(ar.DN, attrsFromAddRequest(ar))
}
return i.createGroupModelFromLDAP(e), nil
}
@@ -462,7 +472,7 @@ func (i *LDAP) groupToLDAPAttrValues(group libregraph.Group) (map[string][]strin
attrs["objectClass"] = append(attrs["objectClass"], i.groupAdditionalObjectClasses...)
if !i.useServerUUID {
attrs["owncloudUUID"] = []string{uuid.Must(uuid.NewV4()).String()}
attrs[i.groupAttributeMap.id] = []string{uuid.Must(uuid.NewV4()).String()}
attrs["objectClass"] = append(attrs["objectClass"], "owncloud")
}
@@ -490,7 +500,7 @@ func (i *LDAP) getLDAPGroupByNameOrID(nameOrID string, requestMembers bool) (*ld
if err == nil {
filter = fmt.Sprintf("(|(%s=%s)(%s=%s))", i.groupAttributeMap.name, ldap.EscapeFilter(nameOrID), i.groupAttributeMap.id, idString)
} else {
filter = fmt.Sprintf("(%s=%s)", i.userAttributeMap.userName, ldap.EscapeFilter(nameOrID))
filter = fmt.Sprintf("(%s=%s)", i.groupAttributeMap.name, ldap.EscapeFilter(nameOrID))
}
return i.getLDAPGroupByFilter(filter, requestMembers)
}
@@ -0,0 +1,217 @@
package identity
// Integration tests: full stack NewLDAPWithReconnect → NewLDAPBackend → libregraph/idm boltdb LDAP server.
// Uses the same server oCIS ships in production (services/idm). Regression baseline for
// GetUser, GetUsers, CreateUser, DeleteUser.
import (
"context"
"fmt"
"net"
"net/url"
"os"
"path/filepath"
"testing"
"github.com/CiscoM31/godata"
gldap "github.com/go-ldap/ldap/v3"
"github.com/libregraph/idm/pkg/ldappassword"
"github.com/libregraph/idm/pkg/ldapserver"
"github.com/libregraph/idm/pkg/ldbbolt"
"github.com/libregraph/idm/server/handler/boltdb"
libregraph "github.com/owncloud/libre-graph-api-go"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
connldap "github.com/owncloud/reva/v2/pkg/utils/ldap"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
const (
idmBaseDN = "o=libregraph-idm"
idmAdminDN = "uid=admin,ou=sysusers,o=libregraph-idm"
idmAdminPW = "admin"
)
// idmConfig mirrors lconfig but with base DNs matching the libregraph/idm schema.
var idmConfig = lconfig
func init() {
idmConfig.UserBaseDN = "ou=users,o=libregraph-idm"
idmConfig.GroupBaseDN = "ou=groups,o=libregraph-idm"
idmConfig.LdapDisabledUsersGroupDN = "cn=DisabledUsersGroup,ou=groups,o=libregraph-idm"
idmConfig.WriteEnabled = true
idmConfig.UseServerUUID = false // boltdb does not auto-generate entryUUID; client must supply it
}
// idmEntry builds a gldap.Entry matching idmConfig attribute names.
func idmEntry(uid, uuid string) *gldap.Entry {
dn := fmt.Sprintf("uid=%s,%s", uid, idmConfig.UserBaseDN)
return gldap.NewEntry(dn, map[string][]string{
idmConfig.UserNameAttribute: {uid},
idmConfig.UserDisplayNameAttribute: {"Display " + uid},
idmConfig.UserEmailAttribute: {uid + "@example.com"},
idmConfig.UserIDAttribute: {uuid},
"sn": {uid},
"givenname": {uid},
idmConfig.UserEnabledAttribute: {"TRUE"},
idmConfig.UserTypeAttribute: {"Member"},
"objectClass": {"inetOrgPerson", "organizationalPerson", "person", "top", "ownCloudUser"},
})
}
// seedIDMDB seeds the boltdb with the OU structure, admin sysuser, and any additional entries.
func seedIDMDB(t *testing.T, dbfile string, entries ...*gldap.Entry) {
t.Helper()
bdb := &ldbbolt.LdbBolt{}
require.NoError(t, bdb.Configure(logrus.New(), idmBaseDN, dbfile, nil))
require.NoError(t, bdb.Initialize())
defer bdb.Close()
hashedPW, err := ldappassword.Hash(idmAdminPW, "{ARGON2}")
require.NoError(t, err)
// OU structure mirroring the real IDM base.ldif.tmpl
base := []*gldap.Entry{
gldap.NewEntry(idmBaseDN, map[string][]string{
"o": {"libregraph-idm"}, "objectClass": {"organization"},
}),
gldap.NewEntry("ou=users,o=libregraph-idm", map[string][]string{
"ou": {"users"}, "objectClass": {"organizationalUnit"},
}),
gldap.NewEntry("ou=sysusers,o=libregraph-idm", map[string][]string{
"ou": {"sysusers"}, "objectClass": {"organizationalUnit"},
}),
gldap.NewEntry("ou=groups,o=libregraph-idm", map[string][]string{
"ou": {"groups"}, "objectClass": {"organizationalUnit"},
}),
gldap.NewEntry(idmAdminDN, map[string][]string{
"uid": {"admin"}, "objectClass": {"account", "simpleSecurityObject"},
"userPassword": {hashedPW},
}),
}
for _, e := range base {
require.NoError(t, bdb.EntryPut(e), "seeding base entry %s", e.DN)
}
for _, e := range entries {
require.NoError(t, bdb.EntryPut(e), "seeding entry %s", e.DN)
}
}
// newIDMBackend starts the libregraph/idm boltdb LDAP server and returns a wired LDAP identity backend.
func newIDMBackend(t *testing.T, entries ...*gldap.Entry) *LDAP {
t.Helper()
dbfile := filepath.Join(t.TempDir(), "idm.db")
seedIDMDB(t, dbfile, entries...)
boltHandler, err := boltdb.NewBoltDBHandler(logrus.New(), dbfile, &boltdb.Options{
BaseDN: idmBaseDN,
AdminDN: idmAdminDN,
})
require.NoError(t, err)
srv := ldapserver.NewServer()
srv.EnforceLDAP = true // boltdb does not apply LDAP filters; the server must
ctx, cancel := context.WithCancel(context.Background())
h := boltHandler.WithContext(ctx)
srv.AddFunc("", h)
srv.BindFunc("", h)
srv.DeleteFunc("", h)
srv.ModifyFunc("", h)
srv.SearchFunc("", h)
ln, err := net.Listen("tcp", "127.0.0.1:0")
require.NoError(t, err)
quit := make(chan bool)
srv.QuitChannel(quit)
go func() { _ = srv.Serve(ln) }()
t.Cleanup(func() { cancel(); close(quit); ln.Close() })
level := os.Getenv("OCIS_LOG_LEVEL")
if level == "" {
level = "error"
}
lgr := log.NewLogger(log.Level(level))
conn := connldap.NewLDAPWithReconnect(connldap.Config{
URI: fmt.Sprintf("ldap://%s", ln.Addr().String()),
BindDN: idmAdminDN,
BindPassword: idmAdminPW,
RetryMaxCount: 1,
})
conn.SetLogger(&lgr.Logger)
backend, err := NewLDAPBackend(conn, idmConfig, &lgr, "", "")
require.NoError(t, err)
return backend
}
func odataReq(t *testing.T) *godata.GoDataRequest {
t.Helper()
req, err := godata.ParseRequest(context.Background(), "", url.Values{})
require.NoError(t, err)
return req
}
func TestIntegrationGetUser_HappyPath(t *testing.T) {
b := newIDMBackend(t,
idmEntry("alice", "aaaaaaaa-0000-0000-0000-000000000001"),
)
user, err := b.GetUser(context.Background(), "alice", odataReq(t))
require.NoError(t, err)
assert.Equal(t, "alice", user.GetOnPremisesSamAccountName())
assert.Equal(t, "Display alice", user.GetDisplayName())
assert.Equal(t, "alice@example.com", user.GetMail())
}
func TestIntegrationGetUsers_HappyPath(t *testing.T) {
b := newIDMBackend(t,
idmEntry("alice", "aaaaaaaa-0000-0000-0000-000000000001"),
idmEntry("bob", "bbbbbbbb-0000-0000-0000-000000000002"),
)
users, err := b.GetUsers(context.Background(), odataReq(t))
require.NoError(t, err)
require.Len(t, users, 2)
names := make(map[string]bool, 2)
for _, u := range users {
names[u.GetOnPremisesSamAccountName()] = true
}
assert.True(t, names["alice"])
assert.True(t, names["bob"])
}
func TestIntegrationCreateUser_HappyPath(t *testing.T) {
b := newIDMBackend(t) // empty — no pre-seeded users
newUser := libregraph.NewUser("Charlie", "charlie")
newUser.SetMail("charlie@example.com")
newUser.SetSurname("Charlie")
newUser.SetGivenName("Charlie")
newUser.SetAccountEnabled(true)
newUser.SetUserType("Member")
created, err := b.CreateUser(context.Background(), *newUser)
require.NoError(t, err)
assert.Equal(t, "charlie", created.GetOnPremisesSamAccountName())
assert.Equal(t, "Charlie", created.GetDisplayName())
assert.Equal(t, "charlie@example.com", created.GetMail())
}
func TestIntegrationDeleteUser_HappyPath(t *testing.T) {
entry := idmEntry("dave", "dddddddd-0000-0000-0000-000000000004")
b := newIDMBackend(t, entry)
// Confirm user exists first.
_, err := b.GetUser(context.Background(), "dave", odataReq(t))
require.NoError(t, err)
err = b.DeleteUser(context.Background(), "dave")
require.NoError(t, err)
// Confirm gone.
_, err = b.GetUser(context.Background(), "dave", odataReq(t))
require.Error(t, err)
}
+32 -312
View File
@@ -460,8 +460,12 @@ func TestUpdateUser(t *testing.T) {
DN: "uid=oldName",
Attributes: []*ldap.EntryAttribute{
{
Name: "displayname",
Values: []string{"oldmail@example.org"},
Name: lconfig.UserDisplayNameAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserNameAttribute,
Values: []string{"testUser"},
},
{
Name: "entryUUID",
@@ -482,54 +486,6 @@ func TestUpdateUser(t *testing.T) {
nil,
},
},
{
funcName: "Search",
args: []interface{}{
&ldap.SearchRequest{
BaseDN: "uid=oldName",
Scope: 0,
DerefAliases: 0,
SizeLimit: 1,
TimeLimit: 0,
TypesOnly: false,
Filter: "(objectClass=inetOrgPerson)",
Attributes: ldapUserAttributes,
Controls: []ldap.Control(nil),
},
},
returns: []interface{}{
&ldap.SearchResult{
Entries: []*ldap.Entry{
{
DN: "uid=oldName",
Attributes: []*ldap.EntryAttribute{
{
Name: lconfig.UserIDAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserEmailAttribute,
Values: []string{"testuser@example.org"},
},
{
Name: lconfig.UserDisplayNameAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserNameAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserEnabledAttribute,
Values: []string{""},
},
},
},
},
},
nil,
},
},
{
funcName: "Modify",
args: []interface{}{
@@ -590,7 +546,11 @@ func TestUpdateUser(t *testing.T) {
DN: "uid=oldName",
Attributes: []*ldap.EntryAttribute{
{
Name: "displayname",
Name: lconfig.UserDisplayNameAttribute,
Values: []string{"oldName"},
},
{
Name: lconfig.UserNameAttribute,
Values: []string{"testUser"},
},
{
@@ -612,54 +572,6 @@ func TestUpdateUser(t *testing.T) {
nil,
},
},
{
funcName: "Search",
args: []interface{}{
&ldap.SearchRequest{
BaseDN: "uid=oldName",
Scope: 0,
DerefAliases: 0,
SizeLimit: 1,
TimeLimit: 0,
TypesOnly: false,
Filter: "(objectClass=inetOrgPerson)",
Attributes: ldapUserAttributes,
Controls: []ldap.Control(nil),
},
},
returns: []interface{}{
&ldap.SearchResult{
Entries: []*ldap.Entry{
{
DN: "uid=oldName",
Attributes: []*ldap.EntryAttribute{
{
Name: lconfig.UserIDAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserEmailAttribute,
Values: []string{"testuser@example.org"},
},
{
Name: lconfig.UserDisplayNameAttribute,
Values: []string{"newName"},
},
{
Name: lconfig.UserNameAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserEnabledAttribute,
Values: []string{""},
},
},
},
},
},
nil,
},
},
{
funcName: "Modify",
args: []interface{}{
@@ -910,8 +822,12 @@ func TestUpdateUser(t *testing.T) {
DN: "uid=name",
Attributes: []*ldap.EntryAttribute{
{
Name: "displayname",
Values: []string{"testuser@example.org"},
Name: lconfig.UserDisplayNameAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserNameAttribute,
Values: []string{"testUser"},
},
{
Name: "entryUUID",
@@ -932,54 +848,6 @@ func TestUpdateUser(t *testing.T) {
nil,
},
},
{
funcName: "Search",
args: []interface{}{
&ldap.SearchRequest{
BaseDN: "uid=name",
Scope: 0,
DerefAliases: 0,
SizeLimit: 1,
TimeLimit: 0,
TypesOnly: false,
Filter: "(objectClass=inetOrgPerson)",
Attributes: ldapUserAttributes,
Controls: []ldap.Control(nil),
},
},
returns: []interface{}{
&ldap.SearchResult{
Entries: []*ldap.Entry{
{
DN: "uid=name",
Attributes: []*ldap.EntryAttribute{
{
Name: lconfig.UserIDAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserEmailAttribute,
Values: []string{"testuser@example.org"},
},
{
Name: lconfig.UserDisplayNameAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserNameAttribute,
Values: []string{"testUser"},
},
{
Name: lconfig.UserEnabledAttribute,
Values: []string{"FALSE"},
},
},
},
},
},
nil,
},
},
{
funcName: "Modify",
args: []interface{}{
@@ -1040,9 +908,13 @@ func TestUpdateUser(t *testing.T) {
{
DN: "uid=name",
Attributes: []*ldap.EntryAttribute{
{
Name: "uid",
Values: []string{"testUser"},
},
{
Name: "displayname",
Values: []string{"testuser@example.org"},
Values: []string{"testUser"},
},
{
Name: "entryUUID",
@@ -1114,58 +986,6 @@ func TestUpdateUser(t *testing.T) {
},
returns: []interface{}{nil},
},
{
funcName: "Modify",
args: []interface{}{
&ldap.ModifyRequest{
DN: "uid=name",
Changes: []ldap.Change(nil),
Controls: []ldap.Control(nil),
},
},
returns: []interface{}{nil},
},
{
funcName: "Search",
args: []interface{}{
ldap.NewSearchRequest(
"uid=name",
ldap.ScopeBaseObject,
ldap.NeverDerefAliases, 1, 0, false,
"(objectClass=inetOrgPerson)",
ldapUserAttributes,
[]ldap.Control(nil),
),
},
returns: []interface{}{
&ldap.SearchResult{
Entries: []*ldap.Entry{
{
DN: "uid=name",
Attributes: []*ldap.EntryAttribute{
{
Name: "uid",
Values: []string{"testUser"},
},
{
Name: "displayname",
Values: []string{"testUser"},
},
{
Name: "entryUUID",
Values: []string{"testUser"},
},
{
Name: "mail",
Values: []string{"testuser@example.org"},
},
},
},
},
},
nil,
},
},
},
},
{
@@ -1207,9 +1027,13 @@ func TestUpdateUser(t *testing.T) {
{
DN: "uid=name",
Attributes: []*ldap.EntryAttribute{
{
Name: "uid",
Values: []string{"testUser"},
},
{
Name: "displayname",
Values: []string{"testuser@example.org"},
Values: []string{"testUser"},
},
{
Name: "entryUUID",
@@ -1281,58 +1105,6 @@ func TestUpdateUser(t *testing.T) {
},
returns: []interface{}{nil},
},
{
funcName: "Modify",
args: []interface{}{
&ldap.ModifyRequest{
DN: "uid=name",
Changes: []ldap.Change(nil),
Controls: []ldap.Control(nil),
},
},
returns: []interface{}{nil},
},
{
funcName: "Search",
args: []interface{}{
ldap.NewSearchRequest(
"uid=name",
ldap.ScopeBaseObject,
ldap.NeverDerefAliases, 1, 0, false,
"(objectClass=inetOrgPerson)",
ldapUserAttributes,
[]ldap.Control(nil),
),
},
returns: []interface{}{
&ldap.SearchResult{
Entries: []*ldap.Entry{
{
DN: "uid=name",
Attributes: []*ldap.EntryAttribute{
{
Name: "uid",
Values: []string{"testUser"},
},
{
Name: "displayname",
Values: []string{"testUser"},
},
{
Name: "entryUUID",
Values: []string{"testUser"},
},
{
Name: "mail",
Values: []string{"testuser@example.org"},
},
},
},
},
},
nil,
},
},
},
},
{
@@ -1373,9 +1145,13 @@ func TestUpdateUser(t *testing.T) {
{
DN: "uid=name",
Attributes: []*ldap.EntryAttribute{
{
Name: "uid",
Values: []string{"testUser"},
},
{
Name: "displayname",
Values: []string{"testuser@example.org"},
Values: []string{"testUser"},
},
{
Name: "entryUUID",
@@ -1415,62 +1191,6 @@ func TestUpdateUser(t *testing.T) {
},
returns: []interface{}{nil},
},
{
funcName: "Modify",
args: []interface{}{
&ldap.ModifyRequest{
DN: "uid=name",
Changes: []ldap.Change(nil),
Controls: []ldap.Control(nil),
},
},
returns: []interface{}{nil},
},
{
funcName: "Search",
args: []interface{}{
ldap.NewSearchRequest(
"uid=name",
ldap.ScopeBaseObject,
ldap.NeverDerefAliases, 1, 0, false,
"(objectClass=inetOrgPerson)",
ldapUserAttributes,
[]ldap.Control(nil),
),
},
returns: []interface{}{
&ldap.SearchResult{
Entries: []*ldap.Entry{
{
DN: "uid=name",
Attributes: []*ldap.EntryAttribute{
{
Name: "uid",
Values: []string{"testUser"},
},
{
Name: "displayname",
Values: []string{"testUser"},
},
{
Name: "entryUUID",
Values: []string{"testUser"},
},
{
Name: "mail",
Values: []string{"testuser@example.org"},
},
{
Name: lconfig.UserTypeAttribute,
Values: []string{"Member"},
},
},
},
},
},
nil,
},
},
},
},
}
@@ -0,0 +1,125 @@
package identity
import (
"strings"
"github.com/go-ldap/ldap/v3"
)
// attrsFromAddRequest flattens the attributes of an *ldap.AddRequest into the
// map[string][]string shape that ldap.NewEntry expects. It is used to synthesize
// the response entry from data already in hand, avoiding a read-after-write when
// oCIS generated the entry's ID itself (useServerUUID=false).
func attrsFromAddRequest(ar *ldap.AddRequest) map[string][]string {
attrs := make(map[string][]string, len(ar.Attributes))
for _, a := range ar.Attributes {
vals := make([]string, len(a.Vals))
copy(vals, a.Vals)
attrs[a.Type] = vals
}
return attrs
}
// applyModifyToEntry returns a copy of base with the changes from mr folded on
// (Replace / Add / Delete). It never mutates base. Attribute names are matched
// case-insensitively, consistent with ldap.Entry's GetEqualFold* accessors, so
// folding never produces a duplicate attribute entry that differs only in case.
//
// It is used to synthesize the response entry after an update from the pre-read
// entry plus the ModifyRequest being persisted, avoiding a read-after-write.
func applyModifyToEntry(base *ldap.Entry, mr *ldap.ModifyRequest) *ldap.Entry {
if base == nil {
return nil
}
if mr == nil {
mr = &ldap.ModifyRequest{DN: base.DN}
}
// Deep-copy base into a name->values map so we never touch the original.
attrs := make(map[string][]string, len(base.Attributes))
// order preserves the original attribute order, with new attributes appended.
order := make([]string, 0, len(base.Attributes))
index := make(map[string]string, len(base.Attributes)) // fold-key -> stored name
for _, a := range base.Attributes {
vals := make([]string, len(a.Values))
copy(vals, a.Values)
attrs[a.Name] = vals
order = append(order, a.Name)
index[strings.ToLower(a.Name)] = a.Name
}
// name resolves the stored attribute name for attrType case-insensitively,
// registering a new attribute (preserving the request's casing) if none matches.
name := func(attrType string) string {
if n, ok := index[strings.ToLower(attrType)]; ok {
return n
}
index[strings.ToLower(attrType)] = attrType
order = append(order, attrType)
return attrType
}
for _, change := range mr.Changes {
attrType := change.Modification.Type
vals := change.Modification.Vals
switch change.Operation {
case ldap.ReplaceAttribute:
n := name(attrType)
cp := make([]string, len(vals))
copy(cp, vals)
attrs[n] = cp
case ldap.AddAttribute:
n := name(attrType)
attrs[n] = append(attrs[n], vals...)
case ldap.DeleteAttribute:
if n, ok := index[strings.ToLower(attrType)]; ok {
if len(vals) == 0 {
// whole-attribute delete
delete(attrs, n)
} else {
kept := removeValues(attrs[n], vals)
if len(kept) == 0 {
// the last value was removed; a real server drops the attribute
delete(attrs, n)
} else {
attrs[n] = kept
}
}
}
}
}
dn := base.DN
if mr.DN != "" {
dn = mr.DN
}
result := ldap.NewEntry(dn, nil)
result.Attributes = make([]*ldap.EntryAttribute, 0, len(order))
for _, n := range order {
v, ok := attrs[n]
if !ok {
// deleted attribute
continue
}
result.Attributes = append(result.Attributes, ldap.NewEntryAttribute(n, v))
}
return result
}
// removeValues returns have with every element of remove stripped out.
func removeValues(have, remove []string) []string {
if len(have) == 0 {
return have
}
drop := make(map[string]struct{}, len(remove))
for _, r := range remove {
drop[r] = struct{}{}
}
kept := make([]string, 0, len(have))
for _, v := range have {
if _, ok := drop[v]; ok {
continue
}
kept = append(kept, v)
}
return kept
}
@@ -0,0 +1,824 @@
package identity
import (
"context"
"strings"
"sync/atomic"
"testing"
"time"
"github.com/go-ldap/ldap/v3"
libregraph "github.com/owncloud/libre-graph-api-go"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/services/graph/pkg/identity/mocks"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)
func TestAttrsFromAddRequest(t *testing.T) {
ar := ldap.NewAddRequest("uid=alice,ou=people,dc=test", nil)
ar.Attribute("uid", []string{"alice"})
ar.Attribute("displayname", []string{"Alice Example"})
ar.Attribute("mail", []string{"alice@example.org", "a@example.org"})
attrs := attrsFromAddRequest(ar)
assert.Equal(t, []string{"alice"}, attrs["uid"])
assert.Equal(t, []string{"Alice Example"}, attrs["displayname"])
assert.Equal(t, []string{"alice@example.org", "a@example.org"}, attrs["mail"])
// round-trips through ldap.NewEntry with case-insensitive lookup
e := ldap.NewEntry(ar.DN, attrs)
assert.Equal(t, ar.DN, e.DN)
assert.Equal(t, "alice", e.GetEqualFoldAttributeValue("UID"))
assert.Equal(t, "Alice Example", e.GetEqualFoldAttributeValue("displayName"))
assert.Equal(t, []string{"alice@example.org", "a@example.org"}, e.GetEqualFoldAttributeValues("mail"))
}
// TestAttrsFromAddRequestDoesNotAliasRequest guards against attrsFromAddRequest
// returning slices that alias ar.Attributes[].Vals: mutating the returned map must
// never change the AddRequest's own values, and vice versa.
func TestAttrsFromAddRequestDoesNotAliasRequest(t *testing.T) {
ar := ldap.NewAddRequest("uid=alice,ou=people,dc=test", nil)
ar.Attribute("mail", []string{"alice@example.org"})
attrs := attrsFromAddRequest(ar)
attrs["mail"][0] = "mutated@example.org"
assert.Equal(t, []string{"alice@example.org"}, ar.Attributes[0].Vals)
}
func TestApplyModifyToEntry(t *testing.T) {
base := ldap.NewEntry("uid=alice,ou=people,dc=test", map[string][]string{
"uid": {"alice"},
"displayname": {"Alice Example"},
"mail": {"alice@example.org"},
"member": {"cn=a", "cn=b"},
})
t.Run("Replace overwrites existing attribute", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: base.DN}
mr.Replace("displayname", []string{"Alice New"})
got := applyModifyToEntry(base, mr)
assert.Equal(t, "Alice New", got.GetEqualFoldAttributeValue("displayname"))
})
t.Run("Replace adds a not-yet-present attribute", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: base.DN}
mr.Replace("givenname", []string{"Alice"})
got := applyModifyToEntry(base, mr)
assert.Equal(t, "Alice", got.GetEqualFoldAttributeValue("givenname"))
})
t.Run("Add appends to existing attribute", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: base.DN}
mr.Add("member", []string{"cn=c"})
got := applyModifyToEntry(base, mr)
assert.Equal(t, []string{"cn=a", "cn=b", "cn=c"}, got.GetEqualFoldAttributeValues("member"))
})
t.Run("Delete whole attribute", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: base.DN}
mr.Delete("mail", []string{})
got := applyModifyToEntry(base, mr)
assert.Empty(t, got.GetEqualFoldAttributeValues("mail"))
})
t.Run("Delete specific value", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: base.DN}
mr.Delete("member", []string{"cn=a"})
got := applyModifyToEntry(base, mr)
assert.Equal(t, []string{"cn=b"}, got.GetEqualFoldAttributeValues("member"))
})
t.Run("Delete last remaining value drops the attribute", func(t *testing.T) {
single := ldap.NewEntry(base.DN, map[string][]string{
"member": {"cn=a"},
})
mr := &ldap.ModifyRequest{DN: single.DN}
mr.Delete("member", []string{"cn=a"})
got := applyModifyToEntry(single, mr)
assert.Empty(t, got.GetEqualFoldAttributeValues("member"))
for _, a := range got.Attributes {
assert.NotEqual(t, "member", strings.ToLower(a.Name), "attribute must be dropped, not left empty")
}
})
t.Run("nil ModifyRequest returns base unchanged", func(t *testing.T) {
got := applyModifyToEntry(base, nil)
assert.Equal(t, base.DN, got.DN)
assert.Equal(t, "Alice Example", got.GetEqualFoldAttributeValue("displayname"))
assert.Equal(t, []string{"cn=a", "cn=b"}, got.GetEqualFoldAttributeValues("member"))
})
t.Run("nil base returns nil", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: "uid=alice,ou=people,dc=test"}
mr.Replace("displayname", []string{"Alice New"})
got := applyModifyToEntry(nil, mr)
assert.Nil(t, got)
})
t.Run("case-insensitive match creates no duplicate", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: base.DN}
mr.Replace("DisplayName", []string{"Alice Caps"})
got := applyModifyToEntry(base, mr)
assert.Equal(t, "Alice Caps", got.GetEqualFoldAttributeValue("displayname"))
// exactly one attribute entry whose name folds to displayname
count := 0
for _, a := range got.Attributes {
if strings.EqualFold(a.Name, "displayname") {
count++
}
}
assert.Equal(t, 1, count)
})
t.Run("base is never mutated", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: base.DN}
mr.Replace("displayname", []string{"Mutated"})
mr.Add("member", []string{"cn=z"})
mr.Delete("mail", []string{})
_ = applyModifyToEntry(base, mr)
assert.Equal(t, "Alice Example", base.GetEqualFoldAttributeValue("displayname"))
assert.Equal(t, []string{"cn=a", "cn=b"}, base.GetEqualFoldAttributeValues("member"))
assert.Equal(t, "alice@example.org", base.GetEqualFoldAttributeValue("mail"))
})
t.Run("Replace populates ByteValues for raw accessors", func(t *testing.T) {
mr := &ldap.ModifyRequest{DN: base.DN}
mr.Replace("displayname", []string{"Raw Value"})
got := applyModifyToEntry(base, mr)
assert.Equal(t, []byte("Raw Value"), got.GetEqualFoldRawAttributeValue("displayname"))
})
}
// TestCreateUserReadBackRetriedOnStaleReplica asserts that with useServerUUID=true
// the server-assigned-UUID read-back is retried when it hits a lagging replica. A
// stale replica answers the base-scoped Search with a successful 0-entry result
// (surfaced as ErrNotFound above the connection-level retry layer, which only sees
// LDAP error codes), so getUserByDN is retried on ErrNotFound. Here the second read
// finds the entry: Search is called twice and CreateUser succeeds.
func TestCreateUserReadBackRetriedOnStaleReplica(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
user := libregraph.NewUser("DisplayName", "user")
user.SetMail("user@example")
user.SetAccountEnabled(true)
user.SetUserType("Member")
var written *ldap.AddRequest
var searchCalls int32
l := &mocks.Client{}
l.On("Add", mock.Anything).Run(func(args mock.Arguments) {
written = args.Get(0).(*ldap.AddRequest)
}).Return(nil)
l.On("Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeBaseObject
})).Return(func(sr *ldap.SearchRequest) *ldap.SearchResult {
if atomic.AddInt32(&searchCalls, 1) == 1 {
return &ldap.SearchResult{Entries: []*ldap.Entry{}} // stale replica: not yet visible
}
// Once visible, the entry carries the server-assigned UUID (with
// useServerUUID the id is not in the AddRequest — the directory generates it).
attrs := attrsFromAddRequest(written)
attrs["entryUUID"] = []string{"server-assigned-uuid"}
return &ldap.SearchResult{Entries: []*ldap.Entry{ldap.NewEntry(written.DN, attrs)}}
}, nil)
c := lconfig
c.UseServerUUID = true
b, err := NewLDAPBackend(l, c, &logger, "", "")
assert.Nil(t, err)
newUser, err := b.CreateUser(context.Background(), *user)
assert.NoError(t, err)
assert.NotNil(t, newUser)
assert.Equal(t, int32(2), atomic.LoadInt32(&searchCalls),
"read-back is retried once on the stale 0-entry result, then finds the entry")
}
// TestReadBackAfterWriteExhaustsRetriesReturnsNotFound asserts a read-back that
// stays stale for every attempt surfaces ErrNotFound after exactly RetryMaxCount+1
// reads rather than looping forever. With RetryMaxCount=2 that is 3 reads.
func TestReadBackAfterWriteExhaustsRetriesReturnsNotFound(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
user := libregraph.NewUser("DisplayName", "user")
user.SetMail("user@example")
user.SetAccountEnabled(true)
user.SetUserType("Member")
var searchCalls int32
l := &mocks.Client{}
l.On("Add", mock.Anything).Return(nil)
// Every read-back sees the stale replica: 0 entries, nil error.
l.On("Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeBaseObject
})).Return(func(sr *ldap.SearchRequest) *ldap.SearchResult {
atomic.AddInt32(&searchCalls, 1)
return &ldap.SearchResult{Entries: []*ldap.Entry{}}
}, nil)
c := lconfig
c.UseServerUUID = true
c.RetryMaxCount = 2 // 1 initial read + 2 retries = 3 reads
b, err := NewLDAPBackend(l, c, &logger, "", "")
assert.Nil(t, err)
newUser, err := b.CreateUser(context.Background(), *user)
assert.Error(t, err)
assert.Nil(t, newUser)
assert.Equal(t, int32(3), atomic.LoadInt32(&searchCalls),
"read-back is bounded at RetryMaxCount+1 attempts, not an unbounded loop")
}
// TestCreateUserSynthesizesWhenNotServerUUID asserts that with useServerUUID=false
// CreateUser builds the response model from the AddRequest instead of reading the
// entry back — i.e. no Search is issued after the Add.
func TestCreateUserSynthesizesWhenNotServerUUID(t *testing.T) {
displayName := "DisplayName"
mail := "user@example"
userName := "user"
surname := "surname"
givenName := "givenName"
userType := "Member"
l := &mocks.Client{}
// Add succeeds; Search must NOT be called (no read-back).
l.On("Add", mock.Anything).Return(nil)
logger := log.NewLogger(log.Level("debug"))
user := libregraph.NewUser(displayName, userName)
user.SetMail(mail)
user.SetSurname(surname)
user.SetGivenName(givenName)
user.SetAccountEnabled(true)
user.SetUserType(userType)
c := lconfig
c.UseServerUUID = false
b, err := NewLDAPBackend(l, c, &logger, "", "")
assert.Nil(t, err)
newUser, err := b.CreateUser(context.Background(), *user)
assert.Nil(t, err)
assert.Equal(t, displayName, newUser.GetDisplayName())
assert.Equal(t, mail, newUser.GetMail())
assert.Equal(t, userName, newUser.GetOnPremisesSamAccountName())
assert.Equal(t, givenName, newUser.GetGivenName())
assert.Equal(t, surname, newUser.GetSurname())
assert.True(t, newUser.GetAccountEnabled())
assert.Equal(t, userType, newUser.GetUserType())
// oCIS generated the id and wrote it into the Add; it must be present on the model.
assert.NotEmpty(t, newUser.GetId())
l.AssertNotCalled(t, "Search", mock.Anything)
}
// TestCreateUserSynthesizedModelEqualsReadBack is the regression guard: the model
// CreateUser returns from the synthesize path (useServerUUID=false) must equal the
// model the unchanged builder produces from the entry a read-back would have returned
// — i.e. the server's echo of exactly what oCIS wrote. Eliminating the read-back must
// not change the CreateUser response for any populated field.
func TestCreateUserSynthesizedModelEqualsReadBack(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
user := libregraph.NewUser("DisplayName", "user")
user.SetMail("user@example")
user.SetSurname("surname")
user.SetGivenName("givenName")
user.SetAccountEnabled(true)
user.SetUserType("Member")
// Capture the AddRequest so we can reproduce the entry a read-back would return.
var written *ldap.AddRequest
l := &mocks.Client{}
l.On("Add", mock.Anything).Run(func(args mock.Arguments) {
written = args.Get(0).(*ldap.AddRequest)
}).Return(nil)
c := lconfig
c.UseServerUUID = false
b, err := NewLDAPBackend(l, c, &logger, "", "")
assert.Nil(t, err)
synthUser, err := b.CreateUser(context.Background(), *user)
assert.Nil(t, err)
// Ground truth: what the old read-back path would have built. A base-scoped search
// on the DN returns exactly the attributes that were written, so the read-back entry
// is ldap.NewEntry over the captured AddRequest.
readBackEntry := ldap.NewEntry(written.DN, attrsFromAddRequest(written))
readBackModel := b.createUserModelFromLDAP(readBackEntry)
assert.Equal(t, readBackModel, synthUser)
}
// TestSynthesizedEntryPopulatesInstancesWithoutSearch is the regression guard for the
// attribute-sourced multi-instance fields. With instanceURLTemplate +
// crossInstanceReferenceTemplate configured and instanceMapperEnabled=false, building a
// user model from a synthesized entry (as the create/update fold paths do) must populate
// user.Instances / CrossInstanceReference AND must not issue a live Search — the codepath
// only searches when instanceMapperEnabled=true, which is mutually exclusive with the
// "no second LDAP call" guarantee (see the design spec's Testing section).
func TestSynthesizedEntryPopulatesInstancesWithoutSearch(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
c := lconfig
c.UserMemberAttribute = "ocMemberOfInstance"
c.InstanceURLTemplate = "https://{{.Instancename}}.example.org"
c.CrossInstanceReferenceTemplate = "{{.Username}}@{{.Instancename}}"
c.InstanceMapperEnabled = false
l := &mocks.Client{}
// A non-empty instanceID is required for the instance templates to be parsed.
b, err := NewLDAPBackend(l, c, &logger, "instanceA", "")
assert.Nil(t, err)
// Synthesized entry as attrsFromAddRequest + ldap.NewEntry would produce, carrying a
// member-of-instance value so the Instances loop runs.
entry := ldap.NewEntry("uid=user,ou=people,dc=test", map[string][]string{
"uid": {"user"},
"displayname": {"DisplayName"},
"mail": {"user@example"},
"entryUUID": {"abcd-defg"},
"ocMemberOfInstance": {"instanceA"},
})
model := b.createUserModelFromLDAP(entry)
assert.NotNil(t, model)
assert.NotEmpty(t, model.Instances)
assert.Equal(t, "https://instanceA.example.org", model.Instances[0].GetUrl())
assert.NotNil(t, model.CrossInstanceReference)
assert.Equal(t, "user@instanceA", model.GetCrossInstanceReference())
// instanceMapperEnabled=false → getInstance returns the value verbatim, no Search.
l.AssertNotCalled(t, "Search", mock.Anything)
}
// TestCreateGroupSynthesizesWhenNotServerUUID asserts CreateGroup builds its response
// from the AddRequest (no read-back) when oCIS generated the id itself.
func TestCreateGroupSynthesizesWhenNotServerUUID(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
// oCIS writes the generated group id under the configured GroupIDAttribute, so the
// synthesized entry must carry the id under that attribute for the model builder.
c := lconfig
c.UseServerUUID = false
c.GroupIDAttribute = "owncloudUUID"
var written *ldap.AddRequest
l := &mocks.Client{}
l.On("Add", mock.Anything).Run(func(args mock.Arguments) {
written = args.Get(0).(*ldap.AddRequest)
}).Return(nil)
b, err := NewLDAPBackend(l, c, &logger, "", "")
assert.Nil(t, err)
group := libregraph.NewGroup()
group.SetDisplayName("mygroup")
newGroup, err := b.CreateGroup(context.Background(), *group)
assert.Nil(t, err)
assert.Equal(t, "mygroup", newGroup.GetDisplayName())
assert.NotEmpty(t, newGroup.GetId())
l.AssertNotCalled(t, "Search", mock.Anything)
// parity with the read-back-derived model
readBackModel := b.createGroupModelFromLDAP(ldap.NewEntry(written.DN, attrsFromAddRequest(written)))
assert.Equal(t, readBackModel, newGroup)
}
// TestCreateEducationUserSynthesizesWhenNotServerUUID asserts CreateEducationUser
// synthesizes its response (no read-back) when oCIS generated the id itself.
func TestCreateEducationUserSynthesizesWhenNotServerUUID(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
c := eduConfig
c.UseServerUUID = false
var written *ldap.AddRequest
l := &mocks.Client{}
l.On("Add", mock.Anything).Run(func(args mock.Arguments) {
written = args.Get(0).(*ldap.AddRequest)
}).Return(nil)
b, err := getMockedBackend(l, c, &logger)
assert.Nil(t, err)
user := libregraph.NewEducationUser()
user.SetDisplayName("Test User")
user.SetOnPremisesSamAccountName("testuser")
user.SetMail("testuser@example.org")
user.SetPrimaryRole("student")
user.SetUserType("Member")
user.SetAccountEnabled(false)
user.SetExternalID("ext-ernal-id")
eduUser, err := b.CreateEducationUser(context.Background(), *user)
assert.Nil(t, err)
assert.Equal(t, "Test User", eduUser.GetDisplayName())
assert.Equal(t, "testuser", eduUser.GetOnPremisesSamAccountName())
assert.NotEmpty(t, eduUser.GetId())
l.AssertNotCalled(t, "Search", mock.Anything)
readBackModel := b.createEducationUserModelFromLDAP(ldap.NewEntry(written.DN, attrsFromAddRequest(written)))
assert.Equal(t, readBackModel, eduUser)
}
// TestCreateEducationClassSynthesizesWhenNotServerUUID asserts CreateEducationClass
// synthesizes its response (no read-back) when oCIS generated the id itself.
func TestCreateEducationClassSynthesizesWhenNotServerUUID(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
c := eduConfig
c.UseServerUUID = false
c.GroupIDAttribute = "owncloudUUID"
var written *ldap.AddRequest
l := &mocks.Client{}
l.On("Add", mock.Anything).Run(func(args mock.Arguments) {
written = args.Get(0).(*ldap.AddRequest)
}).Return(nil)
b, err := getMockedBackend(l, c, &logger)
assert.Nil(t, err)
class := libregraph.NewEducationClass()
class.SetExternalId("Math0123")
class.SetDisplayName("Math")
class.SetClassification("course")
resClass, err := b.CreateEducationClass(context.Background(), *class)
assert.Nil(t, err)
assert.Equal(t, "Math", resClass.GetDisplayName())
assert.Equal(t, "Math0123", resClass.GetExternalId())
assert.Equal(t, "course", resClass.GetClassification())
assert.NotEmpty(t, resClass.GetId())
l.AssertNotCalled(t, "Search", mock.Anything)
readBackModel := b.createEducationClassModelFromLDAP(ldap.NewEntry(written.DN, attrsFromAddRequest(written)))
assert.Equal(t, readBackModel, resClass)
}
// TestCreateEducationSchoolSynthesizesWhenNotServerUUID asserts CreateEducationSchool
// synthesizes its response (no read-back) when oCIS generated the id itself. The
// pre-create duplicate-number Search still fires; only the read-back is eliminated.
func TestCreateEducationSchoolSynthesizesWhenNotServerUUID(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
c := eduConfig
c.UseServerUUID = false
var written *ldap.AddRequest
l := &mocks.Client{}
l.On("Add", mock.Anything).Run(func(args mock.Arguments) {
written = args.Get(0).(*ldap.AddRequest)
}).Return(nil)
// The duplicate-schoolNumber lookup before Add is a subtree search that returns
// "not found" so create proceeds. No base-scoped read-back must follow the Add.
l.On("Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeWholeSubtree
})).Return(&ldap.SearchResult{Entries: []*ldap.Entry{}}, nil)
b, err := getMockedBackend(l, c, &logger)
assert.Nil(t, err)
school := libregraph.NewEducationSchool()
school.SetDisplayName("Test School")
school.SetSchoolNumber("0123")
resSchool, err := b.CreateEducationSchool(context.Background(), *school)
assert.Nil(t, err)
assert.Equal(t, "Test School", resSchool.GetDisplayName())
assert.Equal(t, "0123", resSchool.GetSchoolNumber())
assert.NotEmpty(t, resSchool.GetId())
// no base-scoped read-back on the created school DN
l.AssertNotCalled(t, "Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeBaseObject
}))
readBackModel := b.createSchoolModelFromLDAP(ldap.NewEntry(written.DN, attrsFromAddRequest(written)))
assert.Equal(t, readBackModel, resSchool)
}
// TestUpdateUserFoldsNoReadBack asserts a non-rename UpdateUser does not read the
// entry back: it pre-reads once, Modifies, and folds the ModifyRequest onto the
// pre-read entry to build the response.
func TestUpdateUserFoldsNoReadBack(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
preRead := ldap.NewEntry("uid=user,ou=people,dc=test", map[string][]string{
"uid": {"user"},
"displayname": {"Old Name"},
"mail": {"old@example.org"},
"entryUUID": {"abcd-defg"},
"userTypeAttribute": {"Member"},
})
l := &mocks.Client{}
// Pre-read (subtree search by name/id) returns the entry once.
l.On("Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeWholeSubtree
})).Return(&ldap.SearchResult{Entries: []*ldap.Entry{preRead}}, nil).Once()
l.On("Modify", mock.Anything).Return(nil)
b, err := getMockedBackend(l, lconfig, &logger)
assert.Nil(t, err)
id := "abcd-defg"
newMail := "new@example.org"
update := libregraph.UserUpdate{Mail: &newMail}
update.Id = &id
got, err := b.UpdateUser(context.Background(), "user", update)
assert.Nil(t, err)
assert.Equal(t, newMail, got.GetMail())
assert.Equal(t, "Old Name", got.GetDisplayName())
assert.Equal(t, "abcd-defg", got.GetId())
// No base-scoped read-back after the Modify.
l.AssertNotCalled(t, "Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeBaseObject
}))
}
// TestUpdateEducationUserFoldsNoReadBack asserts a non-rename UpdateEducationUser
// folds the ModifyRequest onto the pre-read entry rather than reading it back.
func TestUpdateEducationUserFoldsNoReadBack(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
preRead := ldap.NewEntry("uid=testuser,ou=people,dc=test", map[string][]string{
"uid": {"testuser"},
"displayname": {"Test User"},
"mail": {"old@example.org"},
"entryUUID": {"abcd-defg"},
"userClass": {"student"},
"userTypeAttribute": {"Member"},
})
l := &mocks.Client{}
// Pre-read by name/id (subtree) returns the entry; no base-scoped read-back after.
l.On("Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeWholeSubtree
})).Return(&ldap.SearchResult{Entries: []*ldap.Entry{preRead}}, nil).Once()
l.On("Modify", mock.Anything).Return(nil)
b, err := getMockedBackend(l, eduConfig, &logger)
assert.Nil(t, err)
newMail := "new@example.org"
user := libregraph.NewEducationUser()
user.SetMail(newMail)
got, err := b.UpdateEducationUser(context.Background(), "testuser", *user)
assert.Nil(t, err)
assert.Equal(t, newMail, got.GetMail())
assert.Equal(t, "Test User", got.GetDisplayName())
assert.Equal(t, "abcd-defg", got.GetId())
l.AssertNotCalled(t, "Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeBaseObject
}))
}
// TestUpdateEducationSchoolFoldsNoReadBack asserts UpdateEducationSchool folds the
// applied property changes onto the pre-read entry rather than reading it back.
func TestUpdateEducationSchoolFoldsNoReadBack(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
preRead := ldap.NewEntry("ou=Test School", map[string][]string{
"ou": {"Test School"},
"ocEducationSchoolNumber": {"0123"},
"owncloudUUID": {"abcd-defg"},
})
l := &mocks.Client{}
// Single pre-read; the termination Replace is folded on. No second Search.
l.On("Search", mock.Anything).Return(&ldap.SearchResult{Entries: []*ldap.Entry{preRead}}, nil).Once()
l.On("Modify", mock.Anything).Return(nil)
b, err := getMockedBackend(l, eduConfig, &logger)
assert.Nil(t, err)
school := libregraph.NewEducationSchool()
terminationTime := time.Date(2042, time.January, 31, 12, 0, 0, 0, time.UTC)
school.SetTerminationDate(terminationTime)
got, err := b.UpdateEducationSchool(context.Background(), "abcd-defg", *school)
assert.Nil(t, err)
assert.Equal(t, "Test School", got.GetDisplayName())
assert.Equal(t, "abcd-defg", got.GetId())
assert.Equal(t, "0123", got.GetSchoolNumber())
// the folded termination date is reflected in the response
assert.True(t, got.HasTerminationDate())
assert.True(t, terminationTime.Equal(got.GetTerminationDate()))
l.AssertNumberOfCalls(t, "Search", 1)
}
// TestUpdateEducationClassFoldPreservesClassificationAndExternalID guards the Site 9
// regression: folding must not drop classification/externalID from the response, even
// on an update that only changes displayName. It also asserts no read-back after Modify.
func TestUpdateEducationClassFoldPreservesClassificationAndExternalID(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
// Full education-class entry as getEducationClassByID would return it.
preRead := ldap.NewEntry("ocEducationExternalId=Math0123,ou=groups,dc=test", map[string][]string{
"cn": {"Math"},
"entryUUID": {"abcd-defg"},
"ocEducationExternalId": {"Math0123"},
"ocEducationClassType": {"course"},
})
l := &mocks.Client{}
l.On("Search", mock.Anything).Return(&ldap.SearchResult{Entries: []*ldap.Entry{preRead}}, nil).Once()
l.On("Modify", mock.Anything).Return(nil)
b, err := getMockedBackend(l, eduConfig, &logger)
assert.Nil(t, err)
newName := "Math-2"
class := libregraph.EducationClass{DisplayName: &newName}
got, err := b.UpdateEducationClass(context.Background(), "abcd-defg", class)
assert.Nil(t, err)
assert.Equal(t, "Math-2", got.GetDisplayName())
assert.Equal(t, "abcd-defg", got.GetId())
// classification and externalID must survive a displayName-only update
assert.Equal(t, "course", got.GetClassification())
assert.Equal(t, "Math0123", got.GetExternalId())
l.AssertNotCalled(t, "Search", mock.MatchedBy(func(sr *ldap.SearchRequest) bool {
return sr.Scope == ldap.ScopeBaseObject
}))
}
// TestCreateGroupSynthesizesWithNonDefaultIDAttribute guards the fix for the
// hardcoded "owncloudUUID" id write: the generated id must be stored under the
// configured GroupIDAttribute, otherwise the synthesized model has no id and
// createGroupModelFromLDAP returns nil (CreateGroup would return (nil, nil)).
func TestCreateGroupSynthesizesWithNonDefaultIDAttribute(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
c := lconfig
c.UseServerUUID = false
c.GroupIDAttribute = "entryUUID" // non-default: previously the id was written to owncloudUUID only
var written *ldap.AddRequest
l := &mocks.Client{}
l.On("Add", mock.Anything).Run(func(args mock.Arguments) {
written = args.Get(0).(*ldap.AddRequest)
}).Return(nil)
b, err := NewLDAPBackend(l, c, &logger, "", "")
assert.Nil(t, err)
group := libregraph.NewGroup()
group.SetDisplayName("mygroup")
newGroup, err := b.CreateGroup(context.Background(), *group)
assert.Nil(t, err)
assert.NotNil(t, newGroup)
assert.Equal(t, "mygroup", newGroup.GetDisplayName())
// the id was written under the configured attribute and survives synthesis
assert.NotEmpty(t, newGroup.GetId())
assert.NotEmpty(t, written.Attributes)
// the AddRequest carries the id under the configured attribute, not "owncloudUUID"
var idFromConfigured, idFromHardcoded string
for _, a := range written.Attributes {
switch a.Type {
case c.GroupIDAttribute:
if len(a.Vals) > 0 {
idFromConfigured = a.Vals[0]
}
case "owncloudUUID":
if len(a.Vals) > 0 {
idFromHardcoded = a.Vals[0]
}
}
}
assert.NotEmpty(t, idFromConfigured, "id must be written under the configured GroupIDAttribute")
assert.Empty(t, idFromHardcoded, "id must not be written under a hardcoded owncloudUUID")
assert.Equal(t, idFromConfigured, newGroup.GetId())
l.AssertNotCalled(t, "Search", mock.Anything)
}
// TestCreateEducationClassSynthesizesWithNonDefaultIDAttribute guards the same
// hardcoded-id fix on the education-class create path, which reuses
// groupToLDAPAttrValues.
func TestCreateEducationClassSynthesizesWithNonDefaultIDAttribute(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
c := eduConfig
c.UseServerUUID = false
c.GroupIDAttribute = "entryUUID" // non-default
l := &mocks.Client{}
l.On("Add", mock.Anything).Return(nil)
b, err := getMockedBackend(l, c, &logger)
assert.Nil(t, err)
class := libregraph.NewEducationClass()
class.SetExternalId("Math0123")
class.SetDisplayName("Math")
class.SetClassification("course")
resClass, err := b.CreateEducationClass(context.Background(), *class)
assert.Nil(t, err)
assert.NotNil(t, resClass)
assert.Equal(t, "Math", resClass.GetDisplayName())
// the id survives synthesis under the configured attribute
assert.NotEmpty(t, resClass.GetId())
l.AssertNotCalled(t, "Search", mock.Anything)
}
// TestGetGroupByNameUsesGroupNameAttribute guards the fix for the name-only lookup
// branch of getLDAPGroupByNameOrID, which previously filtered by the user name
// attribute (uid) instead of the group name attribute (cn), so a group could never
// be found by name. That else-branch is reached when filterEscapeUUID errors, which
// happens for a non-UUID name when the id attribute is an octet string. The lookup
// is exercised directly so the assertion isolates the filter, independent of model
// building.
func TestGetGroupByNameUsesGroupNameAttribute(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
c := lconfig
// Octet-string group IDs require server-assigned UUIDs; this also makes
// filterEscapeUUID error on a non-UUID name, reaching the name-only else branch.
c.UseServerUUID = true
c.GroupIDIsOctetString = true
var groupSearch *ldap.SearchRequest
l := &mocks.Client{}
l.On("Search", mock.Anything).Run(func(args mock.Arguments) {
groupSearch = args.Get(0).(*ldap.SearchRequest)
}).Return(&ldap.SearchResult{Entries: []*ldap.Entry{groupEntry}}, nil)
b, err := getMockedBackend(l, c, &logger)
assert.Nil(t, err)
_, err = b.getLDAPGroupByNameOrID("group", false)
assert.Nil(t, err)
assert.NotNil(t, groupSearch)
// the filter must use the group name attribute (cn), not the user name attribute (uid)
assert.Contains(t, groupSearch.Filter, "("+b.groupAttributeMap.name+"=group)")
assert.NotContains(t, groupSearch.Filter, b.userAttributeMap.userName+"=group")
}
// TestNewLDAPBackendRejectsOctetStringWithoutServerUUID guards the fail-fast check:
// octet-string ID attributes (server-assigned, e.g. AD objectGUID) are incompatible
// with UseServerUUID=false, where oCIS generates string UUIDs. The combination must
// be rejected at startup rather than silently producing corrupt IDs.
func TestNewLDAPBackendRejectsOctetStringWithoutServerUUID(t *testing.T) {
logger := log.NewLogger(log.Level("debug"))
l := &mocks.Client{}
t.Run("user octet-string without server UUID is rejected", func(t *testing.T) {
c := lconfig
c.UseServerUUID = false
c.UserIDIsOctetString = true
_, err := NewLDAPBackend(l, c, &logger, "", "")
assert.Error(t, err)
})
t.Run("group octet-string without server UUID is rejected", func(t *testing.T) {
c := lconfig
c.UseServerUUID = false
c.GroupIDIsOctetString = true
_, err := NewLDAPBackend(l, c, &logger, "", "")
assert.Error(t, err)
})
t.Run("octet-string with server UUID is allowed", func(t *testing.T) {
c := lconfig
c.UseServerUUID = true
c.UserIDIsOctetString = true
c.GroupIDIsOctetString = true
_, err := NewLDAPBackend(l, c, &logger, "", "")
assert.NoError(t, err)
})
t.Run("string IDs without server UUID is allowed", func(t *testing.T) {
c := lconfig
c.UseServerUUID = false
c.UserIDIsOctetString = false
c.GroupIDIsOctetString = false
_, err := NewLDAPBackend(l, c, &logger, "", "")
assert.NoError(t, err)
})
}
+27 -27
View File
@@ -435,20 +435,20 @@ func (g BaseGraphService) cs3UserSharesToDriveItems(ctx context.Context, shares
return nil
})
}
// Wait for things to settle down, then close results chan
go func() {
_ = errg.Wait() // error is checked later
close(results)
}()
// Wait for all workers to finish before collecting the results. The workers
// read from driveItems, so writing to it below must not overlap with them.
// The results channel is buffered with len(shares), which is at least the
// number of items the workers can send, so they never block on the handover.
if err := errg.Wait(); err != nil {
return nil, err
}
close(results)
for item := range results {
driveItems[item.GetId()] = *item
}
if err := errg.Wait(); err != nil {
return nil, err
}
return driveItems, nil
}
@@ -535,20 +535,20 @@ func (g BaseGraphService) cs3OCMSharesToDriveItems(ctx context.Context, shares [
return nil
})
}
// Wait for things to settle down, then close results chan
go func() {
_ = errg.Wait() // error is checked later
close(results)
}()
// Wait for all workers to finish before collecting the results. The workers
// read from driveItems, so writing to it below must not overlap with them.
// The results channel is buffered with len(shares), which is at least the
// number of items the workers can send, so they never block on the handover.
if err := errg.Wait(); err != nil {
return nil, err
}
close(results)
for item := range results {
driveItems[item.GetId()] = *item
}
if err := errg.Wait(); err != nil {
return nil, err
}
return driveItems, nil
}
@@ -797,20 +797,20 @@ func (g BaseGraphService) cs3PublicSharesToDriveItems(ctx context.Context, share
return nil
})
}
// Wait for things to settle down, then close results chan
go func() {
_ = errg.Wait() // error is checked later
close(results)
}()
// Wait for all workers to finish before collecting the results. The workers
// read from driveItems, so writing to it below must not overlap with them.
// The results channel is buffered with len(shares), which is at least the
// number of items the workers can send, so they never block on the handover.
if err := errg.Wait(); err != nil {
return nil, err
}
close(results)
for item := range results {
driveItems[item.GetId()] = *item
}
if err := errg.Wait(); err != nil {
return nil, err
}
return driveItems, nil
}
@@ -0,0 +1,159 @@
package svc
import (
"context"
"fmt"
"testing"
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1"
link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1"
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
libregraph "github.com/owncloud/libre-graph-api-go"
"github.com/owncloud/ocis/v2/services/graph/pkg/config/defaults"
"github.com/owncloud/ocis/v2/services/graph/pkg/identity"
"github.com/owncloud/reva/v2/pkg/conversions"
"github.com/owncloud/reva/v2/pkg/rgrpc/status"
"github.com/owncloud/reva/v2/pkg/rgrpc/todo/pool"
cs3mocks "github.com/owncloud/reva/v2/tests/cs3mocks/mocks"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
)
// numRaceTestResources needs to be comfortably larger than the number of
// workers so that some workers are still reading from the driveItems map while
// the collecting loop has already started writing to it.
const numRaceTestResources = 200
// newRaceTestService builds a BaseGraphService with a mocked gateway that can
// stat any resource and resolve any user.
func newRaceTestService(t *testing.T, maxConcurrency int) BaseGraphService {
t.Helper()
selectorName := fmt.Sprintf("GatewaySelectorRace%d", maxConcurrency)
pool.RemoveSelector(selectorName + "com.owncloud.api.gateway")
gatewayClient := &cs3mocks.GatewayAPIClient{}
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(
func(_ context.Context, req *storageprovider.StatRequest, _ ...grpc.CallOption) *storageprovider.StatResponse {
return &storageprovider.StatResponse{
Status: status.NewOK(context.Background()),
Info: &storageprovider.ResourceInfo{
Id: req.GetRef().GetResourceId(),
Type: storageprovider.ResourceType_RESOURCE_TYPE_CONTAINER,
},
}
},
nil,
)
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(
&userpb.GetUserResponse{
Status: status.NewOK(context.Background()),
User: &userpb.User{
Id: &userpb.UserId{Idp: "idp", OpaqueId: "user-id"},
DisplayName: "User Name",
},
},
nil,
)
gatewayClient.On("GetPublicShare", mock.Anything, mock.Anything).Return(
&link.GetPublicShareResponse{Status: status.NewOK(context.Background())},
nil,
)
gatewaySelector := pool.GetSelector[gateway.GatewayAPIClient](
selectorName,
"com.owncloud.api.gateway",
func(cc grpc.ClientConnInterface) gateway.GatewayAPIClient {
return gatewayClient
},
)
cfg := defaults.FullDefaultConfig()
cfg.Identity.LDAP.CACert = ""
cfg.TokenManager.JWTSecret = "loremipsum"
cfg.MaxConcurrency = maxConcurrency
logger := log.NewLogger()
return BaseGraphService{
logger: &logger,
gatewaySelector: gatewaySelector,
identityCache: identity.NewIdentityCache(identity.IdentityCacheWithGatewaySelector(gatewaySelector)),
config: cfg,
}
}
// raceTestShares returns one user share per resource, all distinct resources so
// that every share becomes its own unit of work.
func raceTestShares() []*collaboration.Share {
editorResourcePermissions := conversions.NewEditorRole().CS3ResourcePermissions()
shares := make([]*collaboration.Share, 0, numRaceTestResources)
for i := 0; i < numRaceTestResources; i++ {
shares = append(shares, &collaboration.Share{
Id: &collaboration.ShareId{OpaqueId: fmt.Sprintf("share-id-%d", i)},
ResourceId: &storageprovider.ResourceId{
StorageId: "storageid",
SpaceId: "spaceid",
OpaqueId: fmt.Sprintf("opaqueid-%d", i),
},
Grantee: &storageprovider.Grantee{
Type: storageprovider.GranteeType_GRANTEE_TYPE_USER,
Id: &storageprovider.Grantee_UserId{
UserId: &userpb.UserId{OpaqueId: "user-id"},
},
},
Permissions: &collaboration.SharePermissions{Permissions: editorResourcePermissions},
})
}
return shares
}
// TestCS3UserSharesToDriveItemsConcurrentMapAccess reproduces OCISDEV-1088: the
// errgroup workers read the driveItems map while the collecting loop writes to
// it, which makes the Go runtime abort the process with
// "fatal error: concurrent map read and map write".
//
// Run with -race to catch it deterministically.
func TestCS3UserSharesToDriveItemsConcurrentMapAccess(t *testing.T) {
// A non-empty map is required: the workers only read the map when looking
// for an already known drive item, and an empty map read is not enough for
// the race detector to flag a conflicting access pattern on every run.
driveItems := make(driveItemsByResourceID, numRaceTestResources)
for i := 0; i < numRaceTestResources; i++ {
driveItems[fmt.Sprintf("storageid$spaceid!seed-%d", i)] = libregraph.DriveItem{}
}
g := newRaceTestService(t, defaults.FullDefaultConfig().MaxConcurrency)
items, err := g.cs3UserSharesToDriveItems(context.Background(), raceTestShares(), driveItems)
require.NoError(t, err)
require.Len(t, items, numRaceTestResources+numRaceTestResources)
}
// TestCS3UserSharesToDriveItemsConcurrentMapAccessMaxConcurrencyOne covers the
// single worker path.
//
// This case exists because lowering OCIS_MAX_CONCURRENCY /
// GRAPH_MAX_CONCURRENCY to 1 looks like an obvious operational workaround for
// OCISDEV-1088, but it never was one: even with a single worker the map was
// still read concurrently with the collecting loop, because the results channel
// is buffered and the worker never blocks handing off an item. Before the fix
// this test failed under -race exactly like the one above.
func TestCS3UserSharesToDriveItemsConcurrentMapAccessMaxConcurrencyOne(t *testing.T) {
driveItems := make(driveItemsByResourceID, numRaceTestResources)
for i := 0; i < numRaceTestResources; i++ {
driveItems[fmt.Sprintf("storageid$spaceid!seed-%d", i)] = libregraph.DriveItem{}
}
g := newRaceTestService(t, 1)
items, err := g.cs3UserSharesToDriveItems(context.Background(), raceTestShares(), driveItems)
require.NoError(t, err)
require.Len(t, items, numRaceTestResources+numRaceTestResources)
}
+47 -2
View File
@@ -58,8 +58,34 @@ var (
// ErrForbiddenCharacter is thrown when the spacename contains an invalid character
ErrForbiddenCharacter = fmt.Errorf("spacenames must not contain %v", _invalidSpaceNameCharacters)
errSpaceImageTooLarge = errors.New("space image is too large")
)
func (g Graph) checkSpaceImageFileSize(ctx context.Context, gatewayClient gateway.GatewayAPIClient, fileID string) error {
if g.maxImageFileSize == 0 {
return nil
}
resourceID, err := storagespace.ParseID(fileID)
if err != nil {
return errorcode.New(errorcode.InvalidRequest, fmt.Sprintf("invalid space image id: %v", err))
}
statResponse, err := gatewayClient.Stat(ctx, &storageprovider.StatRequest{
Ref: &storageprovider.Reference{ResourceId: &resourceID},
})
if err := errorcode.FromStat(statResponse, err); err != nil {
return err
}
if size := statResponse.GetInfo().GetSize(); size > g.maxImageFileSize {
return fmt.Errorf("%w: %d bytes exceeds the maximum of %d bytes", errSpaceImageTooLarge, size, g.maxImageFileSize)
}
return nil
}
// GetDrives serves as a factory method that returns the appropriate
// http.Handler function based on the specified API version.
func (g Graph) GetDrives(version APIVersion) http.HandlerFunc {
@@ -560,9 +586,28 @@ func (g Graph) updateDrive(w http.ResponseWriter, r *http.Request, apiVersion AP
}
for _, special := range drive.Special {
if special.Id != nil {
updateSpaceRequest.StorageSpace.Opaque = utils.AppendPlainToOpaque(updateSpaceRequest.StorageSpace.Opaque, *special.SpecialFolder.Name, *special.Id)
if special.Id == nil {
continue
}
// A space image which exceeds the thumbnailer's maximum input file size
// can be stored but never rendered, and the web UI has no raw-download
// fallback, so it would silently stay invisible. Reject it here instead.
if special.SpecialFolder.GetName() == SpaceImageSpecialFolderName {
if err := g.checkSpaceImageFileSize(r.Context(), gatewayClient, *special.Id); err != nil {
logger.Debug().Err(err).Str("fileID", *special.Id).Msg("could not update drive: space image rejected")
if errors.Is(err, errSpaceImageTooLarge) {
// errorcode.InvalidRequest renders as 400 by default, but the
// specific problem here is the size of the payload.
errorcode.InvalidRequest.Render(w, r, http.StatusRequestEntityTooLarge, err.Error())
return
}
errorcode.RenderError(w, r, err)
return
}
}
updateSpaceRequest.StorageSpace.Opaque = utils.AppendPlainToOpaque(updateSpaceRequest.StorageSpace.Opaque, *special.SpecialFolder.Name, *special.Id)
}
if _, ok := drive.GetNameOk(); ok {
+1
View File
@@ -68,6 +68,7 @@ type Graph struct {
keycloakClient keycloak.Client
historyClient ehsvc.EventHistoryService
traceProvider trace.TracerProvider
maxImageFileSize uint64
}
// ServeHTTP implements the Service interface.
+140
View File
@@ -92,6 +92,16 @@ var _ = Describe("Graph", func() {
It("returns a service", func() {
Expect(svc).ToNot(BeNil())
})
It("fails when the maximum image file size is not parseable", func() {
cfg.Validation.MaxImageFileSize = "notasize"
_, err := service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
)
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("max_image_file_size"))
})
})
Describe("Drives", func() {
@@ -1203,6 +1213,136 @@ var _ = Describe("Graph", func() {
return req.StorageSpace.Id.OpaqueId == "spaceid" && req.StorageSpace.Quota.QuotaMaxBytes == uint64(1000)
}))
})
Describe("setting the space image", func() {
var (
imageFileID = "spaceid$spaceid!imageid"
spaceImageUpdate = func() []byte {
drive := libregraph.NewDrive("thename")
drive.SetSpecial([]libregraph.DriveItem{{
Id: &imageFileID,
SpecialFolder: &libregraph.SpecialFolder{Name: libregraph.PtrString("image")},
}})
driveJson, err := json.Marshal(drive)
Expect(err).ToNot(HaveOccurred())
return driveJson
}
patchDrive = func(body []byte) {
r := httptest.NewRequest(http.MethodPatch, "/graph/v1.0/drives/{driveID}/", bytes.NewBuffer(body))
rctx := chi.NewRouteContext()
rctx.URLParams.Add("driveID", "spaceid")
r = r.WithContext(context.WithValue(revactx.ContextSetUser(ctx, currentUser), chi.RouteCtxKey, rctx))
svc.UpdateDrive(rr, r)
}
onStatReturnSize = func(size uint64) {
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(&provider.StatResponse{
Status: status.NewOK(ctx),
Info: &provider.ResourceInfo{Size: size},
}, nil)
}
onUpdateStorageSpaceOK = func() {
gatewayClient.On("UpdateStorageSpace", mock.Anything, mock.Anything).Return(func(_ context.Context, req *provider.UpdateStorageSpaceRequest, _ ...grpc.CallOption) *provider.UpdateStorageSpaceResponse {
return &provider.UpdateStorageSpaceResponse{
Status: status.NewOK(ctx),
StorageSpace: req.StorageSpace,
}
}, nil)
gatewayClient.On("GetPath", mock.Anything, mock.Anything).Return(&provider.GetPathResponse{
Status: status.NewOK(ctx),
Path: "/.space/image.png",
}, nil)
}
expectStoredSpecial = func(name, fileID string) {
gatewayClient.AssertCalled(GinkgoT(), "UpdateStorageSpace", mock.Anything, mock.MatchedBy(func(req *provider.UpdateStorageSpaceRequest) bool {
return utils.ReadPlainFromOpaque(req.StorageSpace.Opaque, name) == fileID
}))
}
)
setMaxImageFileSize := func(size string) {
cfg.Validation.MaxImageFileSize = size
var err error
svc, err = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
service.EventsPublisher(&eventsPublisher),
service.PermissionService(&permissionService),
)
Expect(err).ToNot(HaveOccurred())
}
BeforeEach(func() {
setMaxImageFileSize("1KB")
})
It("rejects an image larger than the configured maximum and stores nothing", func() {
onUpdateStorageSpaceOK()
onStatReturnSize(2048)
patchDrive(spaceImageUpdate())
Expect(rr.Code).To(Equal(http.StatusRequestEntityTooLarge))
gatewayClient.AssertNotCalled(GinkgoT(), "UpdateStorageSpace", mock.Anything, mock.Anything)
})
It("accepts an image of exactly the configured maximum", func() {
onUpdateStorageSpaceOK()
onStatReturnSize(1000) // 1KB, as bytesize uses decimal units
patchDrive(spaceImageUpdate())
Expect(rr.Code).To(Equal(http.StatusOK))
expectStoredSpecial("image", imageFileID)
})
It("accepts any size when the maximum is set to zero", func() {
setMaxImageFileSize("0")
onUpdateStorageSpaceOK()
onStatReturnSize(100 * 1024 * 1024)
patchDrive(spaceImageUpdate())
Expect(rr.Code).To(Equal(http.StatusOK))
expectStoredSpecial("image", imageFileID)
})
It("does not store the image when the size could not be determined", func() {
onUpdateStorageSpaceOK()
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(&provider.StatResponse{
Status: status.NewInternal(ctx, "stat failed"),
}, nil)
patchDrive(spaceImageUpdate())
Expect(rr.Code).ToNot(Equal(http.StatusOK))
Expect(rr.Code).ToNot(Equal(http.StatusRequestEntityTooLarge))
gatewayClient.AssertNotCalled(GinkgoT(), "UpdateStorageSpace", mock.Anything, mock.Anything)
})
It("does not restrict the size of the space readme", func() {
onUpdateStorageSpaceOK()
onStatReturnSize(100 * 1024 * 1024)
readmeFileID := "spaceid$spaceid!readmeid"
drive := libregraph.NewDrive("thename")
drive.SetSpecial([]libregraph.DriveItem{{
Id: &readmeFileID,
SpecialFolder: &libregraph.SpecialFolder{Name: libregraph.PtrString("readme")},
}})
driveJson, err := json.Marshal(drive)
Expect(err).ToNot(HaveOccurred())
patchDrive(driveJson)
Expect(rr.Code).To(Equal(http.StatusOK))
expectStoredSpecial("readme", readmeFileID)
})
})
})
Describe("Delete a drive", func() {
+4
View File
@@ -262,6 +262,10 @@ func (g Graph) GetGroup(w http.ResponseWriter, r *http.Request) {
return
}
if !g.contextUserHasFullAccountPerms(r.Context()) {
group.Members = nil
}
render.Status(r, http.StatusOK)
render.JSON(w, r, group)
}
@@ -303,6 +303,12 @@ var _ = Describe("Groups", func() {
Context("with an existing group", func() {
BeforeEach(func() {
permissionService.On("GetPermissionByID", mock.Anything, mock.Anything).Return(&settings.GetPermissionByIDResponse{
Permission: &settingsmsg.Permission{
Operation: settingsmsg.Permission_OPERATION_UNKNOWN,
Constraint: settingsmsg.Permission_CONSTRAINT_ALL,
},
}, nil)
identityBackend.On("GetGroup", mock.Anything, mock.Anything, mock.Anything).Return(newGroup, nil)
})
@@ -317,6 +323,76 @@ var _ = Describe("Groups", func() {
Expect(rr.Code).To(Equal(http.StatusOK))
})
})
It("does not leak group members to unprivileged users", func() {
permissionService.On("GetPermissionByID", mock.Anything, mock.Anything).Return(&settings.GetPermissionByIDResponse{}, nil)
group := &libregraph.Group{}
group.SetId("group1")
group.SetDisplayName("Group Name")
group.SetMembers(
[]libregraph.User{
{
Id: libregraph.PtrString("userid"),
},
},
)
identityBackend.On("GetGroup", mock.Anything, mock.Anything, mock.Anything).Return(group, nil)
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/groups/group1?$expand=members", nil)
rctx := chi.NewRouteContext()
rctx.URLParams.Add("groupID", "group1")
r = r.WithContext(context.WithValue(revactx.ContextSetUser(ctx, nil), chi.RouteCtxKey, rctx))
svc.GetGroup(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
data, err := io.ReadAll(rr.Body)
Expect(err).ToNot(HaveOccurred())
respGroup := libregraph.Group{}
err = json.Unmarshal(data, &respGroup)
Expect(err).ToNot(HaveOccurred())
Expect(respGroup.Members).To(BeEmpty())
})
It("returns group members to privileged users", func() {
permissionService.On("GetPermissionByID", mock.Anything, mock.Anything).Return(&settings.GetPermissionByIDResponse{
Permission: &settingsmsg.Permission{
Operation: settingsmsg.Permission_OPERATION_UNKNOWN,
Constraint: settingsmsg.Permission_CONSTRAINT_ALL,
},
}, nil)
group := &libregraph.Group{}
group.SetId("group1")
group.SetDisplayName("Group Name")
group.SetMembers(
[]libregraph.User{
{
Id: libregraph.PtrString("userid"),
},
},
)
identityBackend.On("GetGroup", mock.Anything, mock.Anything, mock.Anything).Return(group, nil)
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/groups/group1?$expand=members", nil)
rctx := chi.NewRouteContext()
rctx.URLParams.Add("groupID", "group1")
r = r.WithContext(context.WithValue(revactx.ContextSetUser(ctx, nil), chi.RouteCtxKey, rctx))
svc.GetGroup(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
data, err := io.ReadAll(rr.Body)
Expect(err).ToNot(HaveOccurred())
respGroup := libregraph.Group{}
err = json.Unmarshal(data, &respGroup)
Expect(err).ToNot(HaveOccurred())
Expect(respGroup.Members).To(HaveLen(1))
Expect(respGroup.Members[0].GetId()).To(Equal("userid"))
})
})
Describe("PostGroup", func() {
+26 -43
View File
@@ -2,12 +2,9 @@ package svc
import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"net/http"
"os"
"strconv"
"time"
@@ -18,6 +15,7 @@ import (
microstore "go-micro.dev/v4/store"
"github.com/owncloud/reva/v2/pkg/autoprop"
"github.com/owncloud/reva/v2/pkg/bytesize"
"github.com/owncloud/reva/v2/pkg/events"
"github.com/owncloud/reva/v2/pkg/rgrpc/todo/pool"
"github.com/owncloud/reva/v2/pkg/store"
@@ -31,7 +29,6 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
"github.com/owncloud/ocis/v2/services/graph/pkg/identity"
"github.com/owncloud/ocis/v2/services/graph/pkg/identity/ldap"
graphmw "github.com/owncloud/ocis/v2/services/graph/pkg/middleware"
)
@@ -168,6 +165,14 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx
valueService: options.ValueService,
}
if raw := options.Config.Validation.MaxImageFileSize; raw != "" {
maxImageFileSize, err := bytesize.Parse(raw)
if err != nil {
return svc, fmt.Errorf("could not parse validation.max_image_file_size %q: %w", raw, err)
}
svc.maxImageFileSize = maxImageFileSize.Bytes()
}
if err := setIdentityBackends(options, &svc); err != nil {
return svc, err
}
@@ -451,53 +456,31 @@ func setIdentityBackends(options Options, svc *Graph) error {
GatewaySelector: gatewaySelector,
}
case "ldap":
var err error
var tlsConf *tls.Config
if options.Config.Identity.LDAP.Insecure {
// When insecure is set to true then we don't need a certificate.
options.Config.Identity.LDAP.CACert = ""
tlsConf = &tls.Config{
MinVersion: tls.VersionTLS12,
//nolint:gosec // We need the ability to run with "insecure" (dev/testing)
InsecureSkipVerify: options.Config.Identity.LDAP.Insecure,
}
}
if options.Config.Identity.LDAP.CACert != "" {
if err := ocisldap.WaitForCA(options.Logger,
options.Config.Identity.LDAP.Insecure,
options.Config.Identity.LDAP.CACert); err != nil {
options.Logger.Fatal().Err(err).Msg("The configured LDAP CA cert does not exist")
}
if tlsConf == nil {
tlsConf = &tls.Config{
MinVersion: tls.VersionTLS12,
}
}
certs := x509.NewCertPool()
pemData, err := os.ReadFile(options.Config.Identity.LDAP.CACert)
if err != nil {
options.Logger.Error().Err(err).Msg("Error initializing LDAP Backend")
return err
}
if !certs.AppendCertsFromPEM(pemData) {
options.Logger.Error().Msg("Error initializing LDAP Backend. Adding CA cert failed")
return err
}
tlsConf.RootCAs = certs
}
conn := ldap.NewLDAPWithReconnect(&options.Logger,
ldap.Config{
URI: options.Config.Identity.LDAP.URI,
BindDN: options.Config.Identity.LDAP.BindDN,
BindPassword: options.Config.Identity.LDAP.BindPassword,
TLSConfig: tlsConf,
},
)
conn, err := utils.GetLDAPClientFromConfig(&utils.LDAPConn{
URI: options.Config.Identity.LDAP.URI,
Insecure: options.Config.Identity.LDAP.Insecure,
CACert: options.Config.Identity.LDAP.CACert,
BindDN: options.Config.Identity.LDAP.BindDN,
BindPassword: options.Config.Identity.LDAP.BindPassword,
RetryMaxCount: options.Config.Identity.LDAP.RetryMaxCount,
RetryBaseDelay: options.Config.Identity.LDAP.RetryBaseDelay,
RetryMaxDelay: options.Config.Identity.LDAP.RetryMaxDelay,
PoolEnabled: options.Config.Identity.LDAP.PoolEnabled,
PoolSize: options.Config.Identity.LDAP.PoolSize,
PoolCheckoutTimeout: options.Config.Identity.LDAP.PoolCheckoutTimeout,
})
if err != nil {
options.Logger.Error().Err(err).Msg("Error initializing LDAP Backend")
return err
}
var iid, masterID string
if options.Config.MultiInstance.Enabled {
iid = options.Config.MultiInstance.InstanceID
+16 -16
View File
@@ -62,22 +62,22 @@ func (g Graph) GetMe(w http.ResponseWriter, r *http.Request) {
return
}
var me *libregraph.User
// We can just return the user from context unless we need to expand the group memberships
if !slices.Contains(exp, "memberOf") {
me = identity.CreateUserModelFromCS3(u)
} else {
var err error
logger.Debug().Msg("calling get user on backend")
me, err = g.identityBackend.GetUser(r.Context(), u.GetId().GetOpaqueId(), odataReq)
if err != nil {
logger.Debug().Err(err).Interface("user", u).Msg("could not get user from backend")
errorcode.RenderError(w, r, err)
return
}
if me.MemberOf == nil {
me.MemberOf = []libregraph.Group{}
}
// Always resolve the user through the identity backend. The CS3 user from
// the request context does not carry the issuer-assigned identity (OIDC
// sub), so building the model from it (CreateUserModelFromCS3) would report
// the internal user UUID as identities[].issuerAssignedId. The backend reads
// the stored external identity and returns the correct value. Group
// memberships are only expanded (and thus only queried) when $expand=memberOf
// is requested, so the extra cost here is a single user lookup.
logger.Debug().Msg("calling get user on backend")
me, err := g.identityBackend.GetUser(r.Context(), u.GetId().GetOpaqueId(), odataReq)
if err != nil {
logger.Debug().Err(err).Interface("user", u).Msg("could not get user from backend")
errorcode.RenderError(w, r, err)
return
}
if slices.Contains(exp, "memberOf") && me.MemberOf == nil {
me.MemberOf = []libregraph.Group{}
}
// expand appRoleAssignments if requested
@@ -115,6 +115,16 @@ var _ = Describe("Users", func() {
})
It("gets the information", func() {
user := &libregraph.User{
Id: libregraph.PtrString("user"),
Identities: []libregraph.ObjectIdentity{
{
Issuer: libregraph.PtrString("https://idp.example.com"),
IssuerAssignedId: libregraph.PtrString("the-oidc-sub"),
},
},
}
identityBackend.On("GetUser", mock.Anything, mock.Anything, mock.Anything).Return(user, nil)
valueService.On("GetValueByUniqueIdentifiers", mock.Anything, mock.Anything, mock.Anything).
Return(&settings.GetValueResponse{
Value: &settingsmsg.ValueWithIdentifier{
@@ -139,6 +149,19 @@ var _ = Describe("Users", func() {
svc.GetMe(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
data, err := io.ReadAll(rr.Body)
Expect(err).ToNot(HaveOccurred())
responseUser := &libregraph.User{}
err = json.Unmarshal(data, &responseUser)
Expect(err).ToNot(HaveOccurred())
// The identity (issuerAssignedId, the OIDC sub) must come from the
// backend, not be fabricated from the internal user UUID. See
// OCISDEV-751.
Expect(responseUser.GetIdentities()).To(HaveLen(1))
Expect(responseUser.GetIdentities()[0].GetIssuerAssignedId()).To(Equal("the-oidc-sub"))
})
It("expands the memberOf", func() {
@@ -193,6 +216,10 @@ var _ = Describe("Users", func() {
RoleId: "some-appRole-ID",
},
}
user := &libregraph.User{
Id: libregraph.PtrString("user"),
}
identityBackend.On("GetUser", mock.Anything, mock.Anything, mock.Anything).Return(user, nil)
roleService.On("ListRoleAssignments", mock.Anything, mock.Anything, mock.Anything).Return(&settings.ListRoleAssignmentsResponse{Assignments: assignments}, nil)
valueService.On("GetValueByUniqueIdentifiers", mock.Anything, mock.Anything, mock.Anything).
Return(&settings.GetValueResponse{
+8
View File
@@ -2,6 +2,7 @@ package config
import (
"context"
"time"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
)
@@ -65,6 +66,9 @@ type LDAPDriver struct {
Insecure bool `yaml:"insecure" env:"OCIS_LDAP_INSECURE;GROUPS_LDAP_INSECURE" desc:"Disable TLS certificate validation for the LDAP connections. Do not set this in production environments." introductionVersion:"pre5.0"`
BindDN string `yaml:"bind_dn" env:"OCIS_LDAP_BIND_DN;GROUPS_LDAP_BIND_DN" desc:"LDAP DN to use for simple bind authentication with the target LDAP server." introductionVersion:"pre5.0"`
BindPassword string `yaml:"bind_password" env:"OCIS_LDAP_BIND_PASSWORD;GROUPS_LDAP_BIND_PASSWORD" desc:"Password to use for authenticating the 'bind_dn'." introductionVersion:"pre5.0"`
RetryMaxCount int `yaml:"retry_max_count" env:"OCIS_LDAP_RETRY_MAX_COUNT;GROUPS_LDAP_RETRY_MAX_COUNT" desc:"Maximum number of retries for failed LDAP operations. Applies to both read and write operations (with different retryable error sets). Default 1." introductionVersion:"8.2.0"`
RetryBaseDelay time.Duration `yaml:"retry_base_delay" env:"OCIS_LDAP_RETRY_BASE_DELAY;GROUPS_LDAP_RETRY_BASE_DELAY" desc:"Base delay for exponential backoff between LDAP retries (e.g. '100ms'). Set to 0 to disable backoff." introductionVersion:"8.2.0"`
RetryMaxDelay time.Duration `yaml:"retry_max_delay" env:"OCIS_LDAP_RETRY_MAX_DELAY;GROUPS_LDAP_RETRY_MAX_DELAY" desc:"Maximum delay cap for exponential backoff between LDAP retries (e.g. '5s'). 0 (default) uses the library default cap of 60s." introductionVersion:"8.2.0"`
UserBaseDN string `yaml:"user_base_dn" env:"OCIS_LDAP_USER_BASE_DN;GROUPS_LDAP_USER_BASE_DN" desc:"Search base DN for looking up LDAP users." introductionVersion:"pre5.0"`
GroupBaseDN string `yaml:"group_base_dn" env:"OCIS_LDAP_GROUP_BASE_DN;GROUPS_LDAP_GROUP_BASE_DN" desc:"Search base DN for looking up LDAP groups." introductionVersion:"pre5.0"`
UserScope string `yaml:"user_scope" env:"OCIS_LDAP_USER_SCOPE;GROUPS_LDAP_USER_SCOPE" desc:"LDAP search scope to use when looking up users. Supported scopes are 'base', 'one' and 'sub'." introductionVersion:"pre5.0"`
@@ -80,6 +84,10 @@ type LDAPDriver struct {
UserGuestAttribute string `yaml:"user_guest_attribute" env:"OCIS_LDAP_USER_GUEST_ATTRIBUTE" desc:"LDAP attribute that marks a user as a guest of an instance." introductionVersion:"7.0"`
UserSchema LDAPUserSchema `yaml:"user_schema"`
GroupSchema LDAPGroupSchema `yaml:"group_schema"`
PoolEnabled bool `yaml:"pool_enabled" env:"OCIS_LDAP_POOL_ENABLED;GROUPS_LDAP_POOL_ENABLED" desc:"Enable a bounded pool of LDAP connections instead of a single long-lived reconnecting connection. Concurrent requests then no longer serialize on one connection." introductionVersion:"8.2.0"`
PoolSize int `yaml:"pool_size" env:"OCIS_LDAP_POOL_SIZE;GROUPS_LDAP_POOL_SIZE" desc:"Maximum number of concurrently open LDAP connections when 'OCIS_LDAP_POOL_ENABLED' is 'true'. Defaults to 5 when unset or <= 0." introductionVersion:"8.2.0"`
PoolCheckoutTimeout time.Duration `yaml:"pool_checkout_timeout" env:"OCIS_LDAP_POOL_CHECKOUT_TIMEOUT;GROUPS_LDAP_POOL_CHECKOUT_TIMEOUT" desc:"Maximum time to wait for a pooled LDAP connection to become available once the pool is exhausted. Defaults to 30s when unset or <= 0. See the Environment Variable Types description for more details." introductionVersion:"8.2.0"`
}
type LDAPUserSchema struct {
@@ -2,6 +2,7 @@ package defaults
import (
"path/filepath"
"time"
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
ocisldap "github.com/owncloud/ocis/v2/ocis-pkg/ldap"
@@ -52,7 +53,11 @@ func DefaultConfig() *config.Config {
UserObjectClass: "inetOrgPerson",
GroupObjectClass: "groupOfNames",
BindDN: "uid=reva,ou=sysusers,o=libregraph-idm",
RetryMaxCount: 1,
IDP: "https://localhost:9200",
PoolEnabled: false,
PoolSize: 5,
PoolCheckoutTimeout: 30 * time.Second,
UserSchema: config.LDAPUserSchema{
ID: "ownclouduuid",
Mail: "mail",
+6
View File
@@ -68,6 +68,9 @@ func ldapConfigFromString(cfg config.LDAPDriver) map[string]interface{} {
"insecure": cfg.Insecure,
"bind_username": cfg.BindDN,
"bind_password": cfg.BindPassword,
"retry_max_count": cfg.RetryMaxCount,
"retry_base_delay": cfg.RetryBaseDelay,
"retry_max_delay": cfg.RetryMaxDelay,
"user_base_dn": cfg.UserBaseDN,
"group_base_dn": cfg.GroupBaseDN,
"user_scope": cfg.UserScope,
@@ -78,6 +81,9 @@ func ldapConfigFromString(cfg config.LDAPDriver) map[string]interface{} {
"user_objectclass": cfg.UserObjectClass,
"group_objectclass": cfg.GroupObjectClass,
"idp": cfg.IDP,
"pool_enabled": cfg.PoolEnabled,
"pool_size": cfg.PoolSize,
"pool_checkout_timeout": cfg.PoolCheckoutTimeout,
"user_schema": map[string]interface{}{
"id": cfg.UserSchema.ID,
"idIsOctetString": cfg.UserSchema.IDIsOctetString,
@@ -14,16 +14,16 @@
<div class="oc-login-form" id="chooseaccount-root">
<img class="oc-logo" src="{{.LogoURL}}" alt="ownCloud">
<h1 class="oc-invisible-sr">{{.Headline}}</h1>
<p id="oc-chooseaccount-error" class="oc-error-message" hidden></p>
<p id="oc-chooseaccount-error" class="oc-error-message" role="alert" aria-live="assertive" hidden></p>
<div id="chooseaccount-body" hidden>
<p class="oc-light oc-consent-headline" id="chooseaccount-title">{{.HeadlineSub}}</p>
<ul class="oc-consent-scopes" id="account-list">
<li class="oc-chooseaccount-item" id="item-current">
<span class="oc-chooseaccount-avatar" id="avatar-current"></span>
<li class="oc-chooseaccount-item" id="item-current" role="button" tabindex="0">
<span class="oc-chooseaccount-avatar" id="avatar-current" aria-hidden="true"></span>
<span class="oc-light oc-chooseaccount-label" id="label-current"></span>
</li>
<li class="oc-chooseaccount-item" id="item-other">
<span class="oc-chooseaccount-avatar">?</span>
<li class="oc-chooseaccount-item" id="item-other" role="button" tabindex="0">
<span class="oc-chooseaccount-avatar" aria-hidden="true">?</span>
<span class="oc-light oc-chooseaccount-label">{{.UseAnotherLabel}}</span>
</li>
</ul>
@@ -77,6 +77,15 @@
catch (_) { return false; }
}
function onKeyActivate(el, handler) {
el.addEventListener("keydown", function(e) {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
handler();
}
});
}
var helloReq = {
state: qs("state"),
flow: qs("flow") || "oidc",
@@ -106,7 +115,7 @@
bodyEl.hidden = false;
// "Continue as current user" — mode=0 logon (cookie re-auth, no password)
itemCurrent.addEventListener("click", function() {
function activateCurrent() {
itemCurrent.style.opacity = "0.5";
itemOther.style.pointerEvents = "none";
fetchApi("/_/logon", { state: helloReq.state, params: [data.username, "", "0"], hello: helloReq })
@@ -133,14 +142,16 @@
resetSignInState();
})
.catch(resetSignInState);
});
}
itemCurrent.addEventListener("click", activateCurrent);
onKeyActivate(itemCurrent, activateCurrent);
})
.catch(function() {
window.location.href = pathPrefix + '/identifier' + window.location.search;
});
// "Use another account" — invalidate current session then go to login form
itemOther.addEventListener("click", function() {
function activateOther() {
var loginParams = new URLSearchParams(window.location.search);
loginParams.set("prompt", "login");
loginParams.delete("flow");
@@ -148,7 +159,9 @@
fetchApi("/_/logoff", { state: helloReq.state }).then(function() {
window.location.href = target;
});
});
}
itemOther.addEventListener("click", activateOther);
onKeyActivate(itemOther, activateOther);
})();
</script>
</body>
+5 -2
View File
@@ -14,7 +14,7 @@
<div class="oc-login-form" id="consent-root">
<img class="oc-logo" src="{{.LogoURL}}" alt="ownCloud">
<h1 class="oc-invisible-sr">{{.Headline}}</h1>
<p id="oc-consent-error-message" class="oc-error-message" hidden></p>
<p id="oc-consent-error-message" class="oc-error-message" role="alert" aria-live="assertive" hidden></p>
<div id="consent-body" hidden>
<p id="consent-display-name" class="oc-light oc-consent-headline"></p>
<p id="consent-username" class="oc-light oc-consent-username"></p>
@@ -127,13 +127,16 @@
if (!desc) desc = "Scope: " + scope;
var li = document.createElement("li");
li.className = "oc-consent-scope-item";
var scopeId = "consent-scope-" + alias;
var cb = document.createElement("input");
cb.type = "checkbox";
cb.id = scopeId;
cb.checked = true;
cb.disabled = true;
cb.className = "oc-consent-checkbox";
var label = document.createElement("span");
var label = document.createElement("label");
label.className = "oc-light";
label.setAttribute("for", scopeId);
label.textContent = desc;
li.appendChild(cb);
li.appendChild(label);
+1 -1
View File
@@ -14,8 +14,8 @@
<img class="oc-logo" src="{{.LogoURL}}" alt="ownCloud">
<h1 class="oc-invisible-sr">{{.Headline}}</h1>
<p class="oc-message">{{.Message}}</p>
<footer class="oc-footer-message">ownCloud - a safe home for all your data</footer>
</div>
</main>
<footer class="oc-footer-message">ownCloud - a safe home for all your data</footer>
</body>
</html>
+7 -3
View File
@@ -23,12 +23,12 @@
data-msg-sign-in="{{.ButtonSignIn}}">
<div>
<label class="oc-label" for="oc-login-username">{{.LabelUsername}}</label>
<input class="oc-input" type="text" id="oc-login-username" name="username" autocomplete="username" placeholder="{{.LabelUsername}}" required>
<input class="oc-input" type="text" id="oc-login-username" name="username" autocomplete="username" placeholder="{{.LabelUsername}}" aria-describedby="oc-login-error-message" required>
</div>
<div>
<label class="oc-label" for="oc-login-password">{{.LabelPassword}}</label>
<input class="oc-input" type="password" id="oc-login-password" name="password" autocomplete="current-password" placeholder="{{.LabelPassword}}" required>
<p id="oc-login-error-message" class="oc-error-message" hidden></p>
<input class="oc-input" type="password" id="oc-login-password" name="password" autocomplete="current-password" placeholder="{{.LabelPassword}}" aria-describedby="oc-login-error-message" required>
<p id="oc-login-error-message" class="oc-error-message" role="alert" aria-live="assertive" hidden></p>
</div>
<div>
<button class="oc-button-primary" type="submit" id="submit-btn">{{.ButtonSignIn}}</button>
@@ -103,12 +103,16 @@
errorEl.hidden = false;
usernameEl.classList.add("error");
passwordEl.classList.add("error");
usernameEl.setAttribute("aria-invalid", "true");
passwordEl.setAttribute("aria-invalid", "true");
}
function hideError() {
errorEl.hidden = true;
usernameEl.classList.remove("error");
passwordEl.classList.remove("error");
usernameEl.removeAttribute("aria-invalid");
passwordEl.removeAttribute("aria-invalid");
}
function setLoading(loading) {
@@ -297,10 +297,19 @@ main {
}
.oc-input:focus {
outline: none;
outline: 2px solid #00b3f0;
outline-offset: 1px;
border: 1px solid #fff;
}
.oc-chooseaccount-item:focus-visible,
.oc-button-primary:focus-visible,
.oc-button-cancel:focus-visible,
.oc-button-consent:focus-visible {
outline: 2px solid #00b3f0;
outline-offset: 2px;
}
.oc-button-primary {
display: block;
width: 100%;
+1 -1
View File
@@ -14,8 +14,8 @@
<img class="oc-logo" src="{{.LogoURL}}" alt="ownCloud">
<h1 class="oc-invisible-sr">{{.Headline}}</h1>
<p class="oc-message">{{.Message}}</p>
<footer class="oc-footer-message">ownCloud - a safe home for all your data</footer>
</div>
</main>
<footer class="oc-footer-message">ownCloud - a safe home for all your data</footer>
</body>
</html>
Loaded 100 of 888 files, more files were not shown because too many files have changed in this diff. Show more