Skip to content

Commit bd63f88

Browse files
tmbertholdomar
and
omar
authored
feat: clearinghouse integration (#2)
* feat: init clearinghouse extension Co-authored-by: omar <omar.silva@sovity.de>
1 parent 713821e commit bd63f88

File tree

47 files changed

+1070
-480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1070
-480
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ All notable changes to this project will be documented in this file.
77
- Add additional meta information to resource payload when publishing to broker
88
- Add connector description to broker message
99
- Add time-interval and participant based policies
10+
- Add ClearingHouse Extension
1011

1112
### Changed
13+
- Modified module structure to have only one Boker and one ClearingHouse Extension
1214
- Bump junit-jupiter-api from 5.8.1 to 5.9.2
1315
- Bump junit-jupiter-engine from 5.8.1 to 5.9.2
1416
- Bump com.github.johnrengelman.shadow from 7.0.0 to 7.1.2

CODE_OF_CONDUCT.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Code of Conduct
2+
## Our Pledge
3+
4+
In the interest of fostering an open and welcoming environment, we as
5+
contributors and maintainers pledge to making participation in our project and
6+
our community a harassment-free experience for everyone, regardless of age, body
7+
size, disability, ethnicity, gender identity and expression, level of experience,
8+
nationality, personal appearance, race, religion, or sexual identity and
9+
orientation.
10+
11+
## Our Standards
12+
13+
Examples of behavior that contributes to creating a positive environment
14+
include:
15+
16+
* Using welcoming and inclusive language
17+
* Being respectful of differing viewpoints and experiences
18+
* Gracefully accepting constructive criticism
19+
* Focusing on what is best for the community
20+
* Showing empathy towards other community members
21+
22+
Examples of unacceptable behavior by participants include:
23+
24+
* The use of sexualized language or imagery and unwelcome sexual attention or
25+
advances
26+
* Trolling, insulting/derogatory comments, and personal or political attacks
27+
* Public or private harassment
28+
* Publishing others' private information, such as a physical or electronic
29+
address, without explicit permission
30+
* Other conduct which could reasonably be considered inappropriate in a
31+
professional setting
32+
33+
## Our Responsibilities
34+
35+
Project maintainers are responsible for clarifying the standards of acceptable
36+
behavior and are expected to take appropriate and fair corrective action in
37+
response to any instances of unacceptable behavior.
38+
39+
Project maintainers have the right and responsibility to remove, edit, or
40+
reject comments, commits, code, wiki edits, issues, and other contributions
41+
that are not aligned to this Code of Conduct, or to ban temporarily or
42+
permanently any contributor for other behaviors that they deem inappropriate,
43+
threatening, offensive, or harmful.
44+
45+
## Scope
46+
47+
This Code of Conduct applies both within project spaces and in public spaces
48+
when an individual is representing the project or its community. Examples of
49+
representing a project or community include using an official project e-mail
50+
address, posting via an official social media account, or acting as an appointed
51+
representative at an online or offline event. Representation of a project may be
52+
further defined and clarified by project maintainers.
53+
54+
## Enforcement
55+
56+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
57+
reported by contacting the project team. All
58+
complaints will be reviewed and investigated and will result in a response that
59+
is deemed necessary and appropriate to the circumstances. The project team is
60+
obligated to maintain confidentiality with regard to the reporter of an incident.
61+
Further details of specific enforcement policies may be posted separately.
62+
63+
Project maintainers who do not follow or enforce the Code of Conduct in good
64+
faith may face temporary or permanent repercussions as determined by other
65+
members of the project's leadership.
66+
67+
## Attribution
68+
69+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org),
70+
version 1.4, available at http://contributor-covenant.org/version/1/4.

CONTRIBUTING.md

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Contributing to the Project
2+
3+
Thank you for your interest in contributing to this project
4+
5+
## Table of Contents
6+
7+
* [Code Of Conduct](#code-of-conduct)
8+
* [How to Contribute](#how-to-contribute)
9+
* [Discuss](#discuss)
10+
* [Create an Issue](#create-an-issue)
11+
* [Submit a Pull Request](#submit-a-pull-request)
12+
* [Report on Flaky Tests](#report-on-flaky-tests)
13+
* [Etiquette for pull requests](#etiquette-for-pull-requests)
14+
* [Contact Us](#contact-us)
15+
16+
## Code Of Conduct
17+
18+
See the [Code Of Conduct](CODE_OF_CONDUCT.md).
19+
20+
## How to Contribute
21+
22+
### Discuss
23+
24+
If you want to share an idea to further enhance the project or discuss potential use cases, please feel free to create a
25+
discussion at the `GitHub Discussions page`]
26+
If you feel there is a bug or an issue, contribute to the discussions in `existing issues`
27+
otherwise [create a new issue](#create-an-issue).
28+
29+
### Create an Issue
30+
31+
If you have identified a bug or want to formulate a working item that you want to concentrate on, feel free to create a
32+
new issue at our project's corresponding `GitHub Issues page`. Before doing so, please consider searching for
33+
potentially suitable `existing issues`.
34+
35+
We also
36+
use [GitHub's default label set](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels)
37+
extended by custom ones to classify issues and improve findability.
38+
39+
If an issue appears to cover changes that will have a (huge) impact on the code base and needs to
40+
first be discussed, or if you just have a question regarding the usage of the software, please
41+
create a `discussion` before raising an issue.
42+
43+
Please note that if an issue covers a topic or the response to a question that may be interesting
44+
for other developers or contributors, or for further discussions, it should be converted to a
45+
discussion and not be closed.
46+
47+
### Adhere to Coding Style Guide
48+
49+
We aim for a coherent and consistent code base, thus the coding style detailed in the [styleguide](STYLEGUIDE.md) should
50+
be followed.
51+
52+
### Submit a Pull Request
53+
54+
We would appreciate if your pull request applies to the following points:
55+
56+
* Conform to following [Etiquette for pull requests](#etiquette-for-pull-requests):
57+
58+
* Make sure to adjust copyright headers appropriately.
59+
60+
* The git commit messages should comply to the following format:
61+
```
62+
<prefix>(<scope>): <description>
63+
```
64+
65+
Use the [imperative mood](https://github.com/git/git/blob/master/Documentation/SubmittingPatches)
66+
as in "Fix bug" or "Add feature" rather than "Fixed bug" or "Added feature" and
67+
[mention the GitHub issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
68+
e.g. `chore(transfer process): improve logging`.
69+
70+
* Add meaningful tests to verify your submission acts as expected.
71+
72+
* Where code is not self-explanatory, add documentation providing extra clarification.
73+
74+
* PR descriptions should use the current [PR template](.github/PULL_REQUEST_TEMPLATE.md)
75+
76+
* Submit a draft pull request at early-stage and add people previously working on the same code as
77+
reviewer. Make sure automatic checks pass before marking it as "ready for review":
78+
79+
* _Continuous Integration_ performing various test conventions.
80+
81+
### Report on Flaky Tests
82+
83+
If you discover a randomly failing ("flaky") test, please take the time to check whether an issue for that already
84+
exists and if not, create an issue yourself, providing meaningful description and a link to the failing run. Please also
85+
label it with `Bug` and `github`. Then assign it to whoever was the original author of the relevant piece of code or
86+
whoever worked on it last. If assigning the issue is not possible due to missing rights, please just comment and
87+
@mention the author/last editor.
88+
89+
Please do not just restart the run, as this would overwrite the results. If you need to, a better way of doing this is
90+
to push an empty commit. This will trigger another run.
91+
92+
```bash
93+
git commit --allow-empty -m "trigger CI" && git push
94+
```
95+
96+
If an issue labeled with `Bug` and `github` is assigned to you, please prioritize addressing this issue as other
97+
people will be affected.
98+
We are taking the quality of our code very serious and reporting on flaky tests is an important step toward improvement
99+
in that area.
100+
101+
## Etiquette for pull requests
102+
103+
### As an author
104+
105+
Submitting pull requests should be done while adhering to a couple of simple rules.
106+
107+
- Familiarize yourself with [coding style](STYLEGUIDE.md), architectural patterns and other contribution guidelines.
108+
- No surprise PRs please. Before you submit a PR, open a discussion or an issue outlining your planned work and give
109+
people time to comment. It may even be advisable to contact committers using the `@mention` feature. Unsolicited PRs
110+
may get ignored or rejected.
111+
- Create focused PRs: your work should be focused on one particular feature or bug. Do not create broad-scoped PRs that
112+
solve multiple issues as reviewers may reject those PR bombs outright.
113+
- Provide a clear description and motivation in the PR description in GitHub. This makes the reviewer's life much
114+
easier. It is also helpful to outline the broad changes that were made, e.g. "Changes the schema of XYZ-Entity:
115+
the `age` field changed from `long` to `String`".
116+
- If you introduce new 3rd party dependencies, be sure to note them in the PR description and explain why they are
117+
necessary.
118+
- Stick to the established code style, please refer to the [styleguide document](STYLEGUIDE.md).
119+
- All tests should be green, especially when your PR is in `"Ready for review"`
120+
- Mark PRs as `"Ready for review"` only when you're prepared to defend your work. By that time you have completed your
121+
work and shouldn't need to push any more commits other than to incorporate review comments.
122+
- Merge conflicts should be resolved by squashing all commits on the PR branch, rebasing onto `main` and
123+
force-pushing. Do this when your PR is ready to review.
124+
- If you require a reviewer's input while it's still in draft, please contact the designated reviewer using
125+
the `@mention` feature and let them know what you'd like them to look at.
126+
- Re-request reviews after all remarks have been adopted. This helps reviewers track their work in GitHub.
127+
- If you disagree with a committer's remarks, feel free to object and argue, but if no agreement is reached, you'll have
128+
to either accept the decision or withdraw your PR.
129+
- Be civil and objective. No foul language, insulting or otherwise abusive language will be tolerated.
130+
- The PR titles must follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
131+
- The title must follow the format as `<type>(<optional scope>): <description>`.
132+
`build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, `test` are allowed for
133+
the `<type>`.
134+
- The length must be kept under 80 characters.
135+
136+
### As a reviewer
137+
138+
- Have a look at [Pull Request Review Pyramide](https://www.morling.dev/blog/the-code-review-pyramid/)
139+
- Please complete reviews within two business days or delegate to another committer, removing yourself as a reviewer.
140+
- If you have been requested as reviewer, but cannot do the review for any reason (time, lack of knowledge in particular
141+
area, etc.) please comment that in the PR and remove yourself as a reviewer, suggesting a stand-in.
142+
- Don't be overly pedantic.
143+
- Don't argue basic principles (code style, architectural decisions, etc.)
144+
- Use the `suggestion` feature of GitHub for small/simple changes.
145+
- The following could serve you as a review checklist:
146+
- no unnecessary dependencies in `build.gradle.kts`
147+
- sensible unit tests, prefer unit tests over integration tests wherever possible (test runtime). Also check the
148+
usage of test tags.
149+
- code style
150+
- simplicity and "uncluttered-ness" of the code
151+
- overall focus of the PR
152+
- Don't just wave through any PR. Please take the time to look at them carefully.
153+
- Be civil and objective. No foul language, insulting or otherwise abusive language will be tolerated. The goal is to
154+
_encourage_ contributions.
155+
156+
## Contact Us
157+
158+
If you have questions or suggestions, do not hesitate to contact the project developers via https://github.com/sovity.
159+
160+
## Attribution
161+
162+
This file is adapted from the [eclipse-edc](https://github.com/eclipse-dataspaceconnector/DataSpaceConnector) project.

README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# EDC-Connector Broker Extension
2-
To get started, a sample docker-compose file is located in the resources/docs folder.
1+
# EDC-Connector Extensions
2+
3+
## About The Project
4+
In this repo are different extensions of the EDC-Connector, among others a Broker-Extension to communicate with an IDS-Broker as well as a ClearingHouse-Extension to communicate with an IDS-ClearingHouse.
5+
6+
## Getting Started
7+
8+
To get started and run the extensions with an EDC, a sample docker-compose file is located in the resources/docs folder.
39

4-
## Run extension with EDC
510
### Configuration
611
#### Basic Configuration
712
- `EDC_IDS_TITLE`: _Title of the Connector_
@@ -15,6 +20,7 @@ To get started, a sample docker-compose file is located in the resources/docs fo
1520
#### MDS Environment Configuration
1621
The dev environment is set by default.
1722
- `EDC_BROKER_BASE_URL:` https://broker.dev.mobility-dataspace.eu
23+
- `EDC_CLEARINGHOUSE_LOG_URL`: https://clearing.dev.mobility-dataspace.eu/messages/log
1824
- `EDC_OAUTH_CLIENT_ID:` _To be able to start an EDC-Connector with the broker-extensions, the `SKI` and `AKI` of the connector certificate must be entered as `client-ID` in the docker-compose and the .jks must be placed under the path specified in the docker-compose (in the example in the folder `resources/vault/edc/`, see `EDC_KEYSTORE` setting)._
1925
- `EDC_OAUTH_TOKEN_URL:` https://daps.dev.mobility-dataspace.eu/token
2026
- `EDC_OAUTH_PROVIDER_JWKS_URL:` https://daps.dev.mobility-dataspace.eu/jwks.json
@@ -75,3 +81,6 @@ Copy the SKI:AKI combination and use it to start the EDC (optionally also save i
7581

7682
## License
7783
This project is licensed under the Apache License 2.0 - see [here](LICENSE) for details.
84+
85+
## Contact
86+
Sovity GmbH Support - support@sovity.de

SECURITY.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Security
2+
3+
sovity GmbH takes the security of its software products and services seriously, which includes all source code repositories managed through our GitHub organization: [sovity](https://github.com/sovity).
4+
5+
If you believe you have found a security vulnerability in any of sovity's owned repositories, please report it to us as described below.
6+
7+
## Reporting Security Issues
8+
9+
**Please do not report security vulnerabilities through public GitHub issues.**
10+
11+
Instead, please report them via mail: [security@sovity.de](mailto:security@sovity.de)
12+
13+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
14+
15+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
16+
17+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
18+
* Full paths of source file(s) related to the manifestation of the issue
19+
* The location of the affected source code (tag/branch/commit or direct URL)
20+
* Any special configuration required to reproduce the issue
21+
* Step-by-step instructions to reproduce the issue
22+
* Proof-of-concept or exploit code (if possible)
23+
* Impact of the issue, including how an attacker might exploit the issue
24+
25+
This information will help us triage your report more quickly.
26+
27+
## Preferred Languages
28+
29+
We prefer all communications to be in English.
30+
31+
## Attribution
32+
This file is adapted from [eclipse-edc](https://github.com/eclipse-edc/DataDashboard) project.

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ subprojects {
8080
}
8181
}
8282
}
83-
}
83+
}

connector/build.gradle.kts

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ val edcVersion: String by project
88
val edcGroup: String by project
99

1010
dependencies {
11-
implementation(project(":extensions:catalog-transfer-extension"))
12-
implementation(project(":extensions:event-asset-provider"))
11+
implementation(project(":extensions:broker"))
12+
implementation(project(":extensions:clearinghouse"))
1313
implementation(project(":extensions:policy-referringConnector"))
1414
implementation(project(":extensions:policy-timeinterval"))
15+
1516
implementation("${edcGroup}:control-plane-core:${edcVersion}")
1617
implementation("${edcGroup}:api-observability:${edcVersion}")
1718
implementation("${edcGroup}:data-management-api:${edcVersion}")

extensions/broker/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EDC-Connector Broker Extensions
2+
To get started, a sample docker-compose file is located in the /resources/docs folder.
3+
4+
## Configuration
5+
Settings required for this extension:
6+
7+
- `EDC_BROKER_BASE_URL:` https://broker.dev.mobility-dataspace.eu
8+
- `EDC_CONNECTOR_NAME:` _The name of the connector_
9+
- `EDC_IDS_DESCRIPTION`: _Description of the Connector_
10+
- `EDC_IDS_CURATOR:` _URL of the curator, i.e. the company, which configures data offerings etc._
11+
12+
## License
13+
This project is licensed under the Apache License 2.0.
14+
15+
## Contact
16+
sovity GmbH support - support@sovity.de

extensions/broker/build.gradle.kts

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
plugins {
2+
`java-library`
3+
}
4+
5+
val edcVersion: String by project
6+
val edcGroup: String by project
7+
val jupiterVersion: String by project
8+
val mockitoVersion: String by project
9+
val assertj: String by project
10+
val okHttpVersion: String by project
11+
12+
dependencies {
13+
implementation("${edcGroup}:control-plane-core:${edcVersion}")
14+
implementation("${edcGroup}:ids-spi:${edcVersion}")
15+
implementation("${edcGroup}:ids-api-multipart-dispatcher-v1:${edcVersion}")
16+
implementation("${edcGroup}:ids-api-configuration:${edcVersion}")
17+
implementation("${edcGroup}:ids-jsonld-serdes:${edcVersion}")
18+
19+
implementation("com.squareup.okhttp3:okhttp:${okHttpVersion}")
20+
21+
testImplementation("org.assertj:assertj-core:${assertj}")
22+
testImplementation("org.junit.jupiter:junit-jupiter-api:${jupiterVersion}")
23+
testImplementation("org.mockito:mockito-core:${mockitoVersion}")
24+
testImplementation("org.mockito:mockito-core:${mockitoVersion}")
25+
testImplementation("org.junit.jupiter:junit-jupiter-params:${jupiterVersion}")
26+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${jupiterVersion}")
27+
}
28+
29+
tasks.getByName<Test>("test") {
30+
useJUnitPlatform()
31+
}
32+
33+
tasks.register("prepareKotlinBuildScriptModel"){}

0 commit comments

Comments
 (0)