| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- [#upgrade-notes]
- = Upgrade Notes
- OliveTin releases are published to GitHub, and the release notes are contained there. This page includes a summary of "Upgrade Notes" for breaking changes between releases.
- == Next release (unreleased)
- [#webhook-auth-type-required]
- === Webhooks need an `authType`, and `authType: none` must be set for open webhooks
- A webhook in `execOnWebhook` without an `authType` used to accept every request that matched. It is now rejected, and the Diagnostics page shows an error for it (code `webhook_auth_type_unset`). Webhooks that use a GitHub `template` are not affected, because the template sets its own `authType`.
- If you have webhooks without an `authType`, add one. Use `authType: bearer`, `hmac-sha256`, `hmac-sha1` or `basic` with a `secret`, or set `authType: none` if the webhook should accept requests from anyone who can reach `/webhooks`. See xref:action_execution/onwebhook.adoc#every-webhook-needs-an-authtype[Webhook Authentication].
- [#whoami-session-fingerprint]
- === `WhoAmI` no longer returns the session ID
- The `WhoAmI` API used to return the caller's session ID in a `sid` field. That value is the credential held in the `HttpOnly` session cookie, so it should not be readable from a response. `sid` has been removed, and `WhoAmI` now returns `sessionFingerprint` instead: a short value derived from the session ID that tells sessions apart but cannot be used to log in.
- This only affects API clients or scripts that read `sid` from `WhoAmI`. If you used it to get the session cookie, take the cookie from the `Set-Cookie` header of the login response instead. If you used it to identify a session, use `sessionFingerprint`. See xref:api/login.adoc[Login].
- [#example-config-guest-actions]
- === The example config only lets guests run harmless demo actions
- The example `config.yaml` shipped with OliveTin (including the container image and the macOS example) used to let guests run, see logs for, and kill every example action. It now sets `defaultPermissions` to only let guests view actions. A `guest_actions` ACL lets guests run the harmless demo actions, `admin_acl` gives users in the `admins` usergroup access to every action, and a `system_triggers` ACL lets startup, cron and webhook triggers keep working. The "Setup easy SSH" and "Ping host" actions no longer have webhook triggers. The webhook examples are now "Check disk space" and a new "Run script on webhook" action, which both use `exec:` and take no arguments.
- Upgrading does not change your existing `config.yaml`. If your config started from the example and still has its example actions, review which of them guests can run. This is particularly important for actions that change the system, run scripts, or take a URL or other input from the user, such as "Get OliveTin Theme", "Setup easy SSH", "Delete old backups" and "Restart Docker Container". Either remove the actions you do not use, or set up permissions like the new example config. See xref:security/example_some_admin_actions.adoc[Some actions require admin] and xref:security/acl.adoc#acls-for-triggers[ACLs for triggers].
- [#webhook-trigger-chains-exec-only]
- === Actions triggered from webhooks can no longer use `shell:`
- Webhook-triggered actions were already required to use `exec:`. This rule now also applies to every action started through `triggers` from a webhook-triggered action, at any depth, including `shellAfterCompleted`. Previously these triggered actions could still run `shell:` commands.
- If a webhook action in your config triggers an action that uses `shell:` or `shellAfterCompleted`, that action will now fail with "webhooks cannot use Shell execution". Change it to use `exec:` instead. See xref:action_execution/shellvsexec.adoc[Shell vs Exec].
- == 2024.08.14
- === Navigation change - Subpaths no longer supported
- In the past, OliveTin supported subpaths in the URL, for example, `http://yourServer:1337/olivetin/` would load the OliveTin web interface. This was convenient for people who wanted to run OliveTin on a subpath of their domain for some reason, but it actually creates a lot of complexity in the code, and makes it harder to maintain. One particular change that was wanted was to be able to link to specific pages in OliveTin, for example, `http://yourServer:1337/logs` or `http://yourServer:1337/myDashboard/myFolder` - this became incredibly difficult to implement with the subpath support.
- Therefore, OliveTin no longer supports subpaths in the URL. If you have been using OliveTin with a subpath, you will need to change your configuration to use a subdomain or a different port.
- == 2024.04.09
- === Themes Directory (for theme users)
- ==== Background
- Until now, OliveTin has served the themes directory from the "webui" directory, normally `/var/www/olivetin/themes` on most installations. If you wanted to install a theme, you would put the theme in to that directory.
- This was a bit cumbersome, because OliveTin treats the content of the "webui" directory as disposable / part of the system, whereas themes are much more like "user data" and "configuration". It also meant that people using Linux Containers had to bind-mount a separate directory for themes.
- ==== Upgrade
- Now themes are stored in the "configdir" (wherever OliveTin finds it's config file, eg `/config` in containers), under the subdirectory `custom-webui/themes`. OliveTin will try to create the `custom-webui` folder in your configdir if it doesn't find it.
- The advantage of this change is that themes are stored with your config, as part of your data.
- To upgrade, simply move any themes you might have into your configdir, under `custom-webui/themes/`. eg:
- [source,yaml]
- ----
- .
- ├── config.yaml
- ├── custom-webui
- │ └── themes
- │ └── custom-icons
- │ ├── icon.png
- │ └── theme.css
- ├── entities
- │ ├── containers.json
- │ ├── heating.yaml
- │ ├── servers2.yml
- │ ├── servers.yaml
- │ └── systemd_units.json
- └── installation-id.txt
- ----
- === Theme Asset Paths (for theme developers)
- ==== Background
- OliveTin had to send the theme name to the browser, so that some javascript could then request `http://yourServer:1337/themes/myTheme/theme.css`, and load it as a stylesheet. This had the following problems;
- . This was slow (could take up to a second)
- . This creates a "flash" in the browser, as the new theme.css is loaded over the top of the existing stylesheet.
- . Browsers could not cache this theme.css with the page load.
- ==== Upgrade
- The new behavior is that OliveTin will always try to load `http://yourServer:1337/theme.css` as part of the static HTML that is sent to the browser. This means that regular caching can cache the theme.css, and this effectively elliminates the slowness and "flashing" when the browser renders the page.
- Internally, OliveTin maps `http://yourServer:1337/theme.css` to the `theme.css` of whatever the theme is set to with `themeName`, for example, it could map to `themes/myTheme/theme.css`.
- As a theme developer, normally you would reference a background image, or similar using `./background.png`, but OliveTin is loading the theme.css as the directory root, and the themes' assets from the custom-webui theme directory. Therefore you need to update paths to be like; `background-image: "/custom-webui/themes/myTheme/background.png`.
|