Skip to content

Commit 23f2c1a

Browse files
authored
🔀 Merge pull request #488 from Lissy93/FIX/general-issues
[FIX] General issues and improvements Fixes #452 Fixes #454 Fixes #455 Fixes #463 Fixes #479 Fixes #482 Fixes #483 Fixes #485 Fixes #486 Fixes #487
2 parents ed3cc78 + 075bca9 commit 23f2c1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+920
-294
lines changed

.github/CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 🐛 2.0.3 - Bug Fixes [PR #488](https://github.com/Lissy93/dashy/pull/488)
4+
- Press enter to submit login form (Re: #483)
5+
- Allow disabling write to local storage and disk (Re: #485)
6+
- Fix malformed YAML from export config (Re: #482)
7+
- Allow global option for useProxy (Re: #486)
8+
- Look into arrow key navigation error (Re: #463)
9+
- Disallow displaying config (Re: #455)
10+
- Round values in Glances Alerts widget (Re: #454)
11+
- Create a CPU temp widget (Re: #452)
12+
- Add to docs: Keycloak in Kubernetes (Re: #479)
13+
- Add a widget for displaying images (Re: #487)
14+
315
## ⬆️ 2.0.2 - Dependency Updates [PR #471](https://github.com/Lissy93/dashy/pull/471)
416
- Updates Alpine version for main Dockerfile
517
- Updates node_modules to latest stable versions

.github/workflows/docker-build-publish.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Builds, scans and tests the multi-architecture docker image
2-
# Then releases it to the DockerHub, GHCR and Quay registries
1+
# Scans, builds and releases a multi-architecture docker image
32
name: 🐳 Build + Publish Multi-Platform Image
43

54
on:
@@ -77,6 +76,9 @@ jobs:
7776
username: ${{ secrets.ACR_USERNAME }}
7877
password: ${{ secrets.ACR_PASSWORD }}
7978

79+
- name: 🚦 Check Registry Status
80+
uses: crazy-max/ghaction-docker-status@v1
81+
8082
- name: ⚒️ Build and push
8183
uses: docker/build-push-action@v2
8284
with:
@@ -87,11 +89,12 @@ jobs:
8789
labels: ${{ steps.meta.outputs.labels }}
8890
push: true
8991

90-
# - name: 💬 Set Docker Hub Description
91-
# uses: peter-evans/dockerhub-description@v2
92-
# with:
93-
# repository: lissy93/dashy
94-
# readme-filepath: ./README.md
95-
# short-description: Dashy - A self-hosted start page for your server
96-
# username: ${{ secrets.DOCKER_USERNAME }}
97-
# password: ${{ secrets.DOCKER_PASSWORD }}
92+
- name: 💬 Set Docker Hub Description
93+
uses: peter-evans/dockerhub-description@v2
94+
with:
95+
repository: lissy93/dashy
96+
readme-filepath: ./docker/docker-readme.md
97+
short-description: Dashy - A self-hosted start page for your server
98+
username: ${{ secrets.DOCKER_USERNAME }}
99+
password: ${{ secrets.DOCKER_PASSWORD }}
100+

Dockerfile

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
FROM node:16.13.2-alpine AS BUILD_IMAGE
22

3+
# Set the platform to build image for
34
ARG TARGETPLATFORM
45
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
56

6-
# Install additional tools needed on arm64 and armv7
7+
# Install additional tools needed if on arm64 / armv7
78
RUN \
89
case "${TARGETPLATFORM}" in \
910
'linux/arm64') apk add --no-cache python3 make g++ ;; \
@@ -23,7 +24,7 @@ COPY . ./
2324
# Build initial app for production
2425
RUN yarn build
2526

26-
# Build the final image
27+
# Production stage
2728
FROM node:16.13.2-alpine
2829

2930
# Define some ENV Vars
@@ -44,8 +45,8 @@ COPY --from=BUILD_IMAGE /app ./
4445
ENTRYPOINT [ "/sbin/tini", "--" ]
4546
CMD [ "yarn", "build-and-start" ]
4647

47-
# Expose given port
48+
# Expose the port
4849
EXPOSE ${PORT}
4950

50-
# Run simple healthchecks every 5 mins, to check the Dashy's everythings great
51+
# Run simple healthchecks every 5 mins, to check that everythings still great
5152
HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check

docker/docker-readme.md

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<h1 align="center">Dashy</h1>
2+
<p align="center">
3+
<i>Dashy helps you organize your self-hosted services by making them accessible from a single place</i>
4+
<br/>
5+
<img width="120" src="https://i.ibb.co/yhbt6CY/dashy.png" />
6+
<br/>
7+
<b><a href="https://github.com/Lissy93/dashy/blob/master/docs/showcase.md">User Showcase</a></b> | <b><a href="https://demo.dashy.to">Live Demo</a></b> | <b><a href="https://github.com/Lissy93/dashy/blob/master/docs/quick-start.md">Getting Started</a></b> | <b><a href="https://dashy.to/docs">Documentation</a></b> | <b><a href="https://github.com/Lissy93/dashy">GitHub</a></b>
8+
<br/><br/>
9+
<a href="https://github.com/awesome-selfhosted/awesome-selfhosted#personal-dashboards">
10+
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome Self-Hosted">
11+
</a>
12+
<a href="https://github.com/Lissy93/dashy/blob/master/LICENSE">
13+
<img src="https://img.shields.io/badge/License-MIT-0aa8d2?logo=opensourceinitiative&logoColor=fff" alt="License MIT">
14+
</a>
15+
<a href="https://github.com/Lissy93/dashy/blob/master/.github/CHANGELOG.md">
16+
<img src="https://img.shields.io/github/package-json/v/lissy93/dashy?logo=azurepipelines&amp;color=0aa8d2" alt="Current Version">
17+
</a>
18+
<a href="https://hub.docker.com/r/lissy93/dashy">
19+
<img src="https://img.shields.io/docker/pulls/lissy93/dashy?logo=docker&color=0aa8d2&logoColor=fff" alt="Docker Pulls">
20+
</a>
21+
<a href="http://as93.link/dashy-build-status">
22+
<img src="https://badgen.net/github/status/lissy93/dashy?icon=github" alt="GitHub Status">
23+
</a>
24+
<a href="https://snyk.io/test/github/lissy93/dashy">
25+
<img src="https://snyk.io/test/github/lissy93/dashy/badge.svg" alt="Known Vulnerabilities">
26+
</a>
27+
</p>
28+
29+
## Features 🌈
30+
31+
- 🔎 Instant search by name, domain, or tags + customizable hotkeys & keyboard shortcuts
32+
- 🎨 Multiple built-in color themes, with UI color editor and support for custom CSS
33+
- 🧸 Many icon options - Font-Awesome, homelab icons, auto-fetching Favicon, images, emojis, etc.
34+
- 🚦 Status monitoring for each of your apps/links for basic availability and uptime checking
35+
- 📊 Widgets for displaying info and dynamic content from your self-hosted services
36+
- 💂 Optional authentication with multi-user access, configurable privileges, and SSO support
37+
- 🌎 Multi-language support, with 10+ human-translated languages, and more on the way
38+
- ☁ Optional, encrypted, free off-site cloud backup and restore feature available
39+
- 💼 A workspace view, for easily switching between multiple apps simultaneously
40+
- 🛩️ A minimal view, for use as a fast-loading browser Startpage
41+
- 🖱️ Choose app launch method, either new tab, same tab, a pop-up modal, or in the workspace view
42+
- 📏 Customizable layout, sizes, text, component visibility, sort order, behavior, etc.
43+
- 🖼️ Options for a full-screen background image, custom nav-bar links, HTML footer, title, etc.
44+
- 🚀 Easy to setup with Docker, or on bare metal, or with 1-Click cloud deployment
45+
- ⚙️ Easy configuration, either through the UI, or using a YAML file
46+
- ✨ Under active development with improvements and new features added regularly
47+
- 🤏 Small bundle size, fully responsive UI, and PWA for basic offline access
48+
- 🆓 100% free and open-source
49+
- 🔐 Strong focus on privacy
50+
- 🌈 And loads more...
51+
52+
## Demo ⚡
53+
54+
**Live Instances**: [Demo 1](https://demo.dashy.to) (Live Demo) ┆ [Demo 2](https://live.dashy.to) (Dashy Links) ┆ [Demo 3](https://dev.dashy.to) (Dev Preview)
55+
56+
**Screenshots**: Checkout the [Showcase](https://github.com/Lissy93/dashy/blob/master/docs/showcase.md), to see example dashboards from the community
57+
58+
**Spin up your own demo**: [![One-Click Deploy with PWD](https://img.shields.io/badge/Play--with--Docker-Deploy-2496ed?style=flat-square&logo=docker)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml) or [`docker run -p 8080:80 lissy93/dashy`](./docs/quick-start.md)
59+
60+
61+
<p align="center">
62+
<img width="800" src="https://i.ibb.co/L8YbNNc/dashy-demo2.gif" alt="Demo" />
63+
</p>
64+
65+
66+
**[⬆️ Back to Top](#dashy)**
67+
68+
---
69+
70+
## Getting Started 🛫
71+
72+
To deploy Dashy with Docker, just run `docker run -p 8080:80 lissy93/dashy`, then open `http://localhost:8080`
73+
74+
For full list of options and a Docker compose file, see the [Deployment Docs](https://github.com/Lissy93/dashy/blob/master/docs/deployment.md).
75+
76+
Dashy can also be run on bare metal using Node.js, or deployed to a cloud service, using the 1-Click deploy script.
77+
78+
---
79+
80+
## Documentation 📝
81+
82+
#### Running Dashy
83+
- **[Quick Start](https://github.com/Lissy93/dashy/blob/master/docs/quick-start.md)** - TDLR guide on getting Dashy up and running
84+
- **[Deployment](https://github.com/Lissy93/dashy/blob/master/docs/deployment.md)** - Full guide on deploying Dashy either locally or online
85+
- **[Configuring](https://github.com/Lissy93/dashy/blob/master/docs/configuring.md)** - Complete list of all available options in the config file
86+
- **[App Management](https://github.com/Lissy93/dashy/blob/master/docs/management.md)** - Managing your app, updating, security, web server configuration, etc
87+
- **[Troubleshooting](https://github.com/Lissy93/dashy/blob/master/docs/troubleshooting.md)** - Common errors and problems, and how to fix them
88+
89+
#### Feature Docs
90+
- **[Authentication](https://github.com/Lissy93/dashy/blob/master/docs/authentication.md)** - Guide to setting up authentication to protect your dashboard
91+
- **[Alternate Views](https://github.com/Lissy93/dashy/blob/master/docs/alternate-views.md)** - Outline of available pages / views and item opening methods
92+
- **[Backup & Restore](https://github.com/Lissy93/dashy/blob/master/docs/backup-restore.md)** - Guide to backing up config with Dashy's cloud sync feature
93+
- **[Icons](https://github.com/Lissy93/dashy/blob/master/docs/icons.md)** - Outline of all available icon types for sections and items, with examples
94+
- **[Language Switching](https://github.com/Lissy93/dashy/blob/master/docs/multi-language-support.md)** - Details on how to switch language, or add a new locale
95+
- **[Status Indicators](https://github.com/Lissy93/dashy/blob/master/docs/status-indicators.md)** - Using Dashy to monitor uptime and status of your apps
96+
- **[Searching & Shortcuts](https://github.com/Lissy93/dashy/blob/master/docs/searching.md)** - Searching, launching methods + keyboard shortcuts
97+
- **[Theming](https://github.com/Lissy93/dashy/blob/master/docs/theming.md)** - Complete guide to applying, writing and modifying themes + styles
98+
- **[Widgets](https://github.com/Lissy93/dashy/blob/master/docs/widgets.md)** - List of all dynamic content widgets, with usage guides and examples
99+
100+
#### Development and Contributing
101+
- **[Developing](https://github.com/Lissy93/dashy/blob/master/docs/developing.md)** - Running Dashy development server locally, and general workflow
102+
- **[Development Guides](https://github.com/Lissy93/dashy/blob/master/docs/development-guides.md)** - Common development tasks, to help new contributors
103+
- **[Contributing](https://github.com/Lissy93/dashy/blob/master/docs/contributing.md)** - How you can help keep Dashy alive
104+
- **[Showcase](https://github.com/Lissy93/dashy/blob/master/docs/showcase.md)** - See how others are using Dashy, and share your dashboard
105+
- **[Credits](https://github.com/Lissy93/dashy/blob/master/docs/credits.md)** - List of people and projects that have made Dashy possible
106+
- **[Release Workflow](https://github.com/Lissy93/dashy/blob/master/docs/release-workflow.md)** - Info about releases, CI and automated tasks
107+
108+
---
109+
110+
## License 📜
111+
112+
Dashy is Licensed under [MIT X11](https://en.wikipedia.org/wiki/MIT_License)
113+
114+
```
115+
Copyright © 2021 Alicia Sykes <https://aliciasykes.com>
116+
117+
Permission is hereby granted, free of charge, to any person obtaining a copy of this
118+
software and associated documentation files (the "Software"), to deal in the Software
119+
without restriction, including without limitation the rights to use, copy, modify, merge,
120+
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
121+
persons to whom the Software is furnished to do so, subject to the following conditions:
122+
123+
The above copyright notice and this permission notice shall be included in all copies or
124+
substantial portions of the Software.
125+
126+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
127+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
128+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
129+
LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
130+
TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE
131+
OR OTHER DEALINGS IN THE SOFTWARE.
132+
133+
Except as contained in this notice, Dashy shall not be used in advertising or otherwise
134+
to promote the sale, use, or other dealings in this Software without prior written
135+
authorization from the repo owner.
136+
```

docs/authentication.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,15 @@ For Example:
7474
...
7575
```
7676

77-
### Security
78-
Since all authentication is happening entirely on the client-side, it is vulnerable to manipulation by an adversary. An attacker could look at the source code, find the function used generate the auth token, then decode the minified JavaScript to find the hash, and manually generate a token using it, then just insert that value as a cookie using the console, and become a logged in user. Therefore, if you need secure authentication for your app, it is strongly recommended to implement this using your web server, or use a VPN to control access to Dashy. The purpose of the login page is merely to prevent immediate unauthorized access to your homepage.
77+
### Permissions
78+
Any user who is not an admin (with `type: admin`) will not be able to write changes to disk.
79+
80+
You can also prevent any user from writing changes to disk, using `preventWriteToDisk`. Or prevent any changes from being saved locally in browser storage, using `preventLocalSave`. Both properties can be found under [`appConfig`](./docs/configuring.md#appconfig-optional).
7981

80-
Addressing this is on the todo list, and there are several potential solutions:
81-
1. Encrypt all site data against the users password, so that an attacker can not physically access any data without the correct decryption key
82-
2. Use a backend service to handle authentication and configuration, with no user data returned from the server until the correct credentials are provided. However, this would require either Dashy to be run using it's Node.js server, or the use of an external service
83-
3. ~~Implement authentication using a self-hosted identity management solution, such as [Keycloak for Vue](https://www.keycloak.org/securing-apps/vue)~~ **This is now implemented, and released in PR #174 of V 1.6.5!**
82+
To disable all UI config features, including View Config, set `disableConfiguration`.
83+
84+
### Security
85+
With basic auth, all logic is happening on the client-side, which could mean a skilled user could manipulate the code to view parts of your configuration, including the hash. If the SHA-256 hash is of a common password, it may be possible to determine it, using a lookup table, in order to find the original password. Which can be used to manually generate the auth token, that can then be inserted into session storage, to become a valid logged in user. Therefore, you should always use a long, strong and unique password, and if you instance contains security-critical info and/ or is exposed directly to the internet, and alternative authentication method may be better. The purpose of the login page is merely to prevent immediate unauthorized access to your homepage.
8486

8587
**[⬆️ Back to Top](#authentication)**
8688

0 commit comments

Comments
 (0)