mirror of
https://github.com/restic/rest-server.git
synced 2026-04-09 03:31:58 -07:00
Compare commits
14 Commits
4e6193ceee
...
v0.14.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad130de021 | ||
|
|
2aaa048aba | ||
|
|
b6ec6f45cc | ||
|
|
2a77536ce5 | ||
|
|
0adcfa2619 | ||
|
|
9f8bb0c87c | ||
|
|
5faeedf050 | ||
|
|
7294612990 | ||
|
|
25066228ee | ||
|
|
72a7319fae | ||
|
|
df5330773f | ||
|
|
2bb4d251e2 | ||
|
|
f018e99109 | ||
|
|
95538fe956 |
@@ -21,29 +21,27 @@ before:
|
||||
|
||||
# build a single binary
|
||||
builds:
|
||||
-
|
||||
- id: default
|
||||
# make sure everything is statically linked by disabling cgo altogether
|
||||
env:
|
||||
env: &build_env
|
||||
- CGO_ENABLED=0
|
||||
|
||||
# set the package for the main binary
|
||||
main: ./cmd/rest-server
|
||||
|
||||
flags:
|
||||
# don't include any paths to source files in the resulting binary
|
||||
&build_flags # don't include any paths to source files in the resulting binary
|
||||
- -trimpath
|
||||
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
mod_timestamp: "{{ .CommitTimestamp }}"
|
||||
|
||||
ldflags:
|
||||
# set the version variable in the main package
|
||||
ldflags: &build_ldflags # set the version variable in the main package
|
||||
- "-s -w -X main.version={{ .Version }}"
|
||||
|
||||
# list all operating systems and architectures we build binaries for
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
- windows
|
||||
- freebsd
|
||||
- netbsd
|
||||
- openbsd
|
||||
@@ -52,7 +50,7 @@ builds:
|
||||
|
||||
goarch:
|
||||
- amd64
|
||||
- 386
|
||||
- "386"
|
||||
- arm
|
||||
- arm64
|
||||
- mips
|
||||
@@ -61,23 +59,39 @@ builds:
|
||||
- ppc64
|
||||
- ppc64le
|
||||
goarm:
|
||||
- 6
|
||||
- 7
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
- id: windows-only
|
||||
env: *build_env
|
||||
main: ./cmd/rest-server
|
||||
flags: *build_flags
|
||||
mod_timestamp: "{{ .CommitTimestamp }}"
|
||||
ldflags: *build_ldflags
|
||||
goos:
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
- "386"
|
||||
- arm
|
||||
- arm64
|
||||
|
||||
# configure the resulting archives to create
|
||||
archives:
|
||||
-
|
||||
- id: default
|
||||
builds: [default, windows-only]
|
||||
format: tar.gz
|
||||
# package a directory which contains the source file
|
||||
wrap_in_directory: true
|
||||
|
||||
builds_info: &archive_file_info
|
||||
owner: root
|
||||
group: root
|
||||
mtime: '{{ .CommitDate }}'
|
||||
mtime: "{{ .CommitDate }}"
|
||||
mode: 0644
|
||||
|
||||
# add these files to all archives
|
||||
files:
|
||||
files: &archive_files
|
||||
- src: LICENSE
|
||||
dst: LICENSE
|
||||
info: *archive_file_info
|
||||
@@ -88,13 +102,20 @@ archives:
|
||||
dst: CHANGELOG.md
|
||||
info: *archive_file_info
|
||||
|
||||
- id: windows-only
|
||||
builds: [windows-only]
|
||||
formats: [zip]
|
||||
wrap_in_directory: true
|
||||
builds_info: *archive_file_info
|
||||
files: *archive_files
|
||||
|
||||
# also build an archive of the source code
|
||||
source:
|
||||
enabled: true
|
||||
|
||||
# build a file containing the SHA256 hashes
|
||||
checksum:
|
||||
name_template: 'SHA256SUMS'
|
||||
name_template: "SHA256SUMS"
|
||||
|
||||
# sign the checksum file
|
||||
signs:
|
||||
@@ -128,7 +149,7 @@ dockers:
|
||||
- docker/entrypoint.sh
|
||||
- image_templates:
|
||||
- restic/rest-server:{{ .Version }}-i386
|
||||
goarch: 386
|
||||
goarch: "386"
|
||||
build_flag_templates:
|
||||
- "--platform=linux/386"
|
||||
- "--pull"
|
||||
@@ -204,21 +225,20 @@ dockers:
|
||||
dockerfile: "Dockerfile.goreleaser"
|
||||
extra_files: *extra_files
|
||||
|
||||
|
||||
docker_manifests:
|
||||
- name_template: "restic/rest-server:{{ .Version }}"
|
||||
image_templates:
|
||||
- "restic/rest-server:{{ .Version }}-amd64"
|
||||
- "restic/rest-server:{{ .Version }}-i386"
|
||||
- "restic/rest-server:{{ .Version }}-arm32v6"
|
||||
- "restic/rest-server:{{ .Version }}-arm32v7"
|
||||
- "restic/rest-server:{{ .Version }}-arm64v8"
|
||||
- "restic/rest-server:{{ .Version }}-ppc64le"
|
||||
- name_template: "restic/rest-server:latest"
|
||||
image_templates:
|
||||
- "restic/rest-server:{{ .Version }}-amd64"
|
||||
- "restic/rest-server:{{ .Version }}-i386"
|
||||
- "restic/rest-server:{{ .Version }}-arm32v6"
|
||||
- "restic/rest-server:{{ .Version }}-arm32v7"
|
||||
- "restic/rest-server:{{ .Version }}-arm64v8"
|
||||
- "restic/rest-server:{{ .Version }}-ppc64le"
|
||||
- name_template: "restic/rest-server:{{ .Version }}"
|
||||
image_templates:
|
||||
- "restic/rest-server:{{ .Version }}-amd64"
|
||||
- "restic/rest-server:{{ .Version }}-i386"
|
||||
- "restic/rest-server:{{ .Version }}-arm32v6"
|
||||
- "restic/rest-server:{{ .Version }}-arm32v7"
|
||||
- "restic/rest-server:{{ .Version }}-arm64v8"
|
||||
- "restic/rest-server:{{ .Version }}-ppc64le"
|
||||
- name_template: "restic/rest-server:latest"
|
||||
image_templates:
|
||||
- "restic/rest-server:{{ .Version }}-amd64"
|
||||
- "restic/rest-server:{{ .Version }}-i386"
|
||||
- "restic/rest-server:{{ .Version }}-arm32v6"
|
||||
- "restic/rest-server:{{ .Version }}-arm32v7"
|
||||
- "restic/rest-server:{{ .Version }}-arm64v8"
|
||||
- "restic/rest-server:{{ .Version }}-ppc64le"
|
||||
|
||||
95
CHANGELOG.md
95
CHANGELOG.md
@@ -1,3 +1,98 @@
|
||||
Changelog for rest-server 0.14.0 (2025-05-31)
|
||||
============================================
|
||||
|
||||
The following sections list the changes in rest-server 0.14.0 relevant
|
||||
to users. The changes are ordered by importance.
|
||||
|
||||
Summary
|
||||
-------
|
||||
|
||||
* Sec #318: Fix world-readable permissions on new `.htpasswd` files
|
||||
* Chg #322: Update dependencies and require Go 1.23 or newer
|
||||
* Enh #174: Support proxy-based authentication
|
||||
* Enh #189: Support group accessible repositories
|
||||
* Enh #295: Output status of append-only mode on startup
|
||||
* Enh #315: Hardened tls settings
|
||||
* Enh #321: Add zip archive format for Windows releases
|
||||
|
||||
Details
|
||||
-------
|
||||
|
||||
* Security #318: Fix world-readable permissions on new `.htpasswd` files
|
||||
|
||||
On startup the rest-server Docker container creates an empty `.htpasswd` file if
|
||||
none exists yet. This file was world-readable by default, which can be a
|
||||
security risk, even though the file only contains hashed passwords.
|
||||
|
||||
This has been fixed such that new `.htpasswd` files are no longer
|
||||
world-readabble.
|
||||
|
||||
The permissions of existing `.htpasswd` files must be manually changed if
|
||||
relevant in your setup.
|
||||
|
||||
https://github.com/restic/rest-server/issues/318
|
||||
https://github.com/restic/rest-server/pull/340
|
||||
|
||||
* Change #322: Update dependencies and require Go 1.23 or newer
|
||||
|
||||
All dependencies have been updated. Rest-server now requires Go 1.23 or newer to
|
||||
build.
|
||||
|
||||
This also disables support for TLS versions older than TLS 1.2. On Windows,
|
||||
rest-server now requires at least Windows 10 or Windows Server 2016. On macOS,
|
||||
rest-server now requires at least macOS 11 Big Sur.
|
||||
|
||||
https://github.com/restic/rest-server/pull/322
|
||||
https://github.com/restic/rest-server/pull/338
|
||||
|
||||
* Enhancement #174: Support proxy-based authentication
|
||||
|
||||
Rest-server now supports authentication via HTTP proxy headers. This feature can
|
||||
be enabled by specifying the username header using the `--proxy-auth-username`
|
||||
option (e.g., `--proxy-auth-username=X-Forwarded-User`).
|
||||
|
||||
When enabled, the server authenticates users based on the specified header and
|
||||
disables Basic Auth. Note that proxy authentication is disabled when `--no-auth`
|
||||
is set.
|
||||
|
||||
https://github.com/restic/rest-server/issues/174
|
||||
https://github.com/restic/rest-server/pull/307
|
||||
|
||||
* Enhancement #189: Support group accessible repositories
|
||||
|
||||
Rest-server now supports making repositories accessible to the filesystem group
|
||||
by setting the `--group-accessible-repos` option. Note that permissions of
|
||||
existing files are not modified. To allow the group to read and write file, use
|
||||
a umask of `007`. To only grant read access use `027`. To make an existing
|
||||
repository group-accessible, use `chmod -R g+rwX /path/to/repo`.
|
||||
|
||||
https://github.com/restic/rest-server/issues/189
|
||||
https://github.com/restic/rest-server/pull/308
|
||||
|
||||
* Enhancement #295: Output status of append-only mode on startup
|
||||
|
||||
Rest-server now displays the status of append-only mode during startup.
|
||||
|
||||
https://github.com/restic/rest-server/pull/295
|
||||
|
||||
* Enhancement #315: Hardened tls settings
|
||||
|
||||
Rest-server now uses a secure TLS cipher suite set by default. The minimum TLS
|
||||
version is now TLS 1.2 and can be further increased using the new
|
||||
`--tls-min-ver` option, allowing users to enforce stricter security
|
||||
requirements.
|
||||
|
||||
https://github.com/restic/rest-server/pull/315
|
||||
|
||||
* Enhancement #321: Add zip archive format for Windows releases
|
||||
|
||||
Windows users can now download rest-server binaries in zip archive format (.zip)
|
||||
in addition to the existing tar.gz archives.
|
||||
|
||||
https://github.com/restic/rest-server/issues/321
|
||||
https://github.com/restic/rest-server/pull/346
|
||||
|
||||
|
||||
Changelog for rest-server 0.13.0 (2024-07-26)
|
||||
============================================
|
||||
|
||||
|
||||
@@ -160,6 +160,10 @@ The server can be started with `--prometheus` to expose [Prometheus](https://pro
|
||||
This repository contains an example full stack Docker Compose setup with a Grafana dashboard in [examples/compose-with-grafana/](examples/compose-with-grafana/).
|
||||
|
||||
|
||||
## Group-accessible Repositories
|
||||
|
||||
Rest-server supports making repositories accessible to the filesystem group by setting the `--group-accessible-repos` option. Note that permissions of existing files are not modified. To allow the group to read and write file, use a umask of `007`. To only grant read access use `027`. To make an existing repository group-accessible, use `chmod -R g+rwX /path/to/repo`.
|
||||
|
||||
## Why use Rest Server?
|
||||
|
||||
Compared to the SFTP backend, the REST backend has better performance, especially so if you can skip additional crypto overhead by using plain HTTP transport (restic already properly encrypts all data it sends, so using HTTPS is mostly about authentication).
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
use another config file):
|
||||
|
||||
goreleaser \
|
||||
release \
|
||||
release --parallelism 4 \
|
||||
--release-notes <(calens --template changelog/CHANGELOG-GitHub.tmpl --version "${VERSION}")
|
||||
|
||||
7. Set a new version in `main.go` and commit the result:
|
||||
|
||||
@@ -2,8 +2,9 @@ Enhancement: Support group accessible repositories
|
||||
|
||||
Rest-server now supports making repositories accessible to the filesystem group
|
||||
by setting the `--group-accessible-repos` option. Note that permissions of
|
||||
existing files are not modified. To make an existing repository group-accessible,
|
||||
use `chmod -R g+rwX /path/to/repo`.
|
||||
existing files are not modified. To allow the group to read and write file,
|
||||
use a umask of `007`. To only grant read access use `027`. To make an existing
|
||||
repository group-accessible, use `chmod -R g+rwX /path/to/repo`.
|
||||
|
||||
https://github.com/restic/rest-server/issues/189
|
||||
https://github.com/restic/rest-server/pull/308
|
||||
13
changelog/0.14.0_2025-05-31/issue-318
Normal file
13
changelog/0.14.0_2025-05-31/issue-318
Normal file
@@ -0,0 +1,13 @@
|
||||
Security: Fix world-readable permissions on new `.htpasswd` files
|
||||
|
||||
On startup the rest-server Docker container creates an empty `.htpasswd` file
|
||||
if none exists yet. This file was world-readable by default, which can be
|
||||
a security risk, even though the file only contains hashed passwords.
|
||||
|
||||
This has been fixed such that new `.htpasswd` files are no longer world-readabble.
|
||||
|
||||
The permissions of existing `.htpasswd` files must be manually changed if
|
||||
relevant in your setup.
|
||||
|
||||
https://github.com/restic/rest-server/issues/318
|
||||
https://github.com/restic/rest-server/pull/340
|
||||
7
changelog/0.14.0_2025-05-31/issue-321
Normal file
7
changelog/0.14.0_2025-05-31/issue-321
Normal file
@@ -0,0 +1,7 @@
|
||||
Enhancement: Add zip archive format for Windows releases
|
||||
|
||||
Windows users can now download rest-server binaries in zip archive format (.zip)
|
||||
in addition to the existing tar.gz archives.
|
||||
|
||||
https://github.com/restic/rest-server/issues/321
|
||||
https://github.com/restic/rest-server/pull/346
|
||||
@@ -1,4 +1,4 @@
|
||||
Enhancement: Output status of append only mode on startup
|
||||
Enhancement: Output status of append-only mode on startup
|
||||
|
||||
Rest-server now displays the status of append-only mode during startup.
|
||||
|
||||
@@ -2,9 +2,11 @@ Enhancement: Support proxy-based authentication
|
||||
|
||||
Rest-server now supports authentication via HTTP proxy headers. This feature can
|
||||
be enabled by specifying the username header using the `--proxy-auth-username`
|
||||
option (e.g., `--proxy-auth-username=X-Forwarded-User`). When enabled, the server
|
||||
authenticates users based on the specified header and disables BasicAuth.
|
||||
Note that proxy authentication is disabled when `--no-auth` is set.
|
||||
option (e.g., `--proxy-auth-username=X-Forwarded-User`).
|
||||
|
||||
When enabled, the server authenticates users based on the specified header and
|
||||
disables Basic Auth. Note that proxy authentication is disabled when `--no-auth`
|
||||
is set.
|
||||
|
||||
https://github.com/restic/rest-server/issues/174
|
||||
https://github.com/restic/rest-server/pull/307
|
||||
@@ -1,6 +1,7 @@
|
||||
Change: Update dependencies and require Go 1.23 or newer
|
||||
|
||||
We have updated all dependencies. Rest-server now requires Go 1.23 or newer to build.
|
||||
All dependencies have been updated. Rest-server now requires Go 1.23 or newer
|
||||
to build.
|
||||
|
||||
This also disables support for TLS versions older than TLS 1.2. On Windows,
|
||||
rest-server now requires at least Windows 10 or Windows Server 2016. On macOS,
|
||||
@@ -78,7 +78,7 @@ func newRestServerApp() *restServerApp {
|
||||
return rv
|
||||
}
|
||||
|
||||
var version = "0.13.0"
|
||||
var version = "0.14.0"
|
||||
|
||||
func (app *restServerApp) tlsSettings() (bool, string, string, error) {
|
||||
var key, cert string
|
||||
|
||||
@@ -6,7 +6,7 @@ if [ -n "$DISABLE_AUTHENTICATION" ]; then
|
||||
OPTIONS="--no-auth $OPTIONS"
|
||||
else
|
||||
if [ ! -f "$PASSWORD_FILE" ]; then
|
||||
touch "$PASSWORD_FILE"
|
||||
( umask 027 && touch "$PASSWORD_FILE" )
|
||||
fi
|
||||
|
||||
if [ ! -s "$PASSWORD_FILE" ]; then
|
||||
|
||||
@@ -26,8 +26,9 @@ RestartSec=5
|
||||
# The following line must be customised to your individual requirements.
|
||||
ReadWritePaths=/path/to/backups
|
||||
|
||||
# Set to `UMask=007` and pass `--group-accessible-repos` to rest-server to
|
||||
# make created files group-readable
|
||||
# Files in the data repository are only user accessible by default. Default to
|
||||
# `UMask=077` for consistency. To make created files group-readable, set to
|
||||
# `UMask=007` and pass `--group-accessible-repos` to rest-server via `ExecStart`.
|
||||
UMask=077
|
||||
|
||||
# If your system doesn't support all of the features below (e.g. because of
|
||||
|
||||
Reference in New Issue
Block a user