26 Commits

Author SHA1 Message Date
Package Updates
86e97c91fe Update package version to 1.16.0 2025-04-01 15:48:05 +00:00
Girish Ramakrishnan
70e1890001 Update base image to 5.0.0 2025-04-01 17:32:33 +02:00
Package Updates
bdb97eda2f Update package version to 1.15.0 2025-01-12 08:36:48 +00:00
Renovate Bot
0da60dccf0 chore(deps): update dependency traccar/traccar to v6.6
| datasource      | package         | from | to  |
| --------------- | --------------- | ---- | --- |
| github-releases | traccar/traccar | 6.5  | 6.6 |
2025-01-12 06:21:07 +00:00
Vladimir D
94ea75bfdb "CLOUDRON_OIDC_PROVIDER_NAME is not supported" comment added
checklist added
2024-12-26 16:20:18 +04:00
Renovate Bot
4653d689d8 chore(deps): update dependency traccar/traccar to v6.5
| datasource      | package         | from | to  |
| --------------- | --------------- | ---- | --- |
| github-releases | traccar/traccar | 6.4  | 6.5 |
2024-11-11 08:29:52 +00:00
Girish Ramakrishnan
822e7fae94 Update renovate 2024-11-11 08:28:06 +00:00
Johannes Zellner
aa44cf613d Has no patch version 2024-11-10 20:45:05 +01:00
Johannes Zellner
f084b95d66 Downgrade for ci 2024-11-10 20:42:19 +01:00
Johannes Zellner
30203a4fae Prepare for ci 2024-11-10 20:42:07 +01:00
Girish Ramakrishnan
363b3bcbfe Update renovate.json5 2024-11-04 17:09:53 +00:00
Girish Ramakrishnan
cf6e0aa31e Add renovate.json5 2024-11-04 17:02:48 +00:00
Johannes Zellner
8fdae7271a Bump version 2024-09-18 13:47:27 +02:00
Johannes Zellner
a37c8c398f Make tests language independent 2024-09-18 13:40:48 +02:00
Johannes Zellner
365763a684 Update test deps 2024-09-18 11:12:51 +02:00
Johannes Zellner
6ec68a57e5 Update to 6.5 2024-09-18 11:12:34 +02:00
Girish Ramakrishnan
8d35c6b967 Version 1.13.0 2024-08-10 10:17:09 +02:00
Girish Ramakrishnan
c9ed0c7342 Update test packages 2024-08-10 10:02:48 +02:00
Girish Ramakrishnan
eb246a1d9b Update Traccar to 6.4 2024-08-10 09:49:20 +02:00
Girish Ramakrishnan
f59f9b73da Version 1.12.0 2024-07-29 09:51:07 +02:00
Girish Ramakrishnan
fe4d7e7bb3 Update test packages 2024-07-29 09:50:11 +02:00
Girish Ramakrishnan
4999cf00b1 Update Traccar to 6.3 2024-07-29 08:39:22 +02:00
Girish Ramakrishnan
e507297c6e Version 1.11.1 2024-06-13 12:00:02 +02:00
Girish Ramakrishnan
734dd6c167 delete oidc config only on first run 2024-06-13 11:14:20 +02:00
Girish Ramakrishnan
fc14c89b3e Fix up tests 2024-06-13 10:56:00 +02:00
Girish Ramakrishnan
a0e893fbde do not delete oidc config in non-sso mode 2024-06-13 10:55:52 +02:00
9 changed files with 901 additions and 278 deletions

View File

@@ -114,3 +114,50 @@
[1.11.0]
* Migrate to OIDC login
[1.11.1]
* Fix bug where OIDC configuration was cleared in non-sso mode
[1.12.0]
* Update traccar to 6.3
* [Full changelog](https://www.traccar.org/blog/traccar-6-3/)
* Health check on the volume of stored messages
* Fix push notifications for read-only users
* Use official Google Map tiles with an API key
* Add Google traffic overlay
* New reverse geocoding options
* Faster device removal without removing history
* Avoid duplicated tasks with horizontal scaling
* Add a users column to the device list
* Clear attribute on null computation result
[1.13.0]
* Update traccar to 6.4
* [Full changelog](https://www.traccar.org/blog/traccar-6-4/)
* critical fix for device freezing issue
[1.14.0]
* Update traccar to 6.5
* [Full changelog](https://www.traccar.org/blog/traccar-6-5/)
* Handling processing errors to fix freezing devices
* Option to use linked driver as the current driver
* Support multiple alarms in a single position
* Improve web app loading experience
* Google Maps fallback option with no API key
* Wialon position forwarding option
* Fix map attribution control
[1.15.0]
* Update traccar to 6.6
* [Full Changelog](https://www.traccar.org/blog/traccar-6-6/)
* Managers can now send announcements
* Fixes for multiline SMS notifications
* Early and late computed attributes
* Improvements to user session security
* Support for custom navigation links
* Enhanced speed color scheme
* Collapsible settings and reports drawer
* Improved device card UI
[1.16.0]
* Update base image to 5.0.0

View File

@@ -5,9 +5,9 @@
"description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG.md",
"tagline": "Modern GPS Tracking Platform",
"version": "1.11.0",
"upstreamVersion": "6.2",
"minBoxVersion": "7.1.0",
"version": "1.16.0",
"upstreamVersion": "6.6",
"minBoxVersion": "8.1.0",
"memoryLimit": 1073741824,
"healthCheckPath": "/",
"httpPort": 8082,
@@ -20,12 +20,21 @@
}
},
"addons": {
"sendmail": { "supportsDisplayName": false },
"sendmail": {
"supportsDisplayName": false
},
"localstorage": {},
"mysql": {},
"oidc": { "loginRedirectUri": "/api/session/openid/callback" }
"oidc": {
"loginRedirectUri": "/api/session/openid/callback"
}
},
"optionalSso": true,
"checklist": {
"change-default-password": {
"message": "Change the admin email and password credentials"
}
},
"manifestVersion": 2,
"tcpPorts": {
"OSMAND_PORT": {
@@ -70,7 +79,10 @@
"contactEmail": "support@cloudron.io",
"icon": "file://logo.png",
"tags": [
"gps", "tracking", "seek", "fleet"
"gps",
"tracking",
"seek",
"fleet"
],
"mediaLinks": [
"https://screenshots.cloudron.io/org.traccar.cloudronapp/web.png",
@@ -80,4 +92,3 @@
"forumUrl": "https://forum.cloudron.io/category/146/traccar",
"documentationUrl": "https://docs.cloudron.io/apps/traccar"
}

View File

@@ -1,11 +1,12 @@
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
FROM cloudron/base:5.0.0@sha256:04fd70dbd8ad6149c19de39e35718e024417c3e01dc9c6637eaf4a41ec4e596c
RUN mkdir -p /app/code
WORKDIR /app/code
ARG VERSION=6.2
# renovate: datasource=github-releases depName=traccar/traccar versioning=regex:^(?<major>\d+)\.(?<minor>\d+)\.?(?<patch>\d+)?$ extractVersion=^v(?<version>.+)$
ARG TRACCAR_VERSION=6.6
RUN wget https://github.com/traccar/traccar/releases/download/v${VERSION}/traccar-linux-64-${VERSION}.zip -O traccar.zip && \
RUN wget https://github.com/traccar/traccar/releases/download/v${TRACCAR_VERSION}/traccar-linux-64-${TRACCAR_VERSION}.zip -O traccar.zip && \
unzip traccar.zip && \
./traccar.run --target /app/code/ --noexec && \
rm README.txt traccar.zip traccar.run

View File

@@ -3,8 +3,6 @@ This app is pre-setup with an admin account. The initial credentials are:
**Username**: admin@cloudron.local<br/>
**Password**: admin<br/>
Please change the admin email and password credentials immediately.
<sso>
By default, Cloudron users have regular users permissions. Permissions can be updated on the user profile page in the admin back-end.
</sso>

4
renovate.json5 Normal file
View File

@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>devops/renovator//default.renovate.json5"]
}

View File

@@ -39,6 +39,7 @@ ensure_admin_account() {
echo "=> Ensure traccar.xml config"
if [[ ! -f /app/data/traccar.xml ]]; then
cp /app/pkg/traccar.xml.template /app/data/traccar.xml
[[ -z "${CLOUDRON_OIDC_ISSUER:-}" ]] && sed -e 's/^.*openid\..*$//g' -i /app/data/traccar.xml # do this only first run
fi
echo "=> Ensure database settings"
@@ -52,19 +53,10 @@ xmlstarlet ed --inplace \
# origin
xmlstarlet ed --inplace --update '//properties/entry[@key="web.url"]' -v "${CLOUDRON_APP_ORIGIN}" /app/data/traccar.xml
# get rid of ldap, can be removed in the next release
sed -e 's/ldap.url/openid.clientId/g' \
-e 's/ldap.base/openid.clientSecret/g' \
-e 's/ldap.idAttribute/openid.issuerUrl/g' \
-e 's/ldap.searchFilter/openid.authUrl/g' \
-e 's/ldap.user/openid.tokenUrl/g' \
-e 's/ldap.password/openid.userInfoUrl/g' \
-e 's/^.*ldap\..*$//g' \
-i /app/data/traccar.xml
# OIDC
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
echo "=> Ensure OIDC settings"
# CLOUDRON_OIDC_PROVIDER_NAME is not supported
xmlstarlet ed --inplace \
--update '//properties/entry[@key="openid.clientId"]' -v "${CLOUDRON_OIDC_CLIENT_ID}" \
--update '//properties/entry[@key="openid.clientSecret"]' -v "${CLOUDRON_OIDC_CLIENT_SECRET}" \
@@ -73,8 +65,6 @@ if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
--update '//properties/entry[@key="openid.tokenUrl"]' -v "${CLOUDRON_OIDC_TOKEN_ENDPOINT}" \
--update '//properties/entry[@key="openid.userInfoUrl"]' -v "${CLOUDRON_OIDC_PROFILE_ENDPOINT}" \
/app/data/traccar.xml
else
sed -e 's/^.*openid\..*$//g' -i /app/data/traccar.xml
fi
# email

1025
test/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,10 +10,10 @@
"license": "ISC",
"devDependencies": {
"expect.js": "^0.3.1",
"mocha": "^10.4.0",
"selenium-webdriver": "^4.21.0"
"mocha": "^11.0.1",
"selenium-webdriver": "^4.27.0"
},
"dependencies": {
"chromedriver": "^125.0.3"
"chromedriver": "^131.0.5"
}
}

View File

@@ -1,10 +1,6 @@
#!/usr/bin/env node
/* jshint esversion: 8 */
/* global describe */
/* global before */
/* global after */
/* global it */
/* global it, xit, describe, before, after, afterEach */
'use strict';
@@ -12,6 +8,7 @@ require('chromedriver');
const execSync = require('child_process').execSync,
expect = require('expect.js'),
fs = require('fs'),
path = require('path'),
{ Builder, By, Key, until } = require('selenium-webdriver'),
{ Options } = require('selenium-webdriver/chrome');
@@ -24,7 +21,7 @@ if (!process.env.USERNAME || !process.env.EMAIL || !process.env.PASSWORD) {
describe('Application life cycle test', function () {
this.timeout(0);
const LOCATION = 'test';
const LOCATION = process.env.LOCATION || 'test';
const TEST_TIMEOUT = 20000;
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
const DEVICE_NAME = 'FancyDevice';
@@ -39,16 +36,27 @@ describe('Application life cycle test', function () {
let athenticated_by_oidc = false;
before(function () {
const options = new Options().windowSize({ width: 1280, height: 1024 });
if (process.env.HEADLESS) options.addArguments('headless');
browser = new Builder().forBrowser('chrome').setChromeOptions(options).build();
const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 });
if (process.env.CI) chromeOptions.addArguments('no-sandbox', 'disable-dev-shm-usage', 'headless');
browser = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
if (!fs.existsSync('./screenshots')) fs.mkdirSync('./screenshots');
});
after(function () {
browser.quit();
});
afterEach(async function () {
if (!process.env.CI || !app) return;
const currentUrl = await browser.getCurrentUrl();
if (!currentUrl.includes(app.domain)) return;
expect(this.currentTest.title).to.be.a('string');
const screenshotData = await browser.takeScreenshot();
fs.writeFileSync(`./screenshots/${new Date().getTime()}-${this.currentTest.title.replaceAll(' ', '_')}.png`, screenshotData, 'base64');
});
async function waitForElement(elem) {
await browser.wait(until.elementLocated(elem), TEST_TIMEOUT);
await browser.wait(until.elementIsVisible(browser.findElement(elem)), TEST_TIMEOUT);
@@ -71,7 +79,7 @@ describe('Application life cycle test', function () {
await waitForElement(By.xpath('//span[text()="Account"]'));
}
async function loginOIDC(username, password) {
async function loginOIDC(username, password, alreadyAuthenticated = true) {
browser.manage().deleteAllCookies();
await browser.get(`https://${app.fqdn}/login`);
await browser.sleep(2000);
@@ -80,15 +88,11 @@ describe('Application life cycle test', function () {
await browser.findElement(By.xpath('//button[contains(., "Login with OpenID")]')).click();
await browser.sleep(2000);
if (!athenticated_by_oidc) {
await waitForElement(By.xpath('//input[@name="username"]'));
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
await browser.sleep(2000);
await browser.findElement(By.xpath('//button[@type="submit" and contains(text(), "Sign in")]')).click();
await browser.sleep(2000);
athenticated_by_oidc = true;
if (!alreadyAuthenticated) {
await waitForElement(By.id('inputUsername'));
await browser.findElement(By.id('inputUsername')).sendKeys(username);
await browser.findElement(By.id('inputPassword')).sendKeys(password);
await browser.findElement(By.id('loginSubmitButton')).click();
}
await browser.sleep(3000);
@@ -144,7 +148,7 @@ describe('Application life cycle test', function () {
it('device exists', deviceExists);
it('can logout', logout);
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD));
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD, false));
it('can logout', logout);
it('can restart app', function () { execSync(`cloudron restart --app ${app.id}`); });
@@ -198,8 +202,7 @@ describe('Application life cycle test', function () {
it('device exists', deviceExists);
it('can logout', logout);
// LDAP login
it('can login as normal user with email', login.bind(null, process.env.EMAIL, process.env.PASSWORD));
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD));
it('can logout', logout);
it('can update', function () { execSync(`cloudron update --app ${app.id}`, EXEC_ARGS); });