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

feat(filetransfer): support for a file transfer component #1369

Merged
merged 2 commits into from
Aug 15, 2020

Conversation

roleyfoley
Copy link
Contributor

@roleyfoley roleyfoley commented Aug 10, 2020

Description

Adds support for a new component the filetransfer component. This component is intended to provide file transfer capabilities using vendor agnostic protocols for cloud based storage.

The component consists of two parts

  • filetransfer which represents the service endpoint itself
  • users - The existing component provides the user drive mapping and credentials management in a similar way that it does for cloud resources and API's. A user component links to the filetransfer server to provision the user on the server. Then links to datasources that it wants available over the filetransfer component.

This allows each user to be provisioned with the resources they require

Example of a solution

                "user" : {
                    "user" : {
                        "Instances" : {
                            "user1" : {
                                "DeploymentUnits" : [ "user1"]
                            }
                        },
                        "Fragment" : "_user",
                        "SSHPublicKeys" : {
                            "key1" : {
                                "SettingName" : "SSH_PUBLIC_KEY"
                            }
                        },
                        "Links" : {
                            "sftp" : {
                                "Tier" : "mgmt",
                                "Component" : "sftp",
                                "Instance" : "",
                                "Version" : ""
                            },
                            "bucket" : {
                                "Tier" : "mgmt",
                                "Component" : "bucket",
                                "Instance" : "",
                                "Version" : "",
                                "Role" : "all"
                            }
                        }
                    }
                },
                "sftp" : {
                    "filetransfer" : {
                        "Instances" : {
                            "default" : {
                                "DeploymentUnits" : [ "sftp" ]
                            }
                        },
                        "IPAddressGroups" : [ "_localnet", "gosource" ],
                        "Protocols" : [ "sftp" ]
                    }
                },
                "bucket" : {
                    "s3" : {
                        "Instances" : {
                            "default" : {
                                "DeploymentUnits" : [ "bucket" ]
                            }
                        },
                        "Encryption" : {
                            "Enabled" : true
                        }
                    }
                }

Along with that there is also a fragment on the user to manage their home drive mappings, essentially allowing for chroot style file permission access with mounted directories

[#case "_user" ]
    [@userTransferMount
        name="home"
        s3LinkId="bucket"
        mountPrefix="/my_home/"
        s3Prefix=r'/${transfer:UserName}'
    /]
    [#break]

When using AWS, s3 Prefix supports some dynamic values as well

Motivation and Context

When integrating with on premises systems they might not support the cloud native storage access for services like S3 or Azure blob storage. The file transfer component aims to make these storage services available via vendor agnostic services

How Has This Been Tested?

Tested on an active deployment and basic test cases added

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves the structure or operation of the implementation)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Followup Actions

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • None of the above.

Copy link
Contributor

@ml019 ml019 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a reasonable initial implementation.

@ml019 ml019 merged commit 275c738 into hamlet-io:master Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants