Skip to content

Commit

Permalink
ISD-2817 Add mas to pebble plan (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanhphan1147 authored Jan 14, 2025
1 parent fb6243a commit 1845a09
Show file tree
Hide file tree
Showing 45 changed files with 783 additions and 3,000 deletions.
6 changes: 1 addition & 5 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ CVE-2024-52804
# Fix ongoing:
# https://github.com/element-hq/synapse/pull/17985
CVE-2024-53981
# The 3 following CVEs will be fixed by Synapse 1.120.2
CVE-2024-52805
CVE-2024-52815
CVE-2024-53863
# This should be removed once pebble releases a new version.
# https://github.com/canonical/pebble/commit/0c134f8e0d80f4bd8f42011279c8f0737b59a673
CVE-2024-45338
CVE-2024-45338
15 changes: 10 additions & 5 deletions actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@ register-user:
default: false
required:
- username
promote-user-admin:
verify-user-email:
description: |
Promote a user as a server administrator.
You need to supply a user name.
Verify an user's email.
You need to supply an username and the email to verify.
properties:
username:
description: |
User name to be promoted to admin.
description: The username.
type: string
email:
description: The email to verify.
type: string
required:
- username
- email
create-backup:
description: |
Creates a backup to s3 storage.
Expand Down
6 changes: 0 additions & 6 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension-pkg-whitelist = "pydantic"
# Formatting tools configuration
[tool.black]
line-length = 99
target-version = ["py38"]
target-version = ["py310"]

[tool.isort]
line_length = 99
Expand Down
67 changes: 0 additions & 67 deletions src-docs/admin_access_token.py.md

This file was deleted.

14 changes: 7 additions & 7 deletions src-docs/charm.py.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Charm the service.

Attrs: on: listen to Redis events.

<a href="../src/charm.py#L56"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L60"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `__init__`

Expand Down Expand Up @@ -94,7 +94,7 @@ Build charm state.

---

<a href="../src/charm.py#L357"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L364"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `get_main_unit`

Expand All @@ -111,7 +111,7 @@ Get main unit.

---

<a href="../src/charm.py#L372"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L379"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `get_main_unit_address`

Expand All @@ -128,7 +128,7 @@ Get main unit address. If main unit is None, use unit name.

---

<a href="../src/charm.py#L424"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L431"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `get_signing_key`

Expand Down Expand Up @@ -204,7 +204,7 @@ Verify if this unit is the main.

---

<a href="../src/charm.py#L334"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L341"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `peer_units_total`

Expand Down Expand Up @@ -242,7 +242,7 @@ This is the main entry for changes that require a restart.

---

<a href="../src/charm.py#L384"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L391"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `set_main_unit`

Expand All @@ -260,7 +260,7 @@ Create/Renew an admin access token and put it in the peer relation.

---

<a href="../src/charm.py#L400"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/charm.py#L407"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `set_signing_key`

Expand Down
118 changes: 0 additions & 118 deletions src-docs/mjolnir.py.md

This file was deleted.

Loading

0 comments on commit 1845a09

Please sign in to comment.