Skip to content

Commit ac6742b

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents 6720aab + 63d8882 commit ac6742b

File tree

242 files changed

+46231
-48
lines changed

Some content is hidden

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

242 files changed

+46231
-48
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ body:
1515
attributes:
1616
label: "Checklist"
1717
options:
18-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/bzst-dip-java-client/releases/latest)"
1919
required: true
20-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/bzst-dip-java-client/issues) or [closed](https://github.com/xdev-software/bzst-dip-java-client/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2121
required: true
2222
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2323
required: true

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: "Checklist"
1515
options:
16-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/bzst-dip-java-client/issues) or [closed](https://github.com/xdev-software/bzst-dip-java-client/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1717
required: true
1818
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1919
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/bzst-dip-java-client/issues) or [closed](https://github.com/xdev-software/bzst-dip-java-client/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true

.run/Run Demo CESOP.run.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Run Demo CESOP" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.ApplicationWithCesop" />
4+
<module name="bzst-dip-java-client-demo" />
5+
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
6+
<extension name="coverage">
7+
<pattern>
8+
<option name="PATTERN" value="software.xdev.*" />
9+
<option name="ENABLED" value="true" />
10+
</pattern>
11+
</extension>
12+
<method v="2">
13+
<option name="Make" enabled="true" />
14+
</method>
15+
</configuration>
16+
</component>

.run/Run Demo.run.xml renamed to .run/Run Demo DAC7.run.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
3-
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="template-placeholder-demo" />
2+
<configuration default="false" name="Run Demo DAC7" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.ApplicationWithDac7" />
4+
<module name="bzst-dip-java-client-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# 2.0.2
2+
* Migrated deployment to _Sonatype Maven Central Portal_ [#155](https://github.com/xdev-software/standard-maven-template/issues/155)
3+
* Updated dependencies
4+
5+
# 2.0.1
6+
* Updated dependencies
7+
* Including ``org.apache.httpcomponents.client5:httpclient5`` to ``5.4.3`` due to CVE-2025-27820
8+
9+
# 2.0.0
10+
* Now supports the CESOP-Format (and the DAC7-Format).
11+
* Uses a client that is auto generated by OpenAPI. This makes the library more robust for future changes of the API.
12+
* Certificates can now be defined with a ``SigningProvider``.
13+
14+
# 1.0.3
15+
* ReportableSellerCreator can now create "Rechtsträger" like a company.
16+
17+
# 1.0.2
18+
* The alias for the private key in the keystore is now configurable (
19+
Properties: `certificate.keystore.private.key.alias` or
20+
Code: `BzstDipConfigurationBuilder#setKeyStorePrivateKeyAlias`)
21+
* It is now possible to deactivate the internal validation of the tax-id (
22+
Properties: `tax.id.validate` or
23+
Code: `BzstDipConfigurationBuilder#setValidateTaxID`)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ You should have the following things installed:
3434
* Ensure that the JDK/Java-Version is correct
3535

3636

37-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/release.yml?branch=master)](https://github.com/xdev-software/template-placeholder/actions/workflows/release.yml)
37+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/bzst-dip-java-client/release.yml?branch=master)](https://github.com/xdev-software/bzst-dip-java-client/actions/workflows/release.yml)
3838

3939
Before releasing:
40-
* Consider doing a [test-deployment](https://github.com/xdev-software/template-placeholder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
40+
* Consider doing a [test-deployment](https://github.com/xdev-software/bzst-dip-java-client/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4141
* Check the [changelog](CHANGELOG.md)
4242

4343
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

README.md

Lines changed: 132 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,144 @@
1-
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/template-placeholder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/template-placeholder)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop)
3-
[![API Specification Editor](https://img.shields.io/badge/API--Spec-Editor-85ea2d?logo=swagger)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/xdev-software/template-placeholder/develop/openapi/openapi.yml)
1+
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/bzst-dip-java-client?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/bzst-dip-java-client)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/bzst-dip-java-client/check-build.yml?branch=develop)](https://github.com/xdev-software/bzst-dip-java-client/actions/workflows/check-build.yml?query=branch%3Adevelop)
3+
[![API Specification Editor](https://img.shields.io/badge/API--Spec-Editor-85ea2d?logo=swagger)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/xdev-software/bzst-dip-java-client/develop/openapi/openapi.yml)
44

5-
# template-placeholder
5+
# <img src="assets/logo-v2.svg" height="24" alt="XDEV BZST-DIP-Java-Client Logo"> bzst-dip-java-client
66

7-
This client [is generated](./template-placeholder/pom.xml) from an [``openapi.yml``](./openapi/openapi.yml) using [OpenAPI Generator](https://openapi-generator.tech/).
7+
Client for using the [Mass data transmission DIP (mass data interface)](https://www.bzst.de/EN/Businesses/CESOP/electronic_data_transmission/electronic_data_transmission_node.html#js-toc-entry1).
8+
9+
The BZSt (Bundeszentralamt für Steuern / Federal Central Tax Office) provides the Digital Inbox (DIP) as a service for payment service providers to transmit financial data.
10+
11+
This library uses a [generated](./bzst-dip-java-client/pom.xml) client from an [``openapi.yml``](./openapi/openapi.yml)
12+
using [OpenAPI Generator](https://openapi-generator.tech/).
13+
14+
Clients need to register / login
15+
at [BZSt online.portal](https://www.bzst.de/DE/Service/Portalinformation/Massendaten/DIP/dip.html?nn=68828)
16+
through [Elster](https://www.elster.de/elsterweb/start), [BundID](https://id.bund.de/de)
17+
or [BZSt Online-Portal (BOP)](https://www.elster.de/bportal/start).
18+
19+
See the [BZSt Information](https://www.bzst.de/EN/Service/Portalinformation/Login/login_node.html) for more information.
20+
21+
> [!NOTE]
22+
> **BZSt Online-Portal** (deprecated) is different from **BZSt online.portal**.
23+
24+
> [!IMPORTANT]
25+
> We are currently on version 2.0.0. Since testing with the BZSt is quite difficult,
26+
> **we could not test this version fully**.
27+
>
28+
> If you don't want to take any risk using our client, you can still use the **stable and
29+
tested [version 1.0.3 of this library](https://github.com/xdev-software/bzst-dip-java-client/releases/tag/v1.0.3)**.
30+
>
31+
> If you are **willing to test v2.0.0**, we would very much appreciate your feedback!
32+
33+
## Rationale
34+
35+
We created this client to make it as easy as possible for the developer to use the BZSt DIP.
36+
Through usage of the builder pattern (see [Configuration](#configuration) below), DTOs and a typesafe data model we ensure high usability and readability.
37+
38+
The BZSt provides [XSD](https://www.bzst.de/DE/Unternehmen/Umsatzsteuer/CESOP/Benutzerhandbuch/cesop-benutzerhandbuch.html) that define the expected XML structure and make it possible to generate java classes ([BZSt Docs](https://www.bzst.de/DE/Unternehmen/Intern_Informationsaustausch/DAC7/Handbuecher/handbuecher.html?nn=127558#js-toc-entry2)).<br/>
39+
Our library validates each request through these XSD find errors before they are sent to the DIP.
840

941
## Installation
10-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
42+
[Installation guide for the latest release](https://github.com/xdev-software/bzst-dip-java-client/releases/latest#Installation)
43+
44+
## Usage
45+
46+
See the [examples in the demo package](./bzst-dip-java-client-demo/src/main/java/software/xdev/).
47+
48+
### Create certificate
49+
50+
For authentification at the BZST you have to create a public- and private-key.
51+
52+
First you have to create a **PEM** file as described on the [BZST Website](https://www.bzst.de/DE/Service/Portalinformation/Massendaten/DIP/dip_node.html) (see 1.7).
53+
54+
OpenSSL can be downloaded from the [website](https://www.openssl.org/).
55+
56+
```
57+
openssl req -newkey rsa-pss -new -nodes -x509 -days 3650 -pkeyopt rsa_keygen_bits:4096 -sigopt rsa_pss_saltlen:32 -keyout key.pem -out cert.pem
58+
```
59+
60+
You also have to set the public key in the [BZST online.portal](https://online.portal.bzst.de/).
61+
Exporting the public key with OpenSSL is easy:
1162

12-
## Demo
13-
A minimal demo is also available [here](./template-placeholder-demo/src/main/java/software/xdev/Application.java).
63+
```
64+
openssl rsa -in key.pem -pubout > publicKey.pub
65+
```
66+
67+
Now you can already use these two files to sign your requests. See
68+
the [example with PEM signing](./bzst-dip-java-client-demo/src/main/java/software/xdev/ApplicationWithPem.java).
69+
70+
### Create Java KeyStore (JKS)
71+
72+
If you want to go one step further you can use the Java KeyStore. Then you have to convert the `cert.pem` file to a *
73+
*PKCS12** file.
74+
75+
```
76+
openssl pkcs12 -export -in cert.pem -inkey key.pem -out certificate.p12 -name "certificate"
77+
```
78+
79+
The [keytool](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html) is contained in your JDK installation.
80+
81+
```
82+
keytool -importkeystore -srckeystore certificate.p12 -srcstoretype pkcs12 -destkeystore cert.jks
83+
```
84+
85+
The password you insert here, along with the file itself must be set in the client configuration. See example at [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties):
86+
87+
```
88+
certificate.keystore.password=SECRET_PASSWORD
89+
certificate.keystore.file=cert.jks
90+
```
91+
92+
### Client ID
93+
94+
It's also important to use the client id provided by [BZST online.portal](https://online.portal.bzst.de/)
95+
in the client configuration. See example
96+
at [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties):
97+
98+
```
99+
client.id=abcd1234-ab12-ab12-ab12-abcdef123456
100+
```
101+
102+
### Configuration
103+
104+
The client can be configured through a properties file (
105+
see [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties)
106+
and [ApplicationWithConfigurationFromProperties.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/ApplicationWithConfigurationFromProperties.java))
107+
or by creating a configuration object (
108+
see [ApplicationWithDac7.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/ApplicationWithDac7.java)).
109+
110+
```java
111+
public static BzstDipConfiguration createConfiguration()
112+
{
113+
return new BzstDipConfigurationBuilder()
114+
.setApplicationCode(BzstDipConfiguration.SupportedApplicationCode.DAC7)
115+
.setClientId("abcd1234-ab12-ab12-ab12-abcdef123456")
116+
.setTaxID("86095742719")
117+
.setTaxNumber("123")
118+
.setSigningProvider(new SigningProviderByJks("DemoKeystore.jks", "test123"))
119+
.setRealmEnvironmentBaseUrl(BzstDipConfiguration.ENDPOINT_URL_TEST)
120+
.setMessageTypeIndic(BzstDipDpiMessageType.DPI_401)
121+
.setReportingPeriod(LocalDate.now())
122+
.setDocTypeIndic(BzstDipOecdDocType.OECD_1)
123+
.setPlatformOperatorOrganizationName("TestOrg")
124+
.setPlatformOperatorPlatformName("TestApp")
125+
.setPlatformOperatorAddress(new BzstDipAddressFix("TestCity"))
126+
.buildAndValidate();
127+
}
128+
```
129+
130+
Messages are sent with
131+
DAC7 ([ApplicationWithDac7.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/ApplicationWithDac7.java)) or
132+
the
133+
CESOP ([ApplicationWithCesop.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/ApplicationWithCesop.java))
134+
Format.
14135

15136
## Support
16-
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
137+
138+
If you need support as soon as possible, and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
17139

18140
## Contributing
19141
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
20142

21143
## Dependencies and Licenses
22-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/template-placeholder/dependencies)
144+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/bzst-dip-java-client/dependencies)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/template-placeholder/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/bzst-dip-java-client/security/advisories/new).

0 commit comments

Comments
 (0)