Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebfe474a79 | ||
|
|
0c3a909ef3 | ||
|
|
1d941ef1c2 | ||
|
|
f9c7799381 | ||
|
|
37e0405972 | ||
|
|
429683194f | ||
|
|
b2bc129d47 | ||
|
|
5e74f21865 | ||
|
|
070d306838 | ||
|
|
c9f1071363 |
18
CHANGELOG
18
CHANGELOG
@@ -130,3 +130,21 @@
|
|||||||
* Update Synapse to 1.14.0
|
* Update Synapse to 1.14.0
|
||||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.14.0)
|
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.14.0)
|
||||||
|
|
||||||
|
[1.3.0]
|
||||||
|
* Add optional sso support
|
||||||
|
|
||||||
|
[1.4.0]
|
||||||
|
* Update Synapse to 1.15.1
|
||||||
|
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.15.0)
|
||||||
|
* Advertise support for Client-Server API r0.6.0 and remove related unstable feature flags. (#6585)
|
||||||
|
* Add an option to disable autojoining rooms for guest accounts. (#6637)
|
||||||
|
* Add admin APIs to allow server admins to manage users' devices. Contributed by @dklimpel. (#7481)
|
||||||
|
* Add support for generating thumbnails for WebP images. Previously, users would see an empty box instead of preview image. Contributed by @WGH-. (#7586)
|
||||||
|
* Support the standardized m.login.sso user-interactive authentication flow. (#7630)
|
||||||
|
|
||||||
|
[1.5.0]
|
||||||
|
* Update Synapse to 1.15.2
|
||||||
|
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.15.2)
|
||||||
|
* A malicious homeserver could force Synapse to reset the state in a room to a small subset of the correct state. This affects all Synapse deployments which federate with untrusted servers. (96e9afe6)
|
||||||
|
* HTML pages served via Synapse were vulnerable to clickjacking attacks. This predominantly affects homeservers with single-sign-on enabled, but all server administrators are encouraged to upgrade. (ea26e9a9)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"tagline": "Secure & decentralized communication",
|
"tagline": "Secure & decentralized communication",
|
||||||
"version": "1.2.0",
|
"version": "1.5.0",
|
||||||
"healthCheckPath": "/",
|
"healthCheckPath": "/",
|
||||||
"httpPort": 8008,
|
"httpPort": 8008,
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
"website": "https://matrix.org",
|
"website": "https://matrix.org",
|
||||||
"contactEmail": "support@cloudron.io",
|
"contactEmail": "support@cloudron.io",
|
||||||
"icon": "logo.png",
|
"icon": "file://logo.png",
|
||||||
"tags": [
|
"tags": [
|
||||||
"im", "collaboration", "voip", "videochat", "chat"
|
"im", "collaboration", "voip", "videochat", "chat", "slack"
|
||||||
],
|
],
|
||||||
"mediaLinks": [
|
"mediaLinks": [
|
||||||
"https://cloudron-app-screenshots.s3.amazonaws.com/org.matrix.synapse/606cd9d4ccc3bee11a49f91444a2dad8947cbc7c/1.png",
|
"https://cloudron-app-screenshots.s3.amazonaws.com/org.matrix.synapse/606cd9d4ccc3bee11a49f91444a2dad8947cbc7c/1.png",
|
||||||
@@ -30,6 +30,8 @@
|
|||||||
],
|
],
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"postInstallMessage": "file://POSTINSTALL.md",
|
"postInstallMessage": "file://POSTINSTALL.md",
|
||||||
"minBoxVersion": "5.1.4",
|
"minBoxVersion": "5.3.0",
|
||||||
"documentationUrl": "https://cloudron.io/documentation/apps/synapse/"
|
"forumUrl": "https://forum.cloudron.io/category/50/matrix-synapse-riot",
|
||||||
|
"documentationUrl": "https://cloudron.io/documentation/apps/synapse/",
|
||||||
|
"optionalSso": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
This app packages Synapse <upstream>1.14.0</upstream>.
|
This app packages Synapse <upstream>1.15.2</upstream>.
|
||||||
|
|
||||||
**This package only provides the Matrix backend. A variety of clients are available
|
**This package only provides the Matrix backend. A variety of clients are available
|
||||||
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and
|
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ RUN mkdir -p /app/pkg
|
|||||||
|
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
|
||||||
ARG VERSION=v1.14.0
|
ARG VERSION=v1.15.2
|
||||||
|
|
||||||
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
|
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
|
||||||
RUN virtualenv -p python3 /app/code/env
|
RUN virtualenv -p python3 /app/code/env
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<sso>
|
Account ids are created with the username and the second level domain under which the
|
||||||
This app integrates with the Cloudron User Management. Cloudron users can register
|
app is installed e.g. `@username@domain.com`.
|
||||||
themselves using any client and use Matrix Synapse.
|
|
||||||
</sso>
|
|
||||||
|
|
||||||
**IMPORTANT: See the [docs](https://cloudron.io/documentation/apps/synapse/) on
|
For federation to work, the second level domain has to be configured to serve up the
|
||||||
how to complete setup and start using this app.**
|
`.well-known/domain.com/matrix` URI. See the
|
||||||
|
[federation docs](https://cloudron.io/documentation/apps/synapse/) on
|
||||||
|
how to do this.
|
||||||
|
|
||||||
|
|||||||
56
test/test.js
56
test/test.js
@@ -58,6 +58,37 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://matrix.org/docs/spec/client_server/latest#user-interactive-api-in-the-rest-api
|
||||||
|
function registerUser(done) {
|
||||||
|
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/register?kind=user').send({
|
||||||
|
username: username,
|
||||||
|
password: password,
|
||||||
|
inhibit_login: false
|
||||||
|
}).end(function (error, result) {
|
||||||
|
// we will first get a 401
|
||||||
|
let session = result.body.session;
|
||||||
|
console.log('session is', session);
|
||||||
|
if (result.statusCode !== 401) return done(new Error('Expecting a 401 ' + result.statusCode));
|
||||||
|
|
||||||
|
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/register?kind=user').send({
|
||||||
|
auth: {
|
||||||
|
type: 'm.login.dummy',
|
||||||
|
session: session
|
||||||
|
},
|
||||||
|
username: username,
|
||||||
|
password: password,
|
||||||
|
inhibit_login: false
|
||||||
|
}).end(function (error, result) {
|
||||||
|
if (error) return done(error);
|
||||||
|
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
|
||||||
|
|
||||||
|
console.log('registered user with id', result.user_id);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// https://matrix.org/docs/spec/client_server/latest
|
// https://matrix.org/docs/spec/client_server/latest
|
||||||
function checkLogin(done) {
|
function checkLogin(done) {
|
||||||
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/login').send({
|
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/login').send({
|
||||||
@@ -114,6 +145,31 @@ describe('Application life cycle test', function () {
|
|||||||
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// No SSO
|
||||||
|
it('install app (no sso)', function () {
|
||||||
|
execSync('cloudron install --no-sso --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can get app information', function () {
|
||||||
|
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||||
|
|
||||||
|
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
||||||
|
|
||||||
|
expect(app).to.be.an('object');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('check landing page', checkLandingPage);
|
||||||
|
it('can register new user', registerUser);
|
||||||
|
it('can login', checkLogin);
|
||||||
|
it('check autojoin', checkAutoJoinRoom);
|
||||||
|
it('create room', createRoom);
|
||||||
|
it('check room', checkRoom);
|
||||||
|
|
||||||
|
it('uninstall app', function () {
|
||||||
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
});
|
||||||
|
|
||||||
|
// SSO
|
||||||
it('install app', function () {
|
it('install app', function () {
|
||||||
execSync('cloudron install --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync('cloudron install --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user