Nicola Murino
97122ef06c
backport some fixes from the main branch
...
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2022-03-04 19:14:39 +01:00
Nicola Murino
ba3548c2c3
make the sdk a separate module
...
The SFTPGo SDK now is at the following URL
https://github.com/sftpgo/sdk
Fixes #657
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2022-01-13 10:52:03 +01:00
Nicola Murino
0e2d673889
move kms implementation outside the sdk package
...
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2022-01-13 10:51:55 +01:00
Nicola Murino
bf03eb2a88
log at info level the service configurations
...
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2022-01-13 10:51:48 +01:00
Nicola Murino
6a20e7411b
sdk: add a logger interface
...
we are now ready to make the sdk a separate module
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2022-01-13 10:51:36 +01:00
Nicola Murino
0e1d8fc4d9
move kms definitions to the sdk package
...
This is the first step to make the sdk a separate module
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
2022-01-13 10:51:31 +01:00
Nicola Murino
4d7a4aa99a
check rename source and target
2021-12-28 12:03:52 +01:00
Nicola Murino
ced73ed04e
REST API: add an option to create missing dirs
2021-12-19 12:14:53 +01:00
Nicola Murino
cc73bb811b
change log level from warn to error where appropriate
...
Fixes #649
2021-12-16 19:53:00 +01:00
Nicola Murino
a587228cf0
add support for metadata plugins
2021-12-16 18:18:36 +01:00
Nicola Murino
a7c0b07a2a
add session id to notifier plugins/hook
2021-12-04 17:27:24 +01:00
Nicola Murino
6092b6628e
logs: use info level for login related messages
...
so enabling debug level is not required, for example only to understand
that a user exceeded the allowed sessions.
Also set the cache update frequency as documented
2021-12-02 19:36:42 +01:00
Nicola Murino
3c24cb773f
SFTP: log users connections at info level
...
uniform SFTP and FTP logs
Fixes #626
2021-11-29 10:15:46 +01:00
Nicola Murino
4652f9ede8
FTPD: allow to set different passive IPs based on the client's IP address
2021-11-25 12:45:09 +01:00
Nicola Murino
094ee1522e
logger: add a flag to use UTC time for logging
2021-11-06 15:18:16 +01:00
Nicola Murino
4aa9686e3b
refactor custom actions
...
SFTPGo is now fully auditable, all fs and provider events that change
something are notified and can be collected using hooks/plugins.
There are some backward incompatible changes for command hooks
2021-10-10 13:08:05 +02:00
Nicola Murino
8a4c21b64a
add builtin two-factor auth support
...
The builtin two-factor authentication is based on time-based one time
passwords (RFC 6238) which works with Authy, Google Authenticator and
other compatible apps.
2021-09-04 12:11:04 +02:00
Nicola Murino
b903a6e46f
data provider: remove default admin
...
you need to load initial data or set "create_default_admin" to true
and the appropriate env vars if you don't want to use the web admin
setup screen to create the default admin
2021-08-20 10:37:51 +02:00
Nicola Murino
be3857d572
dataprovider: add timestamp fields for users and admins
2021-08-19 15:51:43 +02:00
Nicola Murino
555dc3b0c0
transfer logs: add FTP mode
2021-08-10 13:07:38 +02:00
Nicola Murino
0de0d3308c
improve error messages for generic failures
2021-08-08 19:30:21 +02:00
Nicola Murino
a3c087456b
ftpd: add some security checks
2021-08-05 18:38:15 +02:00
Nicola Murino
7640612a95
update deps
2021-07-31 10:22:38 +02:00
Nicola Murino
a26962f367
add dot and dot dot directories to sftp/ftp file listing
2021-07-31 09:42:23 +02:00
Nicola Murino
c41ae116eb
improve logging
...
Fixes #381
2021-07-24 20:11:17 +02:00
Nicola Murino
5967aa1aa5
FTP: enable ftpserverlib logging and make debug mode configurable
2021-07-20 17:22:08 +02:00
Nicola Murino
bd5191dfc5
add experimental plugin system
2021-07-11 15:26:51 +02:00
Nicola Murino
04001f7ad3
FTP: try to return more specific error codes/messages for some errors
...
We now return 552 code for quota exceeded errors and 553 in the following
cases:
- filename denied by a filter
- no upload permission
- no overwrite permission
- pre upload hook error
Fixes #442
2021-06-28 19:40:04 +02:00
Nicola Murino
076b2f0ee0
modules: add v2 support
2021-06-26 07:31:41 +02:00
Nicola Murino
c1b862394d
move other errors to utils package
2021-06-19 13:06:01 +02:00
Nicola Murino
3bb0ca1d2b
config: remove deprecated configuration keys
2021-06-19 09:47:06 +02:00
Nicola Murino
43182fc25e
OpenAPI: add users API
...
These new APIs match the web client features.
I'm aware that some API do not follow REST best practises.
I want to avoid things likes "/user/folders/<path>"
where "path" must be encoded and making it optional create issues, so
I defined resources as query parameters instead of path parameters
2021-06-05 16:07:09 +02:00
Nicola Murino
575bcf1f03
add remote address to transfer and commands logs
2021-06-01 22:28:43 +02:00
Nicola Murino
969c992bfd
pre-upload: execute the hook just before opening the target file
2021-05-31 22:40:47 +02:00
Nicola Murino
c1239fbf59
pre-upload action: add file open flags
...
Reading the flags the hook receiver can detect if the client wants to
truncate the target file
2021-05-31 22:33:23 +02:00
Nicola Murino
c63b923ec3
cryptfs: add support for atomic uploads
2021-05-31 21:45:29 +02:00
Nicola Murino
25a44030f9
actions: add pre-download and pre-upload
...
Downloads and uploads can be denied based on hook response
2021-05-26 07:48:37 +02:00
Nicola Murino
02bb09ec01
remove deprecated file extensions filters
...
these filters were deprecated a long time ago, everyone should use
patterns filters now
2021-05-22 12:28:05 +02:00
Nicola Murino
f2b93c0402
add a setup screen to create the first admin user
...
If you prefer to auto-create the first admin you can enable the
"create_default_admin" configuration key and SFTPGo will work as before.
You can also create the first admin by loading initial data: now you can
set both username and password, before you could only change the password
2021-05-14 19:21:15 +02:00
Nicola Murino
b67cd0d3df
ensure no client is connected before running max connections test cases
2021-05-11 08:04:57 +02:00
Nicola Murino
c8f7fc9bc9
httpd/webdav: add a list of hosts allowed to send proxy headers
...
X-Forwarded-For, X-Real-IP and X-Forwarded-Proto headers will be ignored
for hosts not included in this list.
This is a backward incompatible change, before the proxy headers were
always used
2021-05-11 06:54:06 +02:00
Nicola Murino
8f6cdacd00
allow to limit the number of per-host connections
2021-05-08 19:45:21 +02:00
Nicola Murino
23d9ebfc91
add a basic front-end web interface for end-users
...
Fixes #339 #321 #398
2021-05-06 21:35:43 +02:00
Nicola Murino
32db0787bb
add an example script for scheduled quota updates
2021-04-26 21:53:09 +02:00
Nicola Murino
1275328fdf
Authentication errors: try to avoid user enumeration
...
Fixes #395
2021-04-26 19:48:21 +02:00
Nicola Murino
f4369cdbef
fix max connections check
...
Also make sure to close the ssh client connection in test cases
2021-04-20 18:12:16 +02:00
Nicola Murino
f45c89fc46
add rate limiting support for REST API/web admin too
2021-04-19 08:14:04 +02:00
Nicola Murino
112e3b2fc2
add rate limiting support
2021-04-18 12:31:06 +02:00
Nicola Murino
124c471a2b
FTPD: make sure that the passive ip, if provided, is valid
...
The server will refuse to start if the provided passive ip is not a
valid IPv4 address.
Fixes #376
2021-04-16 15:08:10 +02:00
Nicola Murino
21fbcf4556
FTP: add support for TLS session resumption on the data connection
...
Fixes #374
2021-04-16 09:00:40 +02:00