xcftp-credentials
- Use aws-transfer-custom-idp-secrets-manager-apig.template.yml cloud formation yaml to spin up/tear down all the resources for the sftp server
- Provisioned resources
- API Gateway
- AWS Transfer Family
- Lambda Application
- Secrets Manager
- A bunch of roles, policies and cloudwatch resources
- Create an S3 bucket - xcftp.lumivero.com
- Create a user role
- Create a user policy
- Create an sftp user
- Create Create an sftp user within Secrets Manager service
- User record must be of format aws/transfer/s-62e9213fc1384fea9/xcftp where the the username will be xcftp
- xcftp
- aws/transfer/s-62e9213fc1384fea9/xcftp
- xcftp-access-role
- xcftp-access-policy
- xcftp-reader
- aws/transfer/s-62e9213fc1384fea9/xcftp-reader
- xcftp-access-role-read
- xcftp-access-policy-read
- xcftp-uploader (only allow uploads into the upload folder in the S3 bucket)
- aws/transfer/s-62e9213fc1384fea9/xcftp-uploader
- xcftp-access-role-upload
- xcftp-access-policy-upload
Each user created under aws/transfer/s-62e9213fc1384fea9/[username] must have the following secrets setup
* Password
* Role (e.g. xcftp-access-role-upload ARN)
* HomeDirectory (/xcftp.lumivero.com/contents)
* PublicKey (key generated for the user using ssh-keygen -t ed25519 -f xcftp-reader -C "username as comment". Store the public key here and private key in onepass)
# use keys from onepass
sftp -i xcftp-reader [email protected]
sftp -i xcftp-uploader [email protected]
# use password from onepass
sftp [email protected]
sftp [email protected]