大橙子数字/secure-storage

Pimcore 安全存储包

dev-master 2024-09-16 06:57 UTC

This package is auto-updated.

Last update: 2024-09-16 06:58:14 UTC


README

Software License Latest Release

发布计划

安装

"require" : {
    "dachcom-digital/secure-storage" : "~1.0.0",
}

将包添加到 bundles.php

return [
    SecureStorageBundle\SecureStorageBundle::class => ['all' => true],
];

描述

动态加密/解密资产!

所需 PHP 扩展

  • openssl

用法

注意

这是一个非常危险的包,如果不小心可能会导致大量数据丢失!请仔细阅读说明!

安全说明

  • 不要定义包含现有资产的路径。创建一个新的文件夹或先删除所有资产。定义后的这些资产无法打开(因为它们没有被加密)
  • 您将无法从配置中删除这些路径。如果必须这样做,您需要先从后端下载资产
  • 在生产环境中部署后,不要更改密钥。加密的资产最终会损坏

限制

  • 安全适配器仅支持 LocalFilesystemAdapter。这是可以接受的,因为其他适配器(如 aws 或 cloudflare)通常默认支持加密
  • 由于 Pimcore 在 TemporaryFileHelperTrait 中使用 getLocaleFileFromStream 方法,因此无法生成缩略图。我们可能在不久的将来解决这个问题

配置

文件加密

secure_storage:
    encrypter:
        options:
            cipher: 'aes-128-cbc'   # default
            key: 'your-12-bit-key'  # create your key with base64_encode(openssl_random_pseudo_bytes(16));

    secured_fly_system_storages:

        # form builder (if you want to encrypt form builder data)
        - storage: form_builder.chunk.storage
        - storage: form_builder.files.storage

        # pimcore
        -
            storage: pimcore.asset.storage
            paths:
                - /secure-storage
                - /formdata

自定义加密器

待定

资产保护

secure_storage:

    pimcore_asset_protection:

        # protects:
        # - public/var/assets [pimcore.asset.storage]
        # - public/tmp/asset-cache [pimcore.asset_cache.storage]
        # - public/tmp/thumbnails [pimcore.thumbnail.storage]
        htaccess_protection_public_directories:
            paths:
                - /secure-storage

        omit_backend_search_indexing:
            paths:
                - /secure-storage

版权和许可

版权: DACHCOM.DIGITAL
有关许可详情,请访问 LICENSE.md

升级信息

在更新之前,请 检查我们的升级说明!