Commit Graph
603 Commits
Author SHA1 Message Date
Nicola Murino ab1bf2ad44 update deps 2020-12-06 22:20:53 +01:00
Nicola Murino c451f742aa revertprovider: crypted provider was not supported in v4
also ensure to initialize kms before the dataprovider, it could be
needed to downgrade secret from cloud kms providers
2020-12-06 10:36:48 +01:00
Nicola Murino 034d89876d webdav: fix proppatch handling
also respect login delay for cached webdav users and check the home dir as
soon as the user authenticates

Fixes #239
2020-12-06 08:19:41 +01:00
Nicola Murino 4a88ea5c03 add Data At Rest Encryption support 2020-12-05 13:48:13 +01:00
Nicola Murino 95c6d41c35 config: make config file relative to the config dir
a configuration parsing error is now fatal
2020-12-03 17:16:35 +01:00
Márk Sági-KazárandGitHub 2a9ed0abca Accept a config file path instead of a config name
Config name is a Viper concept used for searching a specific file
in various paths with various extensions.

Making it configurable is usually not a useful feature
as users mostly want to define a full or relative path
to a config file.

This change replaces config name with config file.
2020-12-03 16:23:33 +01:00
Nicola Murino 3ff6b1bf64 fix lint warnings 2020-12-02 10:02:08 +01:00
Nicola Murino a67276ccc2 add build tags to disable kms providers 2020-12-02 09:44:18 +01:00
Nicola Murino 87b51a6fd5 kms: remember if a secret was saved without a master key
So we will be able to decrypt secret stored without a master key if a
such key is provided later
2020-12-01 22:18:16 +01:00
Nicola Murino 940836b25b add a note about using sqlite provider over cifs shares
See #235
2020-11-30 21:59:56 +01:00
Nicola Murino 634b723b5d add KMS support
Fixes #226
2020-11-30 21:46:34 +01:00
Nicola Murino af0c9b76c4 update nfpm to 1.10.2 2020-11-27 18:07:27 +01:00
Nicola Murino 2142ef20c5 fix some typos 2020-11-26 22:18:12 +01:00
Nicola Murino 224ce5fe81 add revertprovider subcommand
Fixes #233
2020-11-26 22:08:33 +01:00
Nicola Murino 4bb9d07dde user: add a free text field
Fixes #230
2020-11-25 22:26:34 +01:00
Nicola Murino 2054dfd83d create the credential directory when needed
The credentials dir is currently required only for GCS users if
prefer database credential setting is false, so defer its creation
and don't fail to start the services if this directory is missing
2020-11-25 14:18:12 +01:00
Nicola Murino 6699f5c2cc initial data loading: an error is no longer fatal
therefore it does not prevent the services from starting
2020-11-25 09:18:36 +01:00
Estel SmithandNicola Murino 70bde8b2bc memory provider: print a log if loading the initial dump fails
therefore this error is no longer fatal and does not prevent the services
from starting

Fixes #229
2020-11-25 09:15:23 +01:00
Nicola Murino ff73e5f53c CI Docker: don't build full image on pull request
it will fail since the slim tag is not pushed
2020-11-24 18:51:10 +01:00
Nicola Murino 0609188d3f allow to disable SFTP service
Fixes #228
2020-11-24 13:44:57 +01:00
Nicola Murino 99cd1ccfe5 S3: fix empty directory detection
when listing empty directory MinIO returns no contents while S3 returns
1 object with the key equal to the prefix. Make detection work in both
cases

Fixes #227
2020-11-23 15:36:42 +01:00
Nicola Murino dccc583b5d add a dedicated struct to store encrypted credentials
also gcs credentials are now encrypted, both on disk and inside the
provider.

Data provider is automatically migrated and load data will accept
old format too but you should upgrade to the new format to avoid future
issues
2020-11-22 21:53:04 +01:00
Nicola Murino ac435b7890 back to development 2020-11-18 21:53:23 +01:00
Nicola Murino 37fc589896 set version to 1.2.2 v1.2.2 2020-11-18 19:24:19 +01:00
Nicola Murino 5d789a01b7 update pkg/sftp
These patches are now merged upstream:

https://github.com/pkg/sftp/pull/392
https://github.com/pkg/sftp/pull/393
2020-11-18 19:06:12 +01:00
Nicola Murino ca0ff0d630 add a File interface so we can avoid to use os.File directly 2020-11-17 19:36:39 +01:00
Nicola Murino 969b38586e update pkg/sftp to fix requests accumulation
Include this patch:

https://github.com/pkg/sftp/pull/393

to avoid request accumulation (no underlying fd) if we return an error.
Before this patch the accumulated requests are released only when the
client disconnects.

We use our fork for now to include

https://github.com/pkg/sftp/pull/392

too
2020-11-16 19:49:26 +01:00
Nicola Murino e3eca424f1 web admin: allow both allowed and denied extensions/patterns for a dir
this fix a regression introduced in the previous commit
2020-11-16 19:21:50 +01:00
Nicola Murino a6355e298e add support for limit files using shell like patterns
Fixes #209
2020-11-15 22:04:48 +01:00
Ryan GoughandNicola Murino c0f47a58f2 web admin: clarify that the directories for permissions are relative
Fixes #222
2020-11-15 09:11:36 +01:00
Nicola Murino dc845fa2f4 webdav: fix permission errors if the client try to read multiple times 2020-11-14 19:19:41 +01:00
Nicola Murino 7e855c83b3 deb packages: changes priority to optional, extra is deprecated 2020-11-14 13:54:14 +01:00
Nicola Murino 3b8a9e0963 back to development 2020-11-14 11:01:28 +01:00
Nicola Murino 4445834fd3 set version to 1.2.1 v1.2.1 2020-11-14 09:28:53 +01:00
Nicola Murino 19a619ff65 Linux pkgs: use python3 for API CLI inside generated deb 2020-11-14 09:10:45 +01:00
Nicola Murino 66a538dc9c CI: improve docker build action 2020-11-13 21:55:53 +01:00
Nicola Murino 1a6863f4b1 GCS uploads: check Close() error
some code simplification too
2020-11-13 18:40:18 +01:00
Nicola Murino fbd9919afa docker: add slim image 2020-11-12 22:40:53 +01:00
Nicola Murino eec8bc73f4 docker: remove entrypoint
remove the VOLUME instruction from the Dockerfile so you can change
user using your own image like this:

FROM drakkan/sftpgo:tag
USER root
RUN chown -R 1100:1100 /etc/sftpgo && chown 1100:1100 /var/lib/sftpgo /srv/sftpgo
USER 1100:1100
2020-11-12 11:53:05 +01:00
Nicola Murino 5720d40fee add setstat_mode 2
in this mode chmod/chtimes/chown can be silently ignored only for cloud
based file systems

Fixes #223
2020-11-12 10:39:46 +01:00
Nicola Murino 38e0cba675 docker: add an entrypoint
running as an arbitrary user is now possible setting the following
env vars too:

SFTPGO_PUID
SFTPGO_PGID

Fixes #217
2020-11-10 23:11:57 +01:00
Nicola Murino 4c5a0d663e sftpd: return the error Operation Unsupported for unexpected reads
a cloud based file cannot be opened for read and write at the same
time. Return a proper error if a client try to do this.

It can happen only for SFTP
2020-11-09 21:01:56 +01:00
Nicola Murino 093df15fac CI: add ppc64le support 2020-11-09 18:39:36 +01:00
Nicola Murino 957430e675 back to development 2020-11-08 12:56:37 +01:00
Nicola Murino 14035f407e set version to 1.2.0 v1.2.0 2020-11-08 06:14:03 +01:00
Nicola Murino bf2b2525a9 CI: build deb/rpm for arm64 2020-11-07 19:29:16 +01:00
Nicola Murino 4edb9cd6b9 simplify some code 2020-11-07 18:05:47 +01:00
Nicola Murino c38d242bea docker: allow running as an arbitrary user 2020-11-06 10:18:29 +01:00
Nicola Murino c6ab6f94e7 azblob: container level SAS cannot access container properties
so return the root directory without checking if the bucket exists
2020-11-05 15:03:35 +01:00
Nicola Murino 36151d1ba9 subsystem mode: add base-home-dir flag 2020-11-05 12:12:11 +01:00