共享资源(文件系统和 LUN)可以单独加密,也可在项目级别加密(因为共享资源会继承项目属性)。以下示例展示了如何通过加密项目本身来加密项目中的所有共享资源。有关加密属性的信息,请参见Encryption Properties。
hostname:shares> project myproject
hostname:shares myproject (uncommitted)> set encryption=aes-128-ccm
encryption = aes-128-ccm (uncommitted)
hostname:shares myproject (uncommitted)> set keystore=LOCAL
keystore = LOCAL (uncommitted)
hostname:shares myproject (uncommitted)> set keyname=MyFirstKey
keyname = MyFirstKey (uncommitted)
hostname:shares myproject (uncommitted)> commit
hostname:shares>
在此项目下创建的所有共享资源将使用 LOCAL(本地)密钥库中名为 "MyFirstKey" 的密钥,自动以 AES-128 CCM 方式加密。
hostname:shares> select myproject
hostname:shares myproject> filesystem f1
hostname:shares myproject/f1 (uncommitted)> commit
hostname:shares myproject> select f1
hostname:shares myproject/f1> get encryption keystore keyname keystatus
encryption = aes-128-ccm (inherited)
keystore = LOCAL (inherited)
keyname = MyFirstKey (inherited)
keystatus = available
hostname:shares myproject/f1> done