Skip to content

Commit 732ba0d

Browse files
committed
data protection:
- use `Ecotone\DataProtection\Attribute\UsingSensitiveData` to define messages with sensitive data - use `Ecotone\DataProtection\Attribute\Sensitive` to mark properties with sensitive data - define encryption keys with `Ecotone\DataProtection\Configuration\DataProtectionConfiguration` - sensitive data will be encrypted right before its sended to queue and decrypted right after message is being retrieved from queue - data protection require JMSModule to be enabled
1 parent 2cef487 commit 732ba0d

36 files changed

+980
-12
lines changed

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
],
2828
"Ecotone\\Amqp\\": "packages/Amqp/src",
2929
"Ecotone\\AnnotationFinder\\": "packages/Ecotone/src/AnnotationFinder/",
30+
"Ecotone\\DataProtection\\": [
31+
"packages/DataProtection/src"
32+
],
3033
"Ecotone\\Dbal\\": [
3134
"packages/Ecotone/src/Dbal/",
3235
"packages/Dbal/src"
@@ -75,6 +78,9 @@
7578
"Test\\Ecotone\\Amqp\\": [
7679
"packages/Amqp/tests"
7780
],
81+
"Test\\Ecotone\\DataProtection\\": [
82+
"packages/DataProtection/tests"
83+
],
7884
"Test\\Ecotone\\Dbal\\": [
7985
"packages/Dbal/tests"
8086
],
@@ -113,6 +119,7 @@
113119
"php": "^8.2",
114120
"doctrine/dbal": "^3.9|^4.0",
115121
"doctrine/persistence": "^2.5|^3.4",
122+
"defuse/php-encryption": "^2.4",
116123
"enqueue/amqp-lib": "^0.10.25",
117124
"enqueue/redis": "^0.10.9",
118125
"enqueue/sqs": "^0.10.15",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
tests/ export-ignore
2+
.coveralls.yml export-ignore
3+
.gitattributes export-ignore
4+
.gitignore export-ignore
5+
behat.yaml export-ignore
6+
phpstan.neon export-ignore
7+
phpunit.xml export-ignore
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: [dgafka]
4+
patreon: # Replace with a single Open Collective username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: This is Read-Only repository
3+
about: Report at ecotoneframework/ecotone-dev
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Report issue at [ecotone-dev](ecotoneframework/ecotone-dev)

packages/DataProtection/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.idea/
2+
vendor/
3+
bin/
4+
tests/coverage
5+
!tests/coverage/.gitkeep
6+
file
7+
.phpunit.result.cache
8+
composer.lock
9+
phpunit.xml

packages/DataProtection/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) 2025 Dariusz Gafka <[email protected]>
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
12+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
13+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
14+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
15+
THE SOFTWARE.
16+
17+
**Scope of the License**
18+
19+
Apache-2.0 Licence applies to non Enterprise Functionalities of the Ecotone Framework.
20+
Functionalities of the Ecotone Framework referred to as Enterprise functionalities, are not covered under the Apache-2.0 license. These functionalities are provided under a separate Enterprise License.
21+
For details on the Enterprise License, please refer to the [LICENSE-ENTERPRISE](./LICENSE-ENTERPRISE) file.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Copyright (c) 2025 Dariusz Gafka <[email protected]>
2+
3+
Licence is available at [ecotone.tech/documents/ecotone_enterprise_licence.pdf](https://ecotone.tech/documents/ecotone_enterprise_licence.pdf)

packages/DataProtection/README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This is Read Only Repository
2+
To contribute make use of [Ecotone-Dev repository](https://github.com/ecotoneframework/ecotone-dev).
3+
4+
<p align="left"><a href="https://ecotone.tech" target="_blank">
5+
<img src="https://github.com/ecotoneframework/ecotone-dev/blob/main/ecotone_small.png?raw=true">
6+
</a></p>
7+
8+
![Github Actions](https://github.com/ecotoneFramework/ecotone-dev/actions/workflows/split-testing.yml/badge.svg)
9+
[![Latest Stable Version](https://poser.pugx.org/ecotone/ecotone/v/stable)](https://packagist.org/packages/ecotone/ecotone)
10+
[![License](https://poser.pugx.org/ecotone/ecotone/license)](https://packagist.org/packages/ecotone/ecotone)
11+
[![Total Downloads](https://img.shields.io/packagist/dt/ecotone/ecotone)](https://packagist.org/packages/ecotone/ecotone)
12+
[![PHP Version Require](https://img.shields.io/packagist/dependency-v/ecotone/ecotone/php.svg)](https://packagist.org/packages/ecotone/ecotone)
13+
14+
The roots of Object Oriented Programming (OOP) were mainly about communication using Messages and logic encapsulation.
15+
`Ecotone` aims to return to the origins of OOP, by providing tools which allows us to fully move the focus from Objects to Flows, from Data storage to Application Design, from Technicalities to Business logic.
16+
Ecotone does that by making Messages first class-citizen in our Applications.
17+
18+
Thanks to being Message-Driven at the foundation level, Ecotone provides architecture which is resilient and scalable by default, making it possible for Developers to focus on business problems instead of technical concerns.
19+
Together with declarative configuration and higher level building blocks, it makes the system design explicit, easy to follow and change no matter of Developers experience.
20+
21+
Visit main page [ecotone.tech](https://ecotone.tech) to learn more.
22+
23+
> Ecotone can be used with [Symfony](https://docs.ecotone.tech/modules/symfony-ddd-cqrs-event-sourcing) and [Laravel](https://docs.ecotone.tech/modules/laravel-ddd-cqrs-event-sourcing) frameworks, or any other framework using [Ecotone Lite](https://docs.ecotone.tech/install-php-service-bus#install-ecotone-lite-no-framework).
24+
>
25+
## Getting started
26+
27+
The quickstart [page](https://docs.ecotone.tech/quick-start) of the
28+
[reference guide](https://docs.ecotone.tech) provides a starting point for using Ecotone.
29+
Read more on the [Ecotone's Blog](https://blog.ecotone.tech).
30+
31+
## AI-Friendly Documentation
32+
33+
Ecotone provides AI-optimized documentation for use with AI assistants and code editors:
34+
35+
- **MCP Server**: `https://docs.ecotone.tech/~gitbook/mcp` - [Install in VSCode](vscode:mcp/install?%7B%22name%22%3A%22Ecotone%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.ecotone.tech%2F~gitbook%2Fmcp%22%7D)
36+
- **LLMs.txt**: [ecotone.tech/llms.txt](https://ecotone.tech/llms.txt)
37+
- **Context7**: Available via [@upstash/context7-mcp](https://github.com/upstash/context7)
38+
39+
Learn more: [AI Integration Guide](https://docs.ecotone.tech/other/ai-integration)
40+
41+
## Feature requests and issue reporting
42+
43+
Use [issue tracking system](https://github.com/ecotoneframework/ecotone-dev/issues) for new feature request and bugs.
44+
Please verify that it's not already reported by someone else.
45+
46+
## Contact
47+
48+
If you want to talk or ask questions about Ecotone
49+
50+
- [**Twitter**](https://twitter.com/EcotonePHP)
51+
52+
- [**Community Channel**](https://discord.gg/GwM2BSuXeg)
53+
54+
## Support Ecotone
55+
56+
If you want to help building and improving Ecotone consider becoming a sponsor:
57+
58+
- [Sponsor Ecotone](https://github.com/sponsors/dgafka)
59+
- [Contribute to Ecotone](https://github.com/ecotoneframework/ecotone-dev).
60+
61+
## Tags
62+
63+
PHP, DDD, CQRS, Event Sourcing, Symfony, Laravel, Service Bus, Event Driven Architecture, SOA, Events, Commands
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"name": "ecotone/data-protection",
3+
"license": [
4+
"Apache-2.0",
5+
"proprietary"
6+
],
7+
"homepage": "https://docs.ecotone.tech/",
8+
"forum": "https://discord.gg/GwM2BSuXeg",
9+
"type": "library",
10+
"minimum-stability": "dev",
11+
"prefer-stable": true,
12+
"authors": [
13+
{
14+
"name": "Dariusz Gafka",
15+
"email": "[email protected]"
16+
}
17+
],
18+
"keywords": ["ecotone", "Encryption", "OpenSSL", "Data Protection", "Data Obfuscation"],
19+
"description": "Extends Ecotone with Data Protection features allowing to obfuscate messages with sensitive data.",
20+
"autoload": {
21+
"psr-4": {
22+
"Ecotone\\DataProtection\\": "src"
23+
}
24+
},
25+
"autoload-dev": {
26+
"psr-4": {
27+
"Test\\Ecotone\\DataProtection\\": [
28+
"tests"
29+
]
30+
}
31+
},
32+
"require": {
33+
"ext-openssl": "*",
34+
"ecotone/ecotone": "~1.293.0",
35+
"defuse/php-encryption": "^2.4"
36+
},
37+
"require-dev": {
38+
"phpunit/phpunit": "^9.5|^10.5|^11.0",
39+
"phpstan/phpstan": "^1.8",
40+
"psr/container": "^2.0",
41+
"wikimedia/composer-merge-plugin": "^2.1"
42+
},
43+
"scripts": {
44+
"tests:phpstan": "vendor/bin/phpstan",
45+
"tests:phpunit": "vendor/bin/phpunit",
46+
"tests:ci": [
47+
"@tests:phpstan",
48+
"@tests:phpunit"
49+
]
50+
},
51+
"extra": {
52+
"branch-alias": {
53+
"dev-main": "1.62-dev"
54+
},
55+
"ecotone": {
56+
"repository": "DataProtection"
57+
},
58+
"merge-plugin": {
59+
"include": [
60+
"../local_packages.json"
61+
]
62+
},
63+
"license-info": {
64+
"Apache-2.0": {
65+
"name": "Apache License 2.0",
66+
"url": "https://github.com/ecotoneframework/ecotone-dev/blob/main/LICENSE",
67+
"description": "Allows to use non Enterprise features of Ecotone. For more information please write to [email protected]"
68+
},
69+
"proprietary": {
70+
"name": "Enterprise License",
71+
"description": "Allows to use Enterprise features of Ecotone. For more information please write to [email protected]"
72+
}
73+
}
74+
},
75+
"config": {
76+
"allow-plugins": {
77+
"wikimedia/composer-merge-plugin": true
78+
}
79+
}
80+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 1
3+
paths:
4+
- src

0 commit comments

Comments
 (0)