Compare commits

...
52 Commits
Author SHA1 Message Date
Roman Perekhod 52f292c79d Merge branch 'master' into fix/changelog 2026-08-03 09:56:52 +02: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
Roman Perekhod 6adfdf52e1 chore: fix the changelog for the 8.1.0 2026-07-21 18:06:40 +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
470 changed files with 14790 additions and 5147 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
+1
View File
@@ -217,6 +217,7 @@ jobs:
- apiOcm
# collaboration (needs WOPI)
- apiCollaboration
- apiVault
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -1,4 +1,4 @@
Bugfix: Do not disable personal space on inconclusive permission check
Bugfix: Keep personal space when Drives.Create permission check is inconclusive
When a user's role is (re-)assigned, both the proxy (on OIDC login) and the graph
appRoleAssignment handler check the `Drives.Create` permission to decide whether to
@@ -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,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,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 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,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: 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
@@ -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,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,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
@@ -10,4 +10,4 @@ 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/12581
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"
+17 -17
View File
@@ -10,10 +10,10 @@ 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/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
@@ -21,10 +21,10 @@ require (
github.com/egirna/icap-client v0.1.1
github.com/gabriel-vasile/mimetype v1.4.13
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,7 +50,7 @@ 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
@@ -66,7 +66,7 @@ require (
github.com/open-policy-agent/opa v1.18.2
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-20260722181911-d084587fefc7
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.12
github.com/prometheus/client_golang v1.23.2
@@ -96,16 +96,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.82.1
google.golang.org/protobuf v1.36.11
gopkg.in/yaml.v2 v2.4.0
gotest.tools/v3 v3.5.2
@@ -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
@@ -341,10 +341,10 @@ require (
go.uber.org/zap v1.27.0 // 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
+34 -34
View File
@@ -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=
@@ -188,8 +188,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=
@@ -286,10 +286,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 +317,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=
@@ -597,8 +597,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=
@@ -739,8 +739,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-20260722181911-d084587fefc7 h1:VGWhUAYu3TYCmkvk5PNG2+rEH7VFR2uxny/ZQXaE71g=
github.com/owncloud/reva/v2 v2.0.0-20260722181911-d084587fefc7/go.mod h1:m2fGRZDsnNSBszbnwysuq7uhlitQ90+weX4FFQRdkak=
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=
@@ -1015,8 +1015,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 +1031,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 +1054,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 +1099,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 +1124,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 +1188,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 +1197,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 +1210,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 +1264,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 +1343,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.82.1 h1:NnAxzGRA0677vCa4BUkOAnO5+FfQqVl9iUXeD0IqcGE=
google.golang.org/grpc v1.82.1/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
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")))
}
@@ -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)
+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)
}
+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() {
Loaded 100 of 470 files, more files were not shown because too many files have changed in this diff. Show more