Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2/main' into add_oauth_lib_and_r…
Browse files Browse the repository at this point in the history
…equirer
  • Loading branch information
Thanhphan1147 committed Jan 14, 2025
2 parents 3c0236b + 1845a09 commit a3775e8
Show file tree
Hide file tree
Showing 91 changed files with 782 additions and 2,933 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ Please, provide some information about your PR before proceeding.
- [ ] The documentation is generated using `src-docs`
- [ ] The documentation for charmhub is updated.
- [ ] The PR is tagged with appropriate label (`urgent`, `trivial`, `complex`)
- [ ] The changelog is updated with changes that affect the users of the charm.

<!-- Explanation for any unchecked items above -->
10 changes: 9 additions & 1 deletion .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Integration tests

on:
pull_request:
schedule:
# Trigger at 6:00 AM and 6:00 PM UTC
- cron: "0 6,18 * * *"

jobs:
integration-tests:
Expand All @@ -13,4 +16,9 @@ jobs:
trivy-image-config: "trivy.yaml"
juju-channel: 3.4/stable
channel: 1.28-strict/stable
modules: '["test_charm", "test_nginx", "test_s3", "test_scaling"]'
modules: '["test_charm", "test_nginx", "test_s3", "test_scaling", "test_matrix_auth"]'
allure-report:
if: ${{ (success() || failure()) && github.event_name == 'schedule' }}
needs:
- integration-tests
uses: canonical/operator-workflows/.github/workflows/allure_report.yaml@main
16 changes: 3 additions & 13 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
# Vulnerabilites related to: Pebble, Node.JS and gosu
CVE-2021-39293
CVE-2021-41771
CVE-2021-41772
CVE-2021-44716
CVE-2022-23772
CVE-2022-23806
CVE-2022-24675
CVE-2022-24921
CVE-2022-25883
CVE-2022-27664
CVE-2022-28131

Check notice on line 2 in .trivyignore

View workflow job for this annotation

GitHub Actions / integration-tests / Scan Image (ghcr.io-canonical-synapse-4142a4055d88c05ea60194be0476ca8cfcd98d90-_3.0_amd64.tar)

CVE-2022-28131 not present anymore, can be safely removed.
CVE-2022-28327

Check notice on line 3 in .trivyignore

View workflow job for this annotation

GitHub Actions / integration-tests / Scan Image (ghcr.io-canonical-synapse-4142a4055d88c05ea60194be0476ca8cfcd98d90-_3.0_amd64.tar)

CVE-2022-28327 not present anymore, can be safely removed.
CVE-2022-2879

Check notice on line 4 in .trivyignore

View workflow job for this annotation

GitHub Actions / integration-tests / Scan Image (ghcr.io-canonical-synapse-4142a4055d88c05ea60194be0476ca8cfcd98d90-_3.0_amd64.tar)

CVE-2022-2879 not present anymore, can be safely removed.
Expand Down Expand Up @@ -47,9 +37,9 @@ CVE-2024-29415
CVE-2024-34156
CVE-2024-21538
CVE-2024-24788
# This should be removed once the following PR is merged.
# https://github.com/element-hq/synapse/pull/17955
CVE-2024-52804
# Fix ongoing:
# https://github.com/element-hq/synapse/pull/17985
CVE-2024-53981
# This should be removed once pebble releases a new version.
# https://github.com/canonical/pebble/commit/0c134f8e0d80f4bd8f42011279c8f0737b59a673
CVE-2024-45338
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2024 Canonical Ltd.
Copyright 2025 Canonical Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
11 changes: 1 addition & 10 deletions actions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Canonical Ltd.
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.

anonymize-user:
Expand Down Expand Up @@ -41,15 +41,6 @@ verify-user-email:
required:
- username
- email
promote-user-admin:
description: |
Promote a user as a server administrator.
You need to supply a user name.
properties:
username:
description: |
User name to be promoted to admin.
type: string
create-backup:
description: |
Creates a backup to s3 storage.
Expand Down
2 changes: 1 addition & 1 deletion charmcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Canonical Ltd.
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.

# This file configures Charmcraft.
Expand Down
8 changes: 1 addition & 7 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Canonical Ltd.
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.

options:
Expand All @@ -22,12 +22,6 @@ options:
default: false
description: |
Configures whether to enable e-mail notifications. Requires SMTP integration.
enable_mjolnir:
type: boolean
default: false
description: |
Configures whether to enable Mjolnir - moderation tool for Matrix.
Reference: https://github.com/matrix-org/mjolnir
enable_password_config:
type: boolean
default: true
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

### 2025-01-09

- Add changelog for tracking user-relevant changes.
20 changes: 1 addition & 19 deletions docs/explanation/moderation-and-spam-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,4 @@ For details and implementation, visit the module’s repository: [Synapse Invite

## Mjolnir

Synapse charm also has Mjolnir in place. Mjolnir is an all-in-one moderation
tool designed to protect Synapse server from malicious invites, spam messages,
and other unwanted activities.

### Key features

- Bans and redactions: Quickly remove malicious users and their messages from
rooms.
- Anti-spam: Automatically detect and mitigate spam activity.
- Server ACLs: Manage and enforce access control lists at the server level.
- Room directory changes and alias transfers: Adjust room visibility and manage
aliases efficiently.
- Account deactivation: Disable abusive or compromised accounts.
- Room shutdown: Close problematic rooms completely.

### More information

For more details and implementation guidance, refer to the [Mjolnir GitHub repository](https://github.com/matrix-org/mjolnir).

With the arrival of MAS mjolnir has been temporary disabled.
6 changes: 6 additions & 0 deletions docs/how-to/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ Run the following command:
echo -e "tox -e src-docs\ngit add src-docs\n" >> .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
```
### Changelog

Please ensure that any new feature, fix, or significant change is documented by
adding an entry to the `docs/changelog.md` file.

To learn more about changelog best practices, visit [Keep a Changelog](https://keepachangelog.com/).

## Build charm

Expand Down
2 changes: 1 addition & 1 deletion generate-src-docs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Copyright 2024 Canonical Ltd.
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.

rm -rf src-docs
Expand Down
2 changes: 1 addition & 1 deletion lib/charms/nginx_ingress_integrator/v0/nginx_route.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Canonical Ltd.
# Copyright 2025 Canonical Ltd.
# Licensed under the Apache2.0. See LICENSE file in charm source for details.
"""Library for the nginx-route relation.
Expand Down
2 changes: 1 addition & 1 deletion lib/charms/smtp_integrator/v0/smtp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Canonical Ltd.
# Copyright 2025 Canonical Ltd.
# Licensed under the Apache2.0. See LICENSE file in charm source for details.

"""Library to manage the integration with the SMTP Integrator charm.
Expand Down
Loading

0 comments on commit a3775e8

Please sign in to comment.