2014年7月8日 星期二

Security isolation and Docker

圖片來源:網路


根據Xen Community PH值還算沒有小於一的文章 The Docker exploit and the security of containers提到,Docker 的確是個不錯的工具,適合以下情境:
  • Excellent tool for packaging and deploying applications
  • Using containers to separate an application from the rest of the user-space of your distribution

也就是Docker 所要佈署的程式都,最好都是你trust 的program,並不適合類比成VM使用,因此在Hack new 上Docker 的作者也有跳出來說:

Please remember that at this time, we don't claim Docker out-of-the-box is suitable for containing untrusted programs with root privileges. So if you're thinking "pfew, good thing we upgraded to 1.0 or we were toast", you need to change your underlying configuration now. Add apparmor or selinux containment, map trust groups to separate machines, or ideally don't grant root access to the application.

Docker will soon support user namespaces, which is a great additional security layer but also not a silver bullet!

When we feel comfortable saying that Docker out-of-the-box can safely contain untrusted uid0 programs, we will say so clearly.
最後Xen Community 也有幾個建議:

However, using containers for security isolation is not a good idea. In a blog last August, one of Docker’s engineers expressed optimism that containers would eventually catch up to virtual machines from a security standpoint. But in a presentation given in January, the same engineer said that the only way to have real isolation with Docker was to either run one Docker per host, or one Docker per VM. (Or, as Solomon Hykes says here, to use Dockers that trust each other in the same host or the same VM.)
結論:

好的工具也是要用對地方,用對方法~:P

延伸閱讀:

[1] Docker Security
[2] Solomon Hykes Explains Docker

2014年7月1日 星期二

[研究] HyperV Virtual Network Type


如上圖所示,Hyper-V的網路架構是在Hyper-V host Level 可以建立很多virtual switch,每個VM都要透過網路卡(Virtual Network Adapter)連接到 virtual switch 上面,而Hyper-V 網路卡(類型主要有三種:

External Virtual Networks


這種類型的網路卡是直接跟Hyper-V host 實體網路卡綁定

Internal Virtual Networks


沒有跟實體網路卡綁定,所以無法接觸外部網路,主要用來VM與VM之間或是VM與Hyper-V host 之間的通訊。


Private Virtual Networks


單純給VM資間用來通訊使用(適合VM Cluster 通訊情境)

[Magento] 安裝 Extention 發生404 not found 該如何處理


如果安裝完Magento 的extention 在System --> Configuration 發現是404 not found 該如何處理


Step 0: Clear your cache AND sessions on the live server.

Step 1: Check if your module is installed using the free/open-source Module List Module

Step 2: Drop some debugging code in the following method. The var_dumps will tell you which files/classes Magento's routers are looking for with your module, but can't find.


Reference:

[1] Magento Extension 404 Error