Each config has two fields for the NATS credentials: CredsFile (OCIS_NATS_CREDS_FILE;<SERVICE>_..._CREDS_FILE) and Creds (OCIS_NATS_CREDS;<SERVICE>_..._CREDS). envdecode sets each field on its own, and the content always won. Example: OCIS_NATS_CREDS set globally and GRAPH_CACHE_CREDS_FILE set for the service. The graph cache then used the global content and ignored the service file. The registry already used a different rule: the registry variables take precedence over the global variables. Use the registry rule everywhere. After envdecode decodes a struct, it resolves each CredsFile/Creds pair: when the file comes from a more specific environment variable than the content, the content is cleared. In the same scope the content still wins. A value from the config file has the lowest scope, because environment variables override the config file. Update the descriptions of the Creds fields, the nats README, and the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit
The audit service logs all events of the system as an audit log. Per default, it will be logged to standard out, but can also be configured to a file output. Supported log formats are json or a minimal human-readable format.
With audit logs, you are able to prove compliance with corporate guidelines as well as to enable reporting and auditing of operations. The audit service takes note of actions conducted by users and administrators.
Example minimal format:
file_delete)
user 'user_id' trashed file 'item_id'
file_trash_delete)
user 'user_id' removed file 'item_id' from trashbin
Example json:
{"RemoteAddr":"","User":"user_id","URL":"","Method":"","UserAgent":"","Time":"","App":"admin_audit","Message":"user 'user_id' trashed file 'item_id'","Action":"file_delete","CLI":false,"Level":1,"Path":"path","Owner":"user_id","FileID":"item_id"}
{"RemoteAddr":"","User":"user_id","URL":"","Method":"","UserAgent":"","Time":"","App":"admin_audit","Message":"user 'user_id' removed file 'item_id' from trashbin","Action":"file_trash_delete","CLI":false,"Level":1,"Path":"path","Owner":"user_id","FileID":"item_id"}
The audit service is not started automatically when running as single binary started via ocis server or when running as docker container and must be started and stopped manually on demand.
The audit service logs:
- File system operations
(create/delete/move; including actions on the trash bin and versioning) - User management operations
(creation/deletion of users) - Sharing operations
(user/group sharing, sharing via link, changing permissions, calls to sharing API from clients)