Compare commits
52
Commits
master
...
fix/changelog
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52f292c79d | ||
|
|
6d1d0590e2 | ||
|
|
5a23c88296 | ||
|
|
ebda376ae1 | ||
|
|
1a32e4d8c5 | ||
|
|
1cfce945bb | ||
|
|
5d4f19a9c4 | ||
|
|
d6bc1e2400 | ||
|
|
8afeec9c5b | ||
|
|
0450a0d6aa | ||
|
|
91f0671153 | ||
|
|
898f89c697 | ||
|
|
b708076e67 | ||
|
|
8dc7afc07c | ||
|
|
7dcc74c3dd | ||
|
|
e70497b49c | ||
|
|
b395d08db6 | ||
|
|
1d16dd9e1e | ||
|
|
86fa96362a | ||
|
|
f005d68eae | ||
|
|
d68b53c6d8 | ||
|
|
f8b861c723 | ||
|
|
8b675b2e51 | ||
|
|
9f72d77bfc | ||
|
|
30009ff770 | ||
|
|
50141f471b | ||
|
|
d65f3fc215 | ||
|
|
1256793012 | ||
|
|
6adfdf52e1 | ||
|
|
cdcabdb527 | ||
|
|
2f70a6856f | ||
|
|
eb06e23a09 | ||
|
|
604cb5a069 | ||
|
|
6361b52b7f | ||
|
|
5e7ce5c7de | ||
|
|
63b0cdda0e | ||
|
|
31ccffa99c | ||
|
|
5f1dbeca53 | ||
|
|
5eb6366a6c | ||
|
|
53fa0f0691 | ||
|
|
c3a6f52502 | ||
|
|
2ed2f8697b | ||
|
|
7c87568713 | ||
|
|
b265241288 | ||
|
|
7b284878f5 | ||
|
|
c20900419e | ||
|
|
bfda167e31 | ||
|
|
77560da057 | ||
|
|
ad9ccdc93b | ||
|
|
5bf887a570 | ||
|
|
fa077e7eeb | ||
|
|
382d95a3eb |
No files matched your search
@@ -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
|
||||
@@ -217,6 +217,7 @@ jobs:
|
||||
- apiOcm
|
||||
# collaboration (needs WOPI)
|
||||
- apiCollaboration
|
||||
- apiVault
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -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
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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=
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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
Reference in new issue
Block a user