Commit Graph

562 Commits

Author SHA1 Message Date
Michael Eischer 8ce88b24e7 enable dependabot 2023-01-14 19:18:10 +01:00
Michael Eischer 2eae8c9266 update transitive dependencies 2023-01-14 19:17:53 +01:00
Michael Eischer 30fbd043b9 update direct dependencies 2023-01-14 19:09:42 +01:00
Michael Eischer 7f29dcbd69 Merge pull request #207 from MichaelEischer/err-on-args
Error out on unexpected command line argument
2023-01-12 22:00:36 +01:00
Michael Eischer 43c96fb6f2 Error out on unexpected command line argument
rest-server doesn't accept arguments. Thus, error out to prevent wrong
usage.
2023-01-11 21:47:25 +01:00
Orsiris de Jong c1c48c62e9 Make dashboard portable
Allows to select datasource when first importing into grafana
2022-12-28 19:44:32 +01:00
Michael Eischer a8cd3f218d Merge pull request #199 from MichaelEischer/support-macos-ventura
Ignore fsync errors
2022-12-16 23:13:43 +01:00
Michael Eischer 80babf98e7 add fsync warning 2022-12-02 21:08:15 +01:00
Michael Eischer 408dcab92e Port fsync error handling from restic
This ignores several different combinations of errnos which are returned
if the storage destination is not able to fsync correctly.

See also https://github.com/restic/restic/pull/4021
2022-11-11 22:37:02 +01:00
Michael Eischer 2dd87ced0a Merge pull request #195 from MichaelEischer/internal-error-for-inaccessible-files
Return "internal server error" if files cannot be read
2022-10-07 22:53:41 +02:00
Michael Eischer f763db8934 Deduplicate handler initialization in tests 2022-09-02 23:41:05 +02:00
Michael Eischer a8fdca3b9f make deleting idempotent 2022-09-02 23:32:52 +02:00
Michael Eischer b562edefd1 add changelog for not found error handling 2022-08-31 22:29:14 +02:00
Michael Eischer cb2afaa4c0 test that inaccessible files result in status 'internal error' 2022-08-31 22:29:14 +02:00
Michael Eischer 991c459be3 Only return "Not Found" status if file does not exist
All other errors are now turned into a internal server error and are
logged.
2022-08-31 22:29:14 +02:00
MichaelEischer 9f4fba2c21 Merge pull request #138 from MichaelEischer/cache-basic-auth
Cache basic auth credentials
2022-07-02 21:19:46 +02:00
Michael Eischer 65fd8be3f8 Add changelog for cached basic auth 2022-07-02 21:17:57 +02:00
Michael Eischer 274f29fee8 refactor password check into separate function 2022-06-21 00:18:05 +02:00
Michael Eischer 98f0aaca1c convert htpasswd regexes to globals 2022-06-21 00:18:05 +02:00
Michael Eischer 5a6ed2ffdf use constant time comparison for sha1 password hash 2022-06-21 00:18:05 +02:00
Michael Eischer 46b020fd9e Add basic test 2022-06-21 00:18:05 +02:00
Michael Eischer df9eb337d3 Extend htpasswd auth cache entry expiry on use 2022-06-21 00:18:05 +02:00
Michael Eischer 1eeca53812 Try to zero htpasswd cache entries before deletion 2022-06-21 00:18:05 +02:00
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 v0.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