保护EC2 Amazon Marketplace AMI上的文件夹 [英] Securing Folder on EC2 Amazon Marketplace AMI
问题描述
我打算创办一家小型企业,并将Linux AMI提交到Amazon的AWS Marketplace.在阅读卖方指南时,我看到以下内容:
I'm planning to start a small business and submit an Linux AMI to Amazon's AWS Marketplace. As I'm reading the seller's guide, I see this:
AMI必须具有操作系统级别的管理功能,以允许合规性要求,漏洞更新和日志文件访问.对于基于Linux的AMI,这是通过SSH进行的.( 6.2.2 )
如果使用我的产品的任何人都可以SSH到计算机并四处闲逛,那么如何保护我的源代码?我可以锁定某些文件夹但仍然允许操作系统级别的管理"吗?
How can I protect my source code if anyone who uses my product can SSH to the machine and poke around? Can I lock down certain folders yet still allow "os-level administration"?
如果需要的话,这里是一些上下文:
Here is a bit of context if needed:
- 我正在使用Ubuntu Server 16.04 LTS(HVM),SSD卷类型(ami-cd0f5cb6)作为我的基本AMI
- 我正在配置一个稍微修改的MySQL数据库,希望我的客户能够访问它.这是他们与我的服务进行互动的主要方式.
- 我正在构建将打包在AMI上的django Web服务.这就是我想要锁定并阻止访问的方式.
推荐答案
无论您是否提供SSH访问,用户始终可以将AMI的根EBS卷挂载到另一个EC2实例上,以调查其内容,因此禁用SSH或使SSH用户无法读取某些文件在这方面没有帮助.
Whether or not you provide SSH access, it'll always be possible for your users to mount the root EBS-volume of your AMI on another EC2-instance to investigate its contents, so disabling SSH or making certain files unreadable for an SSH-user doesn't help you in this regard.
与其试图使用户远离您的源代码,我建议您简单地声明允许用户使用它的内容以及服务条款中不允许的内容.
Instead of trying to to keep users away from your source code I suggest you simply state clearly what the users are allowed to do with it and what not in the terms of service.
即使是大公司,也提供操作系统映像,其中包含其应用程序的源代码(无论何时使用脚本语言),格式清晰或模糊不清.
Even large companies provide OS-images which contain the source code of their applications (whenever they use a scripting language) in clear form or just slightly obfuscated.
这篇关于保护EC2 Amazon Marketplace AMI上的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!