1
0
mirror of https://git.cloudron.io/cloudron/syncthing-app synced 2025-09-13 08:19:09 +00:00

Compare commits

...

7 Commits

Author SHA1 Message Date
Girish Ramakrishnan
1fabf3766e Version 1.26.0-1 2023-12-12 12:39:31 +01:00
Girish Ramakrishnan
e276328b3b Remove admin note
there is no admin. just one user
2023-12-12 12:39:15 +01:00
Girish Ramakrishnan
15c363a5f7 Version 1.26.0 2023-12-12 11:33:35 +01:00
Girish Ramakrishnan
575262b21e Update test packages 2023-12-12 11:17:31 +01:00
Vladimir D
76ed36f766 LDAP auth implemented 2023-12-11 15:21:30 +04:00
Johannes Zellner
4f5c579e4c Update test deps 2023-12-11 10:58:44 +01:00
Johannes Zellner
687d751dd9 Bump version 2023-12-11 10:58:34 +01:00
8 changed files with 84 additions and 29 deletions

View File

@@ -426,3 +426,13 @@
* Update Syncthing to 1.26.1
* [Full changelog](https://github.com/syncthing/syncthing/releases/tag/v1.26.1)
[1.25.2]
* Update Syncthing to 1.27.1
* [Full changelog](https://github.com/syncthing/syncthing/releases/tag/v1.27.1)
* #9253: Permission error on folder causes "connection error" dialog when opening folder editor
* #9269: panic: nil pointer dereference in (*indexHandlerRegistry).startLocked
* #9274: Missing lock in DeviceStatistics ("fatal error: concurrent map read and map write")
[1.26.0]
* Add LDAP support

View File

@@ -5,12 +5,13 @@
"description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG",
"tagline": "Decentralized file synchronization",
"version": "1.25.1",
"upstreamVersion": "1.26.1",
"version": "1.26.0-1",
"upstreamVersion": "1.27.1",
"healthCheckPath": "/healthcheck",
"httpPort": 8000,
"addons": {
"localstorage": {}
"localstorage": {},
"ldap": {}
},
"tcpPorts": {
"SYNC_PORT": {
@@ -36,5 +37,6 @@
"https://screenshots.cloudron.io/net.syncthing.cloudronapp2/2.png",
"https://screenshots.cloudron.io/net.syncthing.cloudronapp2/3.png"
],
"optionalSso": true,
"postInstallMessage": "file://POSTINSTALL.md"
}

View File

@@ -3,7 +3,7 @@ FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768
RUN mkdir -p /app/code
WORKDIR /app/code
ARG VERSION=1.26.1
ARG VERSION=1.27.1
RUN wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz -O - | tar -xz -C /app/code --strip-components=1

View File

@@ -1,7 +1,13 @@
This app is pre-setup with an admin account. The initial credentials are:
<nosso>
This app is pre-setup with an account. The initial credentials are:
**Username**: admin<br/>
**Password**: changeme<br/>
Please change the admin password immediately.
</nosso>
<sso>
Note that all users manage and synchronize the same set of files.
</sso>

View File

@@ -17,8 +17,21 @@ if [[ ! -f /app/data/config/config.xml ]]; then
--update "//configuration/options/defaultFolderPath" -v '/app/data/folders' \
--update "//configuration/options/urAccepted" -v '-1' \
/app/data/config/config.xml
fi
if [[ -n ${CLOUDRON_LDAP_HOST:-} ]]; then
xmlstarlet ed --inplace \
--subnode "//configuration/gui" -t elem -n "authMode" -v "ldap" \
--subnode "//configuration/ldap" -t elem -n "address" -v "${CLOUDRON_LDAP_HOST:-}:${CLOUDRON_LDAP_PORT}" \
--subnode "//configuration/ldap" -t elem -n "bindDN" -v "${CLOUDRON_LDAP_BIND_DN:-}" \
--subnode "//configuration/ldap" -t elem -n "insecureSkipVerify" -v "true" \
--subnode "//configuration/ldap" -t elem -n "searchBaseDN" -v "${CLOUDRON_LDAP_USERS_BASE_DN:-}" \
--subnode "//configuration/ldap" -t elem -n "searchFilter" -v "(&amp;(objectclass=user)(|(username=%s)(mail=%s)))" \
/app/data/config/config.xml
fi
# Set the listenAddress and the gui enabled to make sure user doesnt lock themselves out by accident.
sed -e "s,<listenAddress>.*</listenAddress>,<listenAddress>tcp://:${SYNC_PORT}</listenAddress>," -i /app/data/config/config.xml
sed -e 's,<gui .*>,<gui enabled="true" tls="false" debugging="false">,' -i /app/data/config/config.xml

28
test/package-lock.json generated
View File

@@ -9,10 +9,10 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"chromedriver": "^119.0.1",
"chromedriver": "^120.0.0",
"expect.js": "^0.3.1",
"mocha": "^10.2.0",
"selenium-webdriver": "^4.15.0",
"selenium-webdriver": "^4.16.0",
"superagent": "^8.1.2"
}
},
@@ -236,9 +236,9 @@
}
},
"node_modules/chromedriver": {
"version": "119.0.1",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz",
"integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==",
"version": "120.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-120.0.0.tgz",
"integrity": "sha512-LGy2LhWRBiqDarFIU8gQ43EEyj+07Tc3JuUhthkESAwZ99lrifSnKZwKU0aVwansU84+k6bt71z7K3dkk65gZg==",
"hasInstallScript": true,
"dependencies": {
"@testim/chrome-version": "^1.1.4",
@@ -1166,9 +1166,9 @@
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/selenium-webdriver": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.15.0.tgz",
"integrity": "sha512-BNG1bq+KWiBGHcJ/wULi0eKY0yaDqFIbEmtbsYJmfaEghdCkXBsx1akgOorhNwjBipOr0uwpvNXqT6/nzl+zjg==",
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.16.0.tgz",
"integrity": "sha512-IbqpRpfGE7JDGgXHJeWuCqT/tUqnLvZ14csSwt+S8o4nJo3RtQoE9VR4jB47tP/A8ArkYsh/THuMY6kyRP6kuA==",
"dependencies": {
"jszip": "^3.10.1",
"tmp": "^0.2.1",
@@ -1633,9 +1633,9 @@
}
},
"chromedriver": {
"version": "119.0.1",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz",
"integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==",
"version": "120.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-120.0.0.tgz",
"integrity": "sha512-LGy2LhWRBiqDarFIU8gQ43EEyj+07Tc3JuUhthkESAwZ99lrifSnKZwKU0aVwansU84+k6bt71z7K3dkk65gZg==",
"requires": {
"@testim/chrome-version": "^1.1.4",
"axios": "^1.6.0",
@@ -2300,9 +2300,9 @@
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"selenium-webdriver": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.15.0.tgz",
"integrity": "sha512-BNG1bq+KWiBGHcJ/wULi0eKY0yaDqFIbEmtbsYJmfaEghdCkXBsx1akgOorhNwjBipOr0uwpvNXqT6/nzl+zjg==",
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.16.0.tgz",
"integrity": "sha512-IbqpRpfGE7JDGgXHJeWuCqT/tUqnLvZ14csSwt+S8o4nJo3RtQoE9VR4jB47tP/A8ArkYsh/THuMY6kyRP6kuA==",
"requires": {
"jszip": "^3.10.1",
"tmp": "^0.2.1",

View File

@@ -9,10 +9,10 @@
"author": "",
"license": "ISC",
"dependencies": {
"chromedriver": "^119.0.1",
"chromedriver": "^120.0.0",
"expect.js": "^0.3.1",
"mocha": "^10.2.0",
"selenium-webdriver": "^4.15.0",
"selenium-webdriver": "^4.16.0",
"superagent": "^8.1.2"
}
}

View File

@@ -19,6 +19,11 @@ const execSync = require('child_process').execSync,
{ Builder, By, until } = require('selenium-webdriver'),
{ Options } = require('selenium-webdriver/chrome');
if (!process.env.USERNAME || !process.env.PASSWORD) {
console.log('USERNAME and PASSWORD env vars need to be set');
process.exit(1);
}
describe('Application life cycle test', function () {
this.timeout(0);
@@ -29,7 +34,9 @@ describe('Application life cycle test', function () {
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
let browser, app;
const username = 'admin', password = 'changeme';
const adminUsername = 'admin', adminPassword = 'changeme';
let username = process.env.USERNAME;
let password = process.env.PASSWORD;
before(function () {
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
@@ -50,7 +57,7 @@ describe('Application life cycle test', function () {
await browser.wait(until.elementIsVisible(browser.findElement(elem)), TEST_TIMEOUT);
}
async function login() {
async function login(username, password) {
await browser.manage().deleteAllCookies();
await browser.get('https://' + app.fqdn);
await waitForElement(By.id('user'));
@@ -86,10 +93,25 @@ describe('Application life cycle test', function () {
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
it('install app', function () { execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, EXEC_ARGS); });
// NO SSO
it('install app (NO SSO)', function () { execSync('cloudron install --no-sso --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, EXEC_ARGS); });
it('can get app information', getAppInfo);
it('can login', login);
it('can admin login', login.bind(null, adminUsername, adminPassword));
it('can load page', loadPage);
it('can add folder', addFolder);
it('can check folder', checkFolder);
it('uninstall app', async function () {
await browser.get('about:blank');
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
});
// SSO
it('install app (SSO)', function () { execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, EXEC_ARGS); });
it('can get app information', getAppInfo);
it('can login', login.bind(null, username, password));
it('can load page', loadPage);
it('can add folder', addFolder);
@@ -100,7 +122,7 @@ describe('Application life cycle test', function () {
await timers.setTimeout(5000);
});
it('can login', login);
it('can login', login.bind(null, username, password));
it('can load page', loadPage);
it('can check folder', checkFolder);
@@ -111,7 +133,7 @@ describe('Application life cycle test', function () {
});
it('can get app information', getAppInfo);
it('can login', login);
it('can login', login.bind(null, username, password));
it('can load page', loadPage);
it('can check folder', checkFolder);
@@ -126,7 +148,8 @@ describe('Application life cycle test', function () {
await timers.setTimeout(30000);
});
it('can get app information', getAppInfo);
it('can login', login);
// next release it should be replaced with LDAP login
it('can admin login', login.bind(null, adminUsername, adminPassword));
it('can load page', loadPage);
it('can add folder', addFolder);
it('can update', async function () {
@@ -134,7 +157,8 @@ describe('Application life cycle test', function () {
execSync('cloudron update --app ' + LOCATION, EXEC_ARGS);
await timers.setTimeout(30000);
});
it('can login', login);
// next release it should be replaced with LDAP login
it('can admin login', login.bind(null, adminUsername, adminPassword));
it('can check folder', checkFolder);
it('uninstall app', async function () {