Commit graph

389 commits

Author SHA1 Message Date
Michael Eischer
0bdc420e75 Cache successful basic auth credentials for a minute
This stores a hash of the username + password in map which is indexed by
the username. Indexing by username avoids accidentally introducing a
timing side-channel as a successful/failed lookup only provides
information on whether a cache entry exists for a username or not.

Hashing the username and password together makes it simple to get a
constant-time string comparison as we no longer have to worry about
string length differences.

Expriy is done by a goroutine which every few seconds checks for expired
cache entries and removes those.
2022-06-21 00:18:05 +02:00
Michael Eischer
b0036d006b Unexport users map in htpasswd struct 2022-06-21 00:18:05 +02:00
rawtaz
6bc87b8e95
Merge pull request #188 from dwmunster/f-config-htpasswd
Add configurable htpasswd file location
2022-06-20 23:40:49 +02:00
Alexander Neumann
d24ffc13d8 Fix tests 2022-04-15 09:38:23 +02:00
Alexander Neumann
a87a50ad11 Sync settinsg with restic, require Go >= 1.15 2022-04-15 09:38:23 +02:00
Alexander Neumann
8538ce7859 Copy golangci-lint settings from restic 2022-04-15 09:28:56 +02:00
Drayton Munster
87cef8f159 Clarify file accessibility for PASSWORD_FILE in docker 2022-03-25 22:36:54 -04:00
Drayton Munster
bc1545c717 Clarifying descriptions as suggested in PR review 2022-03-25 22:25:48 -04:00
Drayton Munster
3903ed000c Add configurable htpasswd location 2022-03-25 15:39:20 -04:00
MichaelEischer
cb85fb38c0
Merge pull request #184 from lgommans/patch-1
Be more clear in --help what the value of --log is supposed to be
2022-02-18 21:04:07 +01:00
Luc Gommans
1fd9538f73 Reword --log option in --help output 2022-02-17 23:33:42 +01:00
rawtaz
af36b77ece
Merge pull request #183 from MichaelEischer/allow-underscore
Allow underscores in usernames
2022-02-12 21:18:05 +01:00
Michael Eischer
48067dc896 htpasswd: allow underscores in usernames 2022-02-12 21:13:40 +01:00
Alexander Neumann
096ac5a9c8 Remove plan9, rest-server fails to build 2022-02-10 20:02:10 +01:00
Alexander Neumann
4741eec619 Generate CHANGELOG.md for 0.11.0 2022-02-10 19:53:31 +01:00
Alexander Neumann
057ef39525 Move changelog files for 0.11.0 2022-02-10 19:53:14 +01:00
Alexander Neumann
b739e22b04 Update VERSION files for 0.11.0 2022-02-10 19:53:08 +01:00
Alexander Neumann
e9900b7a00
Merge pull request #171 from MichaelEischer/fix-file-permissions
Honour repo.FileMode permissions
2022-02-10 19:51:57 +01:00
Alexander Neumann
959250f543 Fix changelog file 2022-02-10 19:51:40 +01:00
Alexander Neumann
9e4442805e
Merge pull request #181 from MichaelEischer/reword-changelogs
Reword changelogs
2022-02-10 19:51:09 +01:00
Michael Eischer
228d5f6051 Reword changelogs 2022-02-10 19:48:44 +01:00
Alexander Neumann
6f386876e7 Update build.go from restic 2022-02-10 19:25:41 +01:00
Alexander Neumann
7a3b9e4000
Merge pull request #180 from MichaelEischer/update-dependencies
Update dependencies
2022-02-10 19:13:22 +01:00
Michael Eischer
aaf4f4b92a Update dependencies
This also cleans up the indirect dependencies.
2022-02-08 22:55:00 +01:00
rawtaz
bf42a509ab
Merge pull request #178 from JsBergbau/master
Readme: Fixed SSL certificate generation
2022-01-27 17:05:05 +01:00
JsBergbau
a7eecf40bd Fix and description update for certificate generation
Fixed SSL certificate generation
2022-01-27 16:26:21 +01:00
MichaelEischer
421da62900
Merge pull request #156 from telenieko/patch-1
Clarification of docker section in README.md
2021-10-31 19:33:41 +01:00
Marc Fargas
12cf4bbc05 Clarification of docker section in README.md
Refs #128, the two distinct docker sections of the README are merged into one.
2021-10-28 13:37:18 +00:00
Michael Eischer
51ab8e98e2 fix file permission handling 2021-09-24 23:10:16 +02:00
MichaelEischer
9f8c31b968
Merge pull request #158 from Enrico204/use-os-tempdir-for-temporary-directory
Use os.TempDir() for temporary directory in default path
2021-09-12 21:30:59 +02:00
Michael Eischer
f952bc7344 Tweak readme 2021-09-12 21:27:45 +02:00
Enrico204
223520b964 Use os.TempDir() for temporary directory in default path 2021-09-12 21:27:45 +02:00
MichaelEischer
1172d7e068
Merge pull request #160 from Enrico204/reply-with-insufficient-storage-on-disk-full
Reply "insufficient storage" on disk full or over-quota
2021-09-07 21:28:07 +02:00
Enrico204
fb5d63435a Fix tests for: reply "insufficient storage" on disk full or over-quota 2021-09-06 22:32:07 +02:00
MichaelEischer
8729a699a1
Merge pull request #164 from networkException/master
Config: Read in PrometheusNoAuth correctly
2021-09-04 13:27:46 +02:00
networkException
f373e45bc8
Config: Read in PrometheusNoAuth correctly
Previously setting --prometheus-no-auth flag would override --prometheus
2021-09-04 01:09:41 +02:00
MichaelEischer
8642729a51
Merge pull request #163 from buschjost/optimized-sha256-lib
Use Minio's optimized SHA-256
2021-08-31 21:04:25 +02:00
Oliver Buschjost
f61292b00d Use Minio's optimized SHA-256 2021-08-27 18:21:44 +02:00
rawtaz
a09ba203bd
Merge pull request #161 from ubitux/readme-cleanup
Readme cleanup
2021-08-27 14:47:18 +02:00
Clément Bœsch
ac8e95c8a4 README: propose a single openssl command instead of 2 2021-08-27 13:45:58 +02:00
Clément Bœsch
f8db131226 README: remove trailing whitespaces 2021-08-27 13:45:58 +02:00
Clément Bœsch
101ad07999 README: update usage output with recent changes 2021-08-27 13:45:58 +02:00
Clément Bœsch
dbf002296b README: set language for command block quotes
Better semantic, allowing syntax coloring when appropriate (such as
strings argument in case of sh).
2021-08-27 13:45:56 +02:00
MichaelEischer
5be12cecbf
Merge pull request #143 from MichaelEischer/docker-create-bcrypt
docker: use bcrypt in create_users script
2021-08-23 20:10:38 +02:00
Enrico204
9b31f17188 Add unreleased changelog entry for pull request 160 2021-08-23 12:50:12 +02:00
Enrico204
173bfb5371 Reply "insufficient storage" on disk full or over-quota
This commit will change the current behavior on disk-related errors:
* HTTP 507 "Insufficient storage" is the status on disk full or
over-quota
* HTTP 500 "Internal server error" on other disk-related errors
previously both were 400 "Bad request"
2021-08-23 12:44:09 +02:00
Michael Eischer
20edfb87ee docker: use bcrypt in create_users script
This was missed when adding bcrypt support in rest-server 0.9.7
2021-08-20 22:52:03 +02:00
Alexander Neumann
d2813ea61b
Merge pull request #151 from restic/add-socket-activation
Support running on demand via systemd
2021-08-17 21:39:42 +02:00
Alexander Neumann
f90205eefe Support running on demand systemd socket activation 2021-08-17 21:37:02 +02:00
Alexander Neumann
32784a3072 Run tests on Go 1.17 2021-08-17 21:35:39 +02:00