Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Optimized SFTPGo Configuration #80

Open
ProfessorManhattan opened this issue Aug 4, 2023 · 4 comments · May be fixed by #122
Open

Create Optimized SFTPGo Configuration #80

ProfessorManhattan opened this issue Aug 4, 2023 · 4 comments · May be fixed by #122
Assignees
Labels
enhancement New feature or request

Comments

@ProfessorManhattan
Copy link
Contributor

ProfessorManhattan commented Aug 4, 2023

💡 Feature/Idea

Create an optimized SFTPGo configuration so SFTPGo can be used as a service, providing SFTP access and more. The configuration is located at home/dot_local/etc/sftpgo/sftpgo.json.tmpl.

  1. Configure ACME to automatically acquire LetsEncrypt certificates. We should leverage the CloudFlare secrets to automatically handle the validation: https://github.com/go-acme/lego/blob/master/providers/dns/cloudflare/cloudflare.go
  2. Do research on GitHub and look for other configurations and incorporate useful settings from them. For instance, optimize the defender configuration.
  3. Configure SFTPGo to utilize CloudFlare tunnels. This will involve adding a section to home/dot_local/etc/cloudflared
  4. Set up branding to use Install Doctor logos etc.
  5. Look into whether we can provide access to the files stored in the S3 buckets through the SFTPGo interfaces (like the web interface) --- see https://github.com/drakkan/sftpgo/blob/main/docs/s3.md
  6. Scope the access to be restricted to the user's home folder
  7. Configure to use MOTD banner
  8. More.. research and figure out the optimal settings that integrate with our current system
  9. Configure SFTPGo to use JumpCloud as the LDAP provider
  10. Look into implementing https://github.com/drakkan/sftpgo/blob/main/docs/sftp-subsystem.md --- are there any drawbacks from implementing this feature?

SFTPGo has a lot of powerful options and I'd like to set up all the ones we can configure headlessly.

👍 Can you contribute?

No response

@ProfessorManhattan ProfessorManhattan added the enhancement New feature or request label Aug 4, 2023
@enggnr
Copy link
Contributor

enggnr commented Nov 15, 2023

  1. Configure ACME to automatically acquire LetsEncrypt certificates. We should leverage the CloudFlare secrets to automatically handle the validation: https://github.com/go-acme/lego/blob/master/providers/dns/cloudflare/cloudflare.go

For using DNS verification, it is necessary to use the lego (or another) tool. The ACME protocol support built into SFTPgo supports only HTTP-01 and TLS-ALPN-01 - see.

  1. Do research on GitHub and look for other configurations and incorporate useful settings from them. For instance, optimize the defender configuration.

Did not find much custom configurations. We may have to use the settings that works best for our setup.

  1. Configure SFTPGo to utilize CloudFlare tunnels

This is complete.

@enggnr
Copy link
Contributor

enggnr commented Nov 21, 2023

  1. Set up branding to use Install Doctor logos etc.

This is done. Updated the config to use Megabye/ID logos and favicon.

  1. Look into whether we can provide access to the files stored in the S3 buckets through the SFTPGo interfaces (like the web interface) --- see https://github.com/drakkan/sftpgo/blob/main/docs/s3.md

Yes, this is possible by creating the user with S3 as the backend, or providing a virtual folder. Do you have any specific setting in mind for this - should it be the home folder for a given user, or have multiple users have folders in a given bucket, etc.? There are quite a few options available.

  1. Scope the access to be restricted to the user's home folder

It appears that this is the default. SFTPGo users have home/virtual folders configured in their account. This can be a local folder, remote folder or a S3 compatible backend and the actions they perform is restricted to these. This is controlled by the permissions granted.

  1. Configure to use MOTD banner

Added a banner in the config folder of sftpgo. For now it is the same as the banner for SSH.

  1. Look into implementing https://github.com/drakkan/sftpgo/blob/main/docs/sftp-subsystem.md --- are there any drawbacks from implementing this feature?

I read in some of the issues where the developer says they do not recommend this. It has some limitation when compared to using standalone SFTPGo - like restricted data providers, unable to limit user sessions and reduced ciphers. It may be best to have stfpgo completely separated from ssh.

@enggnr
Copy link
Contributor

enggnr commented Nov 22, 2023

  1. More.. research and figure out the optimal settings that integrate with our current system
  • Added integration with Netdata
  • Yet to add Vault integration. Hashicorp vault integration needs Enterprise edition. Integrating with AWS or Azure KMS solutions is possible. This can be taken up as an enhancement when needed.

@enggnr
Copy link
Contributor

enggnr commented Nov 24, 2023

  1. Configure SFTPGo to use JumpCloud as the LDAP provider

This is complete. Please review the settings where the Bind DN information is passed to see if this can be improved.

@enggnr enggnr linked a pull request Nov 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants