Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Sep 6, 2024
0 parents commit f3b0bb8
Show file tree
Hide file tree
Showing 19 changed files with 1,030 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
######################
# Compiled source #
######################
*.com
*.class
*.dll
*.exe
*.o
*.so

######################
# Packages #
######################
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar

######################
# Logs and databases #
######################
*.log

######################
# Global #
######################
.DS_Store
.DS_Store\?
._*
.Spotlight-V100
.Trashes
Icon\?
*.sublime-workspace
*.sublime-project
atlassian-ide-plugin.xml
.idea/
.project
ehthumbs.db
Thumbs.db
Vagrantfile
.vagrant
php-cgi.core
.sass-cache

# codeception (only stage *.dist.yml config files)
/codeception.yml
/tests/codeception.yml
/tests/*.suite.yml
/tests/_output/*
/tests/_data/*
!/tests/_data/.gitkeep
/tests/Support/_generated/*
40 changes: 40 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributor Covenant Code of Conduct

## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards
Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
12 changes: 12 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
| Q | A
| ---------------- | -----
| Bug report? | yes/no
| Feature request? | yes/no
| BC Break report? | yes/no
| RFC? | yes/no

<!--
- Please fill in this template according to your issue.
- For support request or how-tos, visit https://gitter.im/pimcore/pimcore or https://talk.pimcore.org/
- Otherwise, replace this comment by the description of your issue.
-->
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# License
Copyright (C) 2024 DACHCOM.DIGITAL

This software is available under the GNU General Public License version 3 (GPLv3).

### GNU General Public License version 3 (GPLv3)
If you decide to choose the GPLv3 license, you must comply with the following terms:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

[GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html)
12 changes: 12 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
| Q | A
| ------------- | ---
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | no
| Deprecations? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
-->
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Pimcore Secure Storage Bundle
[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Latest Release](https://img.shields.io/packagist/v/dachcom-digital/secure-storage.svg?style=flat-square)](https://packagist.org/packages/dachcom-digital/secure-storage)

### Release Plan

| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---------|----------------------------|----------------------------|--------------|----------------|--------|
| **1.x** | `^11.2` | `6.2` | -- | Feature Branch | master |


## Installation

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

Add Bundle to `bundles.php`:
```php
return [
SecureStorageBundle\SecureStorageBundle::class => ['all' => true],
];
```

## Description
Encrypt/Decrypt assets on the fly!

## Usage

> [!CAUTION]
> This is a very, very dangerous bundle which can lead to heavy data loss, if you're not careful!
> Please read the instructions carefully!
## Safety Instructions
- Do not define paths with existing assets. Create a new folder or delete all assets first. Those assets can't be opened after defined (since they're not encrypted)
- You'll never be able to remove those paths from configuration. If you have to, you need to download the assets from backend first
- Do not change the key, after you pushed this to production. Encrypted assets will be end up corrupt

## Limitations
- The secure adapter only supports the `LocalFilesystemAdapter`. This is fine, since other adapters like aws or cloudflare usually already support encryption by default
- Thumbnails can't be generated, since pimcore uses the `getLocaleFileFromStream` method in `TemporaryFileHelperTrait`. This is something we might can fix in the near future

## Configuration

```yaml
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
paths: null
-
storage: form_builder.files.storage
paths: null

# pimcore
-
storage: pimcore.asset.storage
paths:
- /secure-storage
- /formdata
```
## Custom Encrypter
TBD
***
## Copyright and license
Copyright: [DACHCOM.DIGITAL](http://dachcom-digital.ch)
For licensing details please visit [LICENSE.md](LICENSE.md)
## Upgrade Info
Before updating, please [check our upgrade notes!](UPGRADE.md)
1 change: 1 addition & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Upgrade Notes
44 changes: 44 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "dachcom-digital/secure-storage",
"type": "pimcore-bundle",
"license": "GPL-3.0-or-later",
"description": "Pimcore Security Storage Bundle",
"keywords": ["pimcore", "security", "flystem", "encryption"],
"homepage": "https://github.com/dachcom-digital/pimcore-secure-storage",
"authors": [
{
"name": "DACHCOM.DIGITAL Stefan Hagspiel",
"email": "[email protected]",
"homepage": "http://www.dachcom.com/",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"SecureStorageBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"": "src/"
}
},
"extra": {
"pimcore": {
"bundles": [
"SecureStorageBundle\\SecureStorageBundle"
]
}
},
"require": {
"pimcore/pimcore": "^11.0"
},
"require-dev": {
"codeception/codeception": "^5.0",
"codeception/module-symfony": "^3.1",
"codeception/module-webdriver": "^4.0",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"symplify/easy-coding-standard": "^9.0"
}
}
2 changes: 2 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports:
- { resource: services/*.yaml }
Loading

0 comments on commit f3b0bb8

Please sign in to comment.