GithubHelp home page GithubHelp logo

rossdrew / spokesman-sftp Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 58 KB

An SFTP server that provides access to other file systems (i.e. Amazon S3 buckets) as if they were on the SFTP server.

Java 100.00%
sftp sftp-server s3 ftp

spokesman-sftp's Introduction

Spokesman SFTP

An SFTP Server which -when connected to- provides access to Amazon S3 buckets

Usage

Specify port Start as Java process

mvn clean package spring-boot:run

then connect

sftp -P 21000 -i key.pem localhost

Users & Access

Client Access to SFTP Server

Clients connect to Spokesman SFTP using their ssh key (testKey pass is hubio). At the moment, permitted keys are stored in authorized_keys. Spokesman will verify it's identity with the key in authorizedKeysFile (application.yml)

SFTP Access to S3

The username provided by the client to Spokesman is then used to limit which Amazon S3 bucket (defined as home in application.yml) is visible to that user (application.yml). As directories provided to SFTP users is managed here, Spokesman will connect to S3 as a single user. Amazon S3 access keys (s3fs_access_key & s3fs_secret_key) need to be specified in amazon.properties for this user in order for Spokesman to access S3. On S3, permissions need to be set so that any directory that will be usable by any SFTP user, for example:-

 users:
   exampleUsername:
     home: example_bucket

should be accessable to the S3 user linked to the provided keys, i.e.

{
   "Version": "2012-10-17",
   "Statement": [
       {
           "Effect": "Allow",
           "Action": "s3:*",
           "Resource": [
              "arn:aws:s3:::example_bucket/*",
              "arn:aws:s3:::example_bucket"
           ]
       },
       {
           "Effect": "Allow",
           "Action": "s3:ListAllMyBuckets",
           "Resource": "*"
       }
   ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.