Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
215 commits
Select commit Hold shift + click to select a range
c4a7126
Add Stalwart container to the opencloud_full deployment, using the Op…
pbleser-oc Apr 16, 2025
d5d7b94
WIP: initial implementation of the groupware service
pbleser-oc Apr 16, 2025
fd1b4bb
add missing routing for /groupware (currently unprotected for testing)
pbleser-oc Apr 16, 2025
6b0e038
rename Stalwart fallback admin username from 'admin' to 'mailadmin' s…
pbleser-oc Apr 22, 2025
c082c0c
add an OIDC Directory to Stalwart, requires exposing Keycloak port 80…
pbleser-oc Apr 28, 2025
beb94a3
WIP: restructure the Jmap client, and implement the /me/messages Grap…
pbleser-oc May 2, 2025
17d28da
move services/groupware/pkg/jmap to pkg/jmap
pbleser-oc May 5, 2025
0709e74
add an auth-api service to make an exemplary implementation of an ext…
pbleser-oc May 7, 2025
bb54364
Introduce a the auth-api service
pbleser-oc May 12, 2025
abf397f
minor corrections to the Stalwart configuration
pbleser-oc May 22, 2025
354989d
upgrade Stalwart to 0.12
pbleser-oc May 26, 2025
8ad0708
groupware and jmap improvements and refactoring
pbleser-oc May 30, 2025
e35a61b
auth-api: fix: was missing newly introduced metrics
pbleser-oc May 30, 2025
4836722
jwkset: remove debugging printlns
pbleser-oc May 30, 2025
5f7b887
groupware: removed debugging logs
pbleser-oc May 30, 2025
a95326b
upgrade Stalwart to 0.12.4
pbleser-oc Jun 4, 2025
2b958f0
Use password policy overlay in LDAP and configure Stalwart to use it
pbleser-oc Jun 4, 2025
e9f834f
fix Stalwart LDAP configuration
pbleser-oc Jun 4, 2025
1517c3d
Groupware improvements: refactoring, k6 tests
pbleser-oc Jun 6, 2025
52e1672
opencloud_full: upgrade Stalwart to 0.12.5, and use the ghcr.io conta…
pbleser-oc Jul 1, 2025
9d6558a
groupware: remove unneeded messages.go that was a remainder from an e…
pbleser-oc Jul 1, 2025
26c2e7d
Groupware and jmap: cleanup and API documentation
pbleser-oc Jul 7, 2025
6959934
Refactor groupware service after ADR decision on the Groupware API
pbleser-oc Jul 25, 2025
1144e5e
groupware: implement JSON:API's error response format, with a revampe…
pbleser-oc Jul 28, 2025
264b26e
groupware: refactoring the API mechanisms
pbleser-oc Jul 29, 2025
4ce8776
refactored the Session object, refactored the services/groupware dire…
pbleser-oc Jul 30, 2025
f4a147b
upgrade Stalwart to 0.13.2
pbleser-oc Jul 30, 2025
44dd5f0
groupware: further implementation and improvements
pbleser-oc Jul 31, 2025
4982633
groupware: more JMAP operations implementation
pbleser-oc Aug 1, 2025
bc7a4a7
groupware: blob streaming (upload and download)
pbleser-oc Aug 4, 2025
7210b53
groupware: implement message search with snippets
pbleser-oc Aug 5, 2025
c3c67a8
Groupware: refactor jmap package, implement Email/set, EmailSubmission
pbleser-oc Aug 6, 2025
dc4e9e7
groupware: fix email search, add variant that includes the full emails
pbleser-oc Aug 7, 2025
73288f4
groupware: fix email search, add variant that includes the full emails
pbleser-oc Aug 7, 2025
3d8e5e1
groupware: add identities of all accounts to the index resource
pbleser-oc Aug 7, 2025
decb922
groupware: minor email searching response improvements + started impl…
pbleser-oc Aug 8, 2025
30aeeed
Groupware improvements
pbleser-oc Aug 11, 2025
3beebe3
groupware: swagger API documentation improvements
pbleser-oc Aug 12, 2025
2db4f77
groupware: add /bootstrap
pbleser-oc Aug 21, 2025
72cb0d4
groupware: initial related emails implementation with SSE
pbleser-oc Aug 22, 2025
b9121b5
groupware: Etag handling
pbleser-oc Aug 25, 2025
f9a0ddb
groupware: implement metrics
pbleser-oc Aug 26, 2025
36128a6
groupware: jmap: add metrics
pbleser-oc Aug 27, 2025
d81e15d
groupware: improve metrics
pbleser-oc Aug 27, 2025
80f9145
jmap: minor logging improvements
pbleser-oc Aug 28, 2025
7308ece
refactor(groupware): logging and metrics improvements
pbleser-oc Aug 28, 2025
f2383b8
docs(groupware): add Groupware related ADRs
pbleser-oc Aug 29, 2025
87f3351
groupware: fix debug server, was missing a lot of configuration optio…
pbleser-oc Sep 2, 2025
685b379
groupware: session handling improvements
pbleser-oc Sep 3, 2025
86c3220
add a .gitignore entry for debug binaries built by VSCode when runnin…
pbleser-oc Sep 3, 2025
6e3a195
groupware: add DNS auto-discovery (currently disabled, needs testing)
pbleser-oc Sep 4, 2025
e83e419
refactor(groupware): session cache and DNS autodiscovery
pbleser-oc Sep 4, 2025
d7296c7
test(groupware): add testcontainers based jmap test
pbleser-oc Sep 4, 2025
97aaca7
docs(groupware): OpenAPI improvements
pbleser-oc Sep 5, 2025
95ee1fe
feat(groupware): add fetching all mailboxes for all accounts
pbleser-oc Sep 8, 2025
18db9ff
chore(groupware): add launcher for OC + containers for services
pbleser-oc Sep 8, 2025
d1629e7
groupware: minor typo fixes
pbleser-oc Sep 8, 2025
1532de3
refactor(groupware): add max requests check
pbleser-oc Sep 9, 2025
9e3e7fd
docs(groupware): add services/groupware/DEVELOPER.md
pbleser-oc Sep 9, 2025
93fe1ad
refactor(groupware): use a function for multi-account method call IDs
pbleser-oc Sep 10, 2025
9bd1e87
refactor(groupware): rename "Messages" to "Email" everywhere
pbleser-oc Sep 10, 2025
e82ec44
fix(groupware): fix JMAP error handling
pbleser-oc Sep 10, 2025
3f5350d
docs(groupware): add configuration instructions to DEVELOPER.md
pbleser-oc Sep 11, 2025
e0d5199
more updates to the Groupware DEVELOPER.md
pbleser-oc Sep 11, 2025
c63a686
docs(groupware): more developer instructions
pbleser-oc Sep 11, 2025
c892133
fix(groupware): update DEVELOPER.md imap-filler usage since it was up…
pbleser-oc Sep 11, 2025
840fe04
jmap: modify GetBlob -> GetBlobMetadata
pbleser-oc Sep 12, 2025
7d5826a
groupware: improved attachment APIs
pbleser-oc Sep 12, 2025
9702e28
refactor(groupware): just use a function for the attachment picker
pbleser-oc Sep 18, 2025
bc376e3
feat(groupware): add WebsocketEndpoint to the JMAP Session
pbleser-oc Sep 18, 2025
83f6238
start websocket implementation, add endpoint for email summaries
pbleser-oc Sep 24, 2025
24dca84
Docker Compose Groupware improvements
pbleser-oc Sep 24, 2025
f862b5b
Implement JSContact (RFC9553) Model
pbleser-oc Sep 25, 2025
ba2f954
JSContact: refactored after full test coverage, stronger typing for e…
pbleser-oc Sep 26, 2025
767db67
services/groupware/DEVELOPER.md: adapt to new path for the opencloud_…
pbleser-oc Sep 26, 2025
494b46e
implement JSCalendar (RFC 8984)
pbleser-oc Sep 26, 2025
84cedb0
opencloud_full: also keep the 'Trace-Id' HTTP header
pbleser-oc Sep 30, 2025
8c75052
groupware: add mock endpoints for addressbooks and contacts
pbleser-oc Sep 30, 2025
3d027df
groupware: more mock data, added missing JMAP types
pbleser-oc Oct 1, 2025
4c53601
groupware: implement JMAP Task specification
pbleser-oc Oct 1, 2025
766a949
groupware: add mock endpoints for tasklists and tasks
pbleser-oc Oct 2, 2025
ef04d2c
/auth: add SkipXAccessToken:true
pbleser-oc Oct 2, 2025
a25decf
groupware: add JMAP capability checking (in part: for contacts, calen…
pbleser-oc Oct 2, 2025
1a5519d
groupware: add flag to currently ignore session capability checks for…
pbleser-oc Oct 6, 2025
30abe87
groupware: minor improvements to the DEVELOPER.md
pbleser-oc Oct 6, 2025
806db25
groupware: add quota API + add support for Accept-Language and Conten…
pbleser-oc Oct 6, 2025
a12b5a1
groupware: update @redocly/cli: 2.2.2 -> 2.3.0
pbleser-oc Oct 6, 2025
91d6650
groupware: improve instructions in DEVELOPER.md
pbleser-oc Oct 6, 2025
4512f2f
groupware: add /quota for all accounts
pbleser-oc Oct 6, 2025
aae02d1
groupware: add bootstrapping on / with quotas for all accounts
pbleser-oc Oct 7, 2025
dcedca4
groupware: upgrade Stalwart in devtools from 0.13.2 to 0.13.4
pbleser-oc Oct 7, 2025
c56badb
groupware: rewrite JMAP integration test to be more reusable, and upg…
pbleser-oc Oct 7, 2025
3de0b6d
groupware: improve jmap integration tests
pbleser-oc Oct 7, 2025
2849343
fixed connection reset issue. adapted make file to generate swagger d…
ScharfViktor Oct 8, 2025
539388f
docs(groupware): fix basepath in OpenAPI, /groupware instead of /grou…
pbleser-oc Oct 8, 2025
7d8fa73
groupware: update @redocly/cli from 2.3.0 to 2.3.1
pbleser-oc Oct 8, 2025
d8ee957
groupware: devtools: Stalwart: add internal LDAP configuration
pbleser-oc Oct 8, 2025
c774aae
groupware: make everything also work with the built-in LDAP and IDP
pbleser-oc Oct 8, 2025
de19660
groupware: for /accounts/all/emails/latest/summary, rename the ?unrea…
pbleser-oc Oct 8, 2025
459b4de
groupware: further updates to make everything work with the builtin L…
pbleser-oc Oct 9, 2025
dd91e59
jmap: fix Email/set
pbleser-oc Oct 9, 2025
81c973c
docs(groupware): upgrade @redocly/cli 2.3.1 -> 2.4.0
pbleser-oc Oct 9, 2025
5769467
groupware: implement email updating and email keyword updating endpoints
pbleser-oc Oct 9, 2025
dd98ddc
groupware: add Mermaid diagrams to describe the two setup options
pbleser-oc Oct 9, 2025
1bb8803
jmap: add GetInboxNameForMultipleAccounts
pbleser-oc Oct 10, 2025
dee8956
groupware: try an alternative way to configure Stalwart dynamically i…
pbleser-oc Oct 14, 2025
753b0b1
groupware: jmap: don't collpase threads when searching for emails, an…
pbleser-oc Oct 14, 2025
da84416
groupware: DEVELOPER.md: explain how to set a quota on a user using t…
pbleser-oc Oct 14, 2025
bd869d5
groupware: accept both '_' and '*' as the 'default account' placeholder
pbleser-oc Oct 14, 2025
ce34c9a
groupware: DEVELOPER.md: add note explaining LDAPTLS_REQCERT
pbleser-oc Oct 14, 2025
1b72596
groupware: fix devtools LDAP passwords, as it was breaking regular op…
pbleser-oc Oct 15, 2025
505afbc
groupware: fix NPE when one of the accounts is a group account
pbleser-oc Oct 15, 2025
1e08e49
groupware: add instructions for using stalwart-admin
pbleser-oc Oct 16, 2025
dc54fc0
groupware:
pbleser-oc Oct 17, 2025
698b766
groupware: add identity deletion
pbleser-oc Oct 17, 2025
f43b84e
groupware: add email HTML sanitization
pbleser-oc Oct 17, 2025
fef3d76
groupware: add searching emails by their Message-Id + retrieving an e…
pbleser-oc Oct 20, 2025
525b5c5
groupware: add the Retry-After header in responses when the session c…
pbleser-oc Oct 20, 2025
7f547d3
groupware: add markAsSeen=true to mark an email as $seen before it is
pbleser-oc Oct 21, 2025
c5123e0
groupware: add headers Unmatched-Path and Unsupported-Method to make
pbleser-oc Oct 21, 2025
721227a
groupware: improve email sanitization by using the mime package to pa…
pbleser-oc Oct 21, 2025
0c9089a
groupware: add threadSize property in the email summary endpoint
pbleser-oc Oct 21, 2025
beb05e4
groupware: fix keyword patching syntax for markAsSeen=true
pbleser-oc Oct 21, 2025
ecc2f60
groupware: fix keyword patching syntax for adding and removing email …
pbleser-oc Oct 21, 2025
d2d3db2
groupware: introduce constants for Email property names, see EmailSum…
pbleser-oc Oct 22, 2025
9ab70f6
groupware: add threadSize in email-by-id response
pbleser-oc Oct 22, 2025
4e53645
upgrade to Stalwart 0.14.0
pbleser-oc Oct 23, 2025
7bde89b
groupware: add recipe for using ldapsearch in an Alpine container to …
pbleser-oc Oct 23, 2025
9f2ebe3
groupware: add ContactCard operations
pbleser-oc Oct 23, 2025
e02deb7
groupware: add threadCount to /groupware/accounts/{accountId}/mailbox…
pbleser-oc Oct 23, 2025
247576b
groupware: add missing total,limit,offset attributes in the QueryEmai…
pbleser-oc Oct 23, 2025
9baabf1
groupware: fix compilation in tests after recent changes
pbleser-oc Oct 23, 2025
a99f295
groupware: actually add total and limit to the email summary endpoint
pbleser-oc Oct 23, 2025
973179c
groupware: fix creating contacts
pbleser-oc Oct 23, 2025
8053a28
groupware: change /accounts endpoint to return an array with the acco…
pbleser-oc Oct 24, 2025
36b033d
groupware: minor: reorganize the route nesting
pbleser-oc Oct 24, 2025
a1481a4
groupware: jmap: fix id -> blobId attribute when uploading a blob
pbleser-oc Oct 24, 2025
ee04a0c
groupware: also change accounts to an array instead of a map in the r…
pbleser-oc Oct 24, 2025
d917171
groupware: add Mailbox sorting
pbleser-oc Oct 24, 2025
27ddd24
groupware: add ical blob parsing endpoint
pbleser-oc Oct 28, 2025
6af5cfc
groupware: implement Mailbox modification endpoints + refactor ETag/s…
pbleser-oc Oct 28, 2025
d729e0f
groupware: implement/fix email submission
pbleser-oc Oct 29, 2025
7d18f4d
groupware: add real calendars and events
pbleser-oc Oct 30, 2025
dedadea
groupware: move POST+DELETE of contacts and events as a top-level rou…
pbleser-oc Oct 31, 2025
2e8e3f7
groupware: return identities with accounts in the /accounts endpoint
pbleser-oc Oct 31, 2025
286f091
groupware: some fixes accordingly to the latest JMAP and jscalendarbi…
pbleser-oc Nov 4, 2025
4ffc2d6
groupware: remove mock calendars and contacts
pbleser-oc Nov 5, 2025
2e22af4
groupware: fix deserialization of Event Alert Trigger types using map…
pbleser-oc Nov 5, 2025
ef0b58c
groupware: improved integration test for email, fixed two bugs
pbleser-oc Nov 6, 2025
82ee8a9
groupware: add getting a contact by ID + add integration tests for co…
pbleser-oc Nov 7, 2025
3700aed
groupware: fix blob uploading metadata and add 'POST /blobs' route
pbleser-oc Nov 17, 2025
fd1bd07
groupware: fix recently introduced error with UploadedBlob with and w…
pbleser-oc Nov 18, 2025
1695087
groupware: stalwart: add the magic sharing.allow-directory-query conf…
pbleser-oc Nov 18, 2025
8feebcf
groupware: improve JMAP integration tests for ContactCards
pbleser-oc Nov 18, 2025
15d269f
groupware: improve JMAP ContactCard integration tests
pbleser-oc Nov 19, 2025
68ee201
groupware: refactor the JMAP integration tests
pbleser-oc Nov 19, 2025
d855744
groupware: finalize JMAP events integration test, with multiple chang…
pbleser-oc Nov 20, 2025
62430e5
groupware: feature test improvements and upgrade to Stalwart 0.14.1
pbleser-oc Nov 24, 2025
b98282a
groupware: add Object-Type and Account-Id response headers
pbleser-oc Nov 26, 2025
a08e436
groupware: response payload /groupware/accounts/{id}/emails should be…
pbleser-oc Nov 26, 2025
eebc68b
groupware: fix email summaries and allow negative offsets
pbleser-oc Nov 26, 2025
e40afe6
groupware: JMAP WS push notifications support
pbleser-oc Nov 27, 2025
f7211ee
groupware: WS push improvements, add getting email changes to WS inte…
pbleser-oc Nov 28, 2025
424c323
groupware: upgrade the Stalwart image in devtools from 0.14.0 to 0.14.1
pbleser-oc Dec 1, 2025
49e797f
groupware, auth-api: remove tracing and tracing configuration
pbleser-oc Dec 3, 2025
66d9ea3
groupware: fix missing casting to jmap.State after changes in pkg/jmap
pbleser-oc Dec 3, 2025
923d323
groupware: minor: remove network declaration in stalwart.yml
pbleser-oc Dec 3, 2025
c11e7d6
groupware: refactor response objects to take a list of accountIds
pbleser-oc Dec 4, 2025
c52f6cb
groupware: add retrieving and adding mailboxIds for drafts and sent i…
pbleser-oc Dec 5, 2025
8fd07b9
groupware: improve email submission and testing
pbleser-oc Dec 8, 2025
5608d7e
groupware: add description and version annotations for env configurat…
pbleser-oc Dec 9, 2025
71e6b0d
groupware: fix failing pkg/jscalendar unit tests
pbleser-oc Dec 9, 2025
e2803bd
groupware: fix failing pkg/jscontact unit tests
pbleser-oc Dec 9, 2025
8515c95
groupware: shift some attributes of the Groupware object around, in d…
pbleser-oc Dec 9, 2025
2feb221
groupware: update to Stalwart 0.15.0
pbleser-oc Dec 17, 2025
217acf4
API documentation changes for groupware-apidocs
pbleser-oc Jan 22, 2026
57d498a
fix go.mod by tidying after a significant rebase
pbleser-oc Jan 22, 2026
2ebc97a
groupware: update pnpm 10.28.0 -> 10.28.1
pbleser-oc Jan 22, 2026
820cf87
groupware: migrate to cobra instead of urfave
pbleser-oc Jan 22, 2026
1c0a6c4
update redocly 2.14.5 -> 2.14.6
pbleser-oc Jan 22, 2026
c72f8b0
groupware: change Makefile to use groupware-apidocs instead of go-swa…
pbleser-oc Jan 22, 2026
bf84bf9
groupware: more API examples
pbleser-oc Jan 22, 2026
49d455e
groupware: update README to new API documentation generation process,…
pbleser-oc Jan 22, 2026
53ffb74
groupware: also update DEVELOPER.md with new OpenAPI documentation ge…
pbleser-oc Jan 22, 2026
baa034e
groupware: bump redocly/cli from 2.14.6 to 2.15.1
pbleser-oc Feb 4, 2026
0e06bed
groupware: convert documentation to proper markdown
pbleser-oc Feb 4, 2026
a95db68
groupware: set GROUPWARE_JMAP_BASE_URL to use the variable STALWART_D…
pbleser-oc Feb 4, 2026
704a6e4
auth-api: deal with errors properly in NewService
pbleser-oc Feb 4, 2026
ac32253
groupware: update DEVELOPERS.md based on Jörn's feedback
pbleser-oc Feb 4, 2026
71d3f59
groupware: as suggested in the review PR 1994, remove all filename pr…
pbleser-oc Feb 4, 2026
2560b93
groupware: add STALWART_AUTH_DIRECTORY variable to .env
pbleser-oc Feb 4, 2026
366637e
groupware: use the OIDC client ID 'web' instead of 'groupware'
pbleser-oc Feb 5, 2026
958db07
groupware: add jscontact examples, and move them to jmap/model_exampl…
pbleser-oc Feb 6, 2026
75df436
groupware: remove remnants of go-swagger documentation, since we are …
pbleser-oc Feb 6, 2026
c2c76de
groupware: add OIDC authentication support between Groupware backend …
pbleser-oc Feb 10, 2026
e7b1dea
groupware: minor logging improvements to the session cache
pbleser-oc Feb 23, 2026
b4d396c
groupware: add UI example of a ContactCard to the documented examples
pbleser-oc Feb 23, 2026
766a393
groupware: upgrade Stalwart image in opencloud_full from 0.15.0 to 0.…
pbleser-oc Feb 23, 2026
3cdf398
groupware: upgrade Stalwart image in integration tests from 0.15.0 to…
pbleser-oc Feb 23, 2026
1de40ef
groupware: use master auth in launcher
pbleser-oc Feb 23, 2026
b93d71f
groupware: upgrade redocly/cli 2.15.1 -> 2.20.2
pbleser-oc Feb 27, 2026
c05d6ad
groupware: devtools: add email encryption settings to idmldap.toml
pbleser-oc Feb 27, 2026
93bfdb9
groupware: fix typos and minor issues
pbleser-oc Mar 4, 2026
ccae6f1
(chore) groupware: tests/groupware: upgrade dependencies
pbleser-oc Mar 4, 2026
acd2861
groupware: sort contacts in addressbook by name
pbleser-oc Mar 19, 2026
09e096c
groupware: documentation: more calendar examples
pbleser-oc Mar 19, 2026
3f481d6
groupware: add contact sorting query parameter and fix default sortin…
pbleser-oc Mar 19, 2026
32b6b73
groupware: clarify the ContactCard situation
pbleser-oc Mar 19, 2026
ec83921
groupware: add web frontend settings to the vscode launcher
pbleser-oc Mar 23, 2026
608564c
groupware: upgrade redocly/cli 2.20.0 -> 2.24.0
pbleser-oc Mar 23, 2026
cecbdd2
groupware: refactor contactcard changes, and Request framework
pbleser-oc Mar 24, 2026
8e0db54
groupware: upgrade redocly to 2.24.0
pbleser-oc Mar 24, 2026
b0b4013
groupware: docs: add a quick copy-pastable block for running ldapsearch
pbleser-oc Mar 24, 2026
58c4af5
groupware: mod tidying after rebase
pbleser-oc Mar 24, 2026
1ac5e3f
groupware: pollute code with NOSONAR comments, and make a little more…
pbleser-oc Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
143 changes: 143 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,149 @@
"OC_SERVICE_ACCOUNT_SECRET": "service-account-secret"
}
},
{
"name": "OpenCloud server with Groupware",
"type": "go",
"request": "launch",
"mode": "debug",
"buildFlags": [
// "-tags", "enable_vips"
],
"program": "${workspaceFolder}/opencloud/cmd/opencloud",
"args": ["server"],
"env": {
// log settings for human developers
"OC_LOG_LEVEL": "info",
"OC_LOG_PRETTY": "true",
"OC_LOG_COLOR": "true",
// set insecure options because we don't have valid certificates in dev environments
"OC_INSECURE": "true",
// enable basic auth for dev setup so that we can use curl for testing
"PROXY_ENABLE_BASIC_AUTH": "true",
// demo users
"IDM_CREATE_DEMO_USERS": "true",
// OC_RUN_SERVICES allows to start a subset of services even in the supervised mode
//"OC_RUN_SERVICES": "settings,storage-system,graph,idp,idm,ocs,store,thumbnails,web,webdav,frontend,gateway,users,groups,auth-basic,storage-authmachine,storage-users,storage-shares,storage-publiclink,storage-system,app-provider,sharing,proxy,ocdav",

/*
* Keep secrets and passwords in one block to allow easy uncommenting
*/
// user id of "admin", for user creation and admin role assignement
"OC_ADMIN_USER_ID": "some-admin-user-id-0000-000000000000", // FIXME currently must have the length of a UUID, see reva/pkg/storage/utils/decomposedfs/spaces.go:228
// admin user default password
"IDM_ADMIN_PASSWORD": "admin",
// system user
"OC_SYSTEM_USER_ID": "some-system-user-id-000-000000000000", // FIXME currently must have the length of a UUID, see reva/pkg/storage/utils/decomposedfs/spaces.go:228
"OC_SYSTEM_USER_API_KEY": "some-system-user-machine-auth-api-key",
// set some hardcoded secrets
"OC_JWT_SECRET": "some-opencloud-jwt-secret",
"OC_MACHINE_AUTH_API_KEY": "some-opencloud-machine-auth-api-key",
"OC_TRANSFER_SECRET": "some-opencloud-transfer-secret",
// collaboration
"COLLABORATION_WOPIAPP_SECRET": "some-wopi-secret",
// idm ldap
"IDM_SVC_PASSWORD": "some-ldap-idm-password",
"GRAPH_LDAP_BIND_PASSWORD": "some-ldap-idm-password",
// reva ldap
"IDM_REVASVC_PASSWORD": "some-ldap-reva-password",
"GROUPS_LDAP_BIND_PASSWORD": "some-ldap-reva-password",
"USERS_LDAP_BIND_PASSWORD": "some-ldap-reva-password",
"AUTH_BASIC_LDAP_BIND_PASSWORD": "some-ldap-reva-password",
// idp ldap
"IDM_IDPSVC_PASSWORD": "some-ldap-idp-password",
"IDP_LDAP_BIND_PASSWORD": "some-ldap-idp-password",
// storage users mount ID
"GATEWAY_STORAGE_USERS_MOUNT_ID": "storage-users-1",
"STORAGE_USERS_MOUNT_ID": "storage-users-1",
// graph application ID
"GRAPH_APPLICATION_ID": "application-1",

// service accounts
"OC_SERVICE_ACCOUNT_ID": "service-account-id",
"OC_SERVICE_ACCOUNT_SECRET": "service-account-secret",

"OC_ADD_RUN_SERVICES": "auth-api,groupware",
"GROUPWARE_LOG_LEVEL": "trace",

"GROUPWARE_JMAP_MASTER_USERNAME": "master",
"GROUPWARE_JMAP_MASTER_PASSWORD": "admin",

"AUTHAPI_HTTP_ADDR": "0.0.0.0:10000",
"AUTHAPI_AUTH_REQUIRE_SHARED_SECRET": "true",
"AUTHAPI_AUTH_SHARED_SECRETS": "stalwart=maethaR9eiXaiph8ahn8ohH6dahPiequ;unused=eeyaigh6hae1zo5ahGeete6oohaiquei",

"WEB_ASSET_CORE_PATH": "${workspaceFolder}/../web/dist",
"WEB_UI_CONFIG_FILE": "${workspaceFolder}/../web/dev/docker/opencloud.web.config.json",
"FRONTEND_GROUPWARE_ENABLED": "true"
}
},
{
"name": "OpenCloud server with external services",
"type": "go",
"request": "launch",
"mode": "debug",
"buildFlags": [
// "-tags", "enable_vips"
],
"program": "${workspaceFolder}/opencloud/cmd/opencloud",
"args": ["server"],
"env": {
"OC_URL": "https://localhost:9200/",
"PROXY_DEBUG_ADDR": "0.0.0.0:9205",
"OC_BASE_DATA_PATH": "${env:HOME}/.opencloud-with-external",
"OC_CONFIG_DIR": "${env:HOME}/.opencloud-with-external/config",
"GROUPWARE_LOG_LEVEL": "trace",
"OC_LOG_LEVEL": "info",
"OC_LOG_PRETTY": "true",
"OC_LOG_COLOR": "true",
"OC_INSECURE": "true",
"PROXY_ENABLE_BASIC_AUTH": "false",
"IDM_CREATE_DEMO_USERS": "false",
"OC_LDAP_URI": "ldaps://localhost:636",
"OC_LDAP_INSECURE": "true",
"OC_LDAP_BIND_DN": "cn=admin,dc=opencloud,dc=eu",
"OC_LDAP_BIND_PASSWORD": "admin",
"OC_LDAP_GROUP_BASE_DN": "ou=groups,dc=opencloud,dc=eu",
"OC_LDAP_GROUP_SCHEMA_ID": "entryUUID",
"OC_LDAP_USER_BASE_DN": "ou=users,dc=opencloud,dc=eu",
"OC_LDAP_USER_FILTER": "(objectclass=inetOrgPerson)",
"OC_LDAP_USER_SCHEMA_ID": "entryUUID",
"OC_LDAP_DISABLE_USER_MECHANISM": "none",
"OC_LDAP_SERVER_WRITE_ENABLED": "false",
"OC_EXCLUDE_RUN_SERVICES": "idm",
"OC_ADD_RUN_SERVICES": "notifications,groupware",
"NATS_NATS_HOST": "0.0.0.0",
"NATS_NATS_PORT": "9233",
"FRONTEND_ARCHIVER_MAX_SIZE": "10000000000",
"MICRO_REGISTRY_ADDRESS": "127.0.0.1:9233",
"NOTIFICATIONS_SMTP_HOST": "localhost",
"NOTIFICATIONS_SMTP_PORT": "2500",
"NOTIFICATIONS_SMTP_SENDER": "OpenCloud notifications <notifications@cloud.opencloud.test>",
"NOTIFICATIONS_SMTP_USERNAME": "notifications@cloud.opencloud.test",
"NOTIFICATIONS_SMTP_INSECURE": "true",
"NOTIFICATIONS_SMTP_PASSWORD": "",
"NOTIFICATIONS_SMTP_AUTHENTICATION": "",
"NOTIFICATIONS_SMTP_ENCRYPTION": "none",
"PROXY_AUTOPROVISION_ACCOUNTS": "false",
"PROXY_ROLE_ASSIGNMENT_DRIVER": "oidc",
"OC_OIDC_ISSUER": "https://keycloak.opencloud.test/realms/openCloud",
"PROXY_OIDC_REWRITE_WELLKNOWN": "true",
"WEB_OIDC_CLIENT_ID": "web",
"PROXY_USER_OIDC_CLAIM": "uuid",
"PROXY_USER_CS3_CLAIM": "userid",
"WEB_OPTION_ACCOUNT_EDIT_LINK_HREF": "https://keycloak.opencloud.test/realms/openCloud/account",
"OC_ADMIN_USER_ID": "",
"SETTINGS_SETUP_DEFAULT_ASSIGNMENTS": "false",
"GRAPH_ASSIGN_DEFAULT_USER_ROLE": "false",
"GRAPH_USERNAME_MATCH": "none",
"KEYCLOAK_DOMAIN": "keycloak.opencloud.test",
"IDM_ADMIN_PASSWORD": "admin",
"GRAPH_LDAP_SERVER_UUID": "true",
"GRAPH_LDAP_GROUP_CREATE_BASE_DN": "ou=custom,ou=groups,dc=opencloud,dc=eu",
"GRAPH_LDAP_REFINT_ENABLED": "true",
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
}
},
{
"name": "Fed OpenCloud server",
"type": "go",
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ OC_MODULES = \
services/app-provider \
services/app-registry \
services/audit \
services/auth-api \
services/auth-app \
services/auth-basic \
services/auth-bearer \
Expand All @@ -39,6 +40,7 @@ OC_MODULES = \
services/gateway \
services/graph \
services/groups \
services/groupware \
services/idm \
services/idp \
services/invitations \
Expand Down
15 changes: 14 additions & 1 deletion devtools/deployments/opencloud_full/.env
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,21 @@ KEYCLOAK_ADMIN_PASSWORD=
# Leaving it default stores data in docker internal volumes.
#RADICALE_DATA_DIR=/your/local/radicale/data

### Stalwart Settings ###
# Note: the leading colon is required to enable the service.
#STALWART=:stalwart.yml
# Domain of Stalwart
# Defaults to "stalwart.opencloud.test"
STALWART_DOMAIN=
# LDAP configuration to use for Stalwart:
# Can either be either
# - idmldap: for the built-in IDP/IDM, using Master Authentication between Groupware and Stalwart, and LDAP in Stalwart
# - idmoidc: built-in IDP/IDM, using OIDC Userinfo between Groupware and Stalwart
# - ldap: when using KeyCloak and OpenLDAP, with Master Authentication between Groupware and Stalwart, and LDAP in Stalwart
STALWART_AUTH_DIRECTORY=idmldap

## IMPORTANT ##
# This MUST be the last line as it assembles the supplemental compose files to be used.
# ALL supplemental configs must be added here, whether commented or not.
# Each var must either be empty or contain :path/file.yml
COMPOSE_FILE=docker-compose.yml${OPENCLOUD:-}${TIKA:-}${DECOMPOSEDS3:-}${DECOMPOSEDS3_MINIO:-}${DECOMPOSED:-}${COLLABORA:-}${MONITORING:-}${IMPORTER:-}${CLAMAV:-}${INBUCKET:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${KEYCLOAK:-}${LDAP:-}${KEYCLOAK_AUTOPROVISIONING:-}${LDAP_MANAGER:-}${RADICALE:-}
COMPOSE_FILE=docker-compose.yml${OPENCLOUD:-}${TIKA:-}${DECOMPOSEDS3:-}${DECOMPOSEDS3_MINIO:-}${DECOMPOSED:-}${COLLABORA:-}${MONITORING:-}${IMPORTER:-}${CLAMAV:-}${INBUCKET:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${KEYCLOAK:-}${LDAP:-}${KEYCLOAK_AUTOPROVISIONING:-}${LDAP_MANAGER:-}${RADICALE:-}${STALWART:-}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
dn: ou=policies,dc=opencloud,dc=eu
objectClass: organizationalUnit
objectClass: top
ou: policies

dn: cn=default,ou=policies,dc=opencloud,dc=eu
cn: default
objectClass: pwdPolicy
objectClass: person
objectClass: top
pwdAllowUserChange: TRUE
pwdAttribute: userPassword
pwdCheckQuality: 0
pwdExpireWarning: 600
pwdFailureCountInterval: 30
pwdGraceAuthNLimit: 5
pwdInHistory: 5
pwdLockout: FALSE
pwdLockoutDuration: 0
pwdMaxAge: 0
pwdMaxFailure: 5
pwdMinAge: 0
pwdMinLength: 1
pwdMustChange: FALSE
pwdSafeModify: FALSE
sn: default
21 changes: 21 additions & 0 deletions devtools/deployments/opencloud_full/config/stalwart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Stalwart Configuration

The mechanics are currently to mount a different configuration file depending on the environment, as we support two scenarios that are described in [`services/groupware/DEVELOPER.md`](../../../../../services/groupware/DEVELOPER.md):

* &laquo;production&raquo; setup, with OpenLDAP and Keycloak containers
* &laquo;homelab&raquo; setup, with the built-in IDM (LDAP) and IDP that run as part of the `opencloud` container

The Docker Compose setup (in [`stalwart.yml`](../../stalwart.yml)) mounts either [`idmldap.toml`](./idmldap.toml) or [`ldap.toml`](./ldap.toml) depending on how the variable `STALWART_AUTH_DIRECTORY` is set, which is either `idmldap` for the homelab setup, or `ldap` for the production setup.

This is thus all done automatically, but whenever changes are performed to Stalwart configuration files, they must be reflected across those two files, to keep them in sync, as the only entry that should differ is this one:

```ruby
storage.directory = "ldap"
```

or this:

```ruby
storage.directory = "idmldap"
```

110 changes: 110 additions & 0 deletions devtools/deployments/opencloud_full/config/stalwart/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
authentication.fallback-admin.secret = "$6$4qPYDVhaUHkKcY7s$bB6qhcukb9oFNYRIvaDZgbwxrMa2RvF5dumCjkBFdX19lSNqrgKltf3aPrFMuQQKkZpK2YNuQ83hB1B3NiWzj."
authentication.fallback-admin.user = "mailadmin"
authentication.master.secret = "$6$4qPYDVhaUHkKcY7s$bB6qhcukb9oFNYRIvaDZgbwxrMa2RvF5dumCjkBFdX19lSNqrgKltf3aPrFMuQQKkZpK2YNuQ83hB1B3NiWzj."
authentication.master.user = "master"
directory.idmldap.attributes.class = "objectClass"
directory.idmldap.attributes.description = "displayName"
directory.idmldap.attributes.email = "mail"
directory.idmldap.attributes.groups = "memberOf"
directory.idmldap.attributes.name = "uid"
directory.idmldap.attributes.secret = "userPassword"
directory.idmldap.base-dn = "o=libregraph-idm"
directory.idmldap.bind.auth.method = "default"
directory.idmldap.bind.dn = "uid=reva,ou=sysusers,o=libregraph-idm"
directory.idmldap.bind.secret = "admin"
directory.idmldap.cache.size = 1048576
directory.idmldap.cache.ttl.negative = "10m"
directory.idmldap.cache.ttl.positive = "1h"
directory.idmldap.filter.email = "(&(|(objectClass=person)(objectClass=groupOfNames))(mail=?))"
directory.idmldap.filter.name = "(&(|(objectClass=person)(objectClass=groupOfNames))(uid=?))"
directory.idmldap.timeout = "15s"
directory.idmldap.tls.allow-invalid-certs = true
directory.idmldap.tls.enable = true
directory.idmldap.type = "ldap"
directory.idmldap.url = "ldaps://opencloud:9235"
directory.keycloak.auth.method = "user-token"
directory.keycloak.cache.size = 1048576
directory.keycloak.cache.ttl.negative = "10m"
directory.keycloak.cache.ttl.positive = "1h"
directory.keycloak.endpoint.method = "introspect"
directory.keycloak.endpoint.url = "http://keycloak:8080/realms/openCloud/protocol/openid-connect/userinfo"
directory.keycloak.fields.email = "email"
directory.keycloak.fields.full-name = "name"
directory.keycloak.fields.username = "preferred_username"
directory.keycloak.timeout = "15s"
directory.keycloak.type = "oidc"
directory.ldap.attributes.class = "objectClass"
directory.ldap.attributes.description = "displayName"
directory.ldap.attributes.email = "mail"
directory.ldap.attributes.email-alias = "mailAlias"
directory.ldap.attributes.groups = "memberOf"
directory.ldap.attributes.name = "uid"
directory.ldap.attributes.secret = "userPassword"
directory.ldap.attributes.secret-changed = "pwdChangedTime"
directory.ldap.base-dn = "dc=opencloud,dc=eu"
directory.ldap.bind.auth.dn = "cn=?,ou=users,dc=opencloud,dc=eu"
directory.ldap.bind.auth.enable = true
directory.ldap.bind.auth.search = true
directory.ldap.bind.dn = "cn=admin,dc=opencloud,dc=eu"
directory.ldap.bind.secret = "admin"
directory.ldap.cache.ttl.negative = "10m"
directory.ldap.cache.ttl.positive = "1h"
directory.ldap.filter.email = "(&(|(objectClass=person)(objectClass=groupOfNames))(|(uid=?)(mail=?)(mailAlias=?)(cn=?)))"
directory.ldap.filter.name = "(&(|(objectClass=person)(objectClass=groupOfNames))(|(uid=?)(cn=?)))"
directory.ldap.timeout = "5s"
directory.ldap.tls.allow-invalid-certs = true
directory.ldap.tls.enable = true
directory.ldap.type = "ldap"
directory.ldap.url = "ldap://ldap-server:1389"
http.allowed-endpoint = 200
http.hsts = true
http.permissive-cors = false
http.url = "'https://' + config_get('server.hostname')"
http.use-x-forwarded = true
metrics.prometheus.auth.secret = "secret"
metrics.prometheus.auth.username = "metrics"
metrics.prometheus.enable = true
server.listener.http.bind = "0.0.0.0:8080"
server.listener.http.protocol = "http"
server.listener.https.bind = "0.0.0.0:443"
server.listener.https.protocol = "http"
server.listener.https.tls.implicit = true
server.listener.imap.bind = "0.0.0.0:143"
server.listener.imap.protocol = "imap"
server.listener.imaptls.bind = "0.0.0.0:993"
server.listener.imaptls.protocol = "imap"
server.listener.imaptls.tls.implicit = true
server.listener.pop3.bind = "0.0.0.0:110"
server.listener.pop3.protocol = "pop3"
server.listener.pop3s.bind = "0.0.0.0:995"
server.listener.pop3s.protocol = "pop3"
server.listener.pop3s.tls.implicit = true
server.listener.sieve.bind = "0.0.0.0:4190"
server.listener.sieve.protocol = "managesieve"
server.listener.smtp.bind = "0.0.0.0:25"
server.listener.smtp.protocol = "smtp"
server.listener.submission.bind = "0.0.0.0:587"
server.listener.submission.protocol = "smtp"
server.listener.submissions.bind = "0.0.0.0:465"
server.listener.submissions.protocol = "smtp"
server.listener.submissions.tls.implicit = true
server.max-connections = 8192
server.socket.backlog = 1024
server.socket.nodelay = true
server.socket.reuse-addr = true
server.socket.reuse-port = true
storage.blob = "rocksdb"
storage.data = "rocksdb"
storage.directory = "%{env:STALWART_AUTH_DIRECTORY}%"
storage.fts = "rocksdb"
storage.lookup = "rocksdb"
store.rocksdb.compression = "lz4"
store.rocksdb.path = "/opt/stalwart/data"
store.rocksdb.type = "rocksdb"
tracer.console.ansi = true
tracer.console.buffered = true
tracer.console.enable = true
tracer.console.level = "trace"
tracer.console.lossy = false
tracer.console.multiline = false
tracer.console.type = "stdout"
Loading