Skip to content

Commit 3426598

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents 946e9b2 + 943fa98 commit 3426598

File tree

137 files changed

+26324
-33
lines changed

Some content is hidden

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

137 files changed

+26324
-33
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ body:
1414
attributes:
1515
label: "Checklist"
1616
options:
17-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
17+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/bzst-dip-java-client/releases/latest)"
1818
required: true
19-
- 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."
19+
- 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."
2020
required: true
2121
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2222
required: true

.github/ISSUE_TEMPLATE/enhancement.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 feature request will be dismissed otherwise."
1818
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.run.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
33
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="template-placeholder-demo" />
4+
<module name="bzst-dip-java-client-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>
88
<option name="PATTERN" value="software.xdev.*" />
99
<option name="ENABLED" value="true" />
1010
</pattern>
1111
</extension>
12+
<extension name="software.aws.toolkits.jetbrains.core.execution.JavaAwsConnectionExtension">
13+
<option name="credential" />
14+
<option name="region" />
15+
<option name="useCurrentConnection" value="false" />
16+
</extension>
1217
<method v="2">
1318
<option name="Make" enabled="true" />
1419
</method>

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 1.0.3
2+
3+
* ReportableSellerCreator can now create "Rechtsträger" like a company.
4+
5+
# 1.0.2
6+
7+
* The alias for the private key in the keystore is now configurable (
8+
Properties: `certificate.keystore.private.key.alias` or
9+
Code: `BzstDipConfigurationBuilder#setKeyStorePrivateKeyAlias`)
10+
* It is now possible to deactivate the internal validation of the tax-id (
11+
Properties: `tax.id.validate` or
12+
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: 107 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,118 @@
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-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_template-placeholder&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_template-placeholder)
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+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_bzst-dip-java-client&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_bzst-dip-java-client)
44

5-
# template-placeholder
5+
<div align="center">
6+
<img src="assets/Logo.svg" height="200" alt="XDEV BZST-DIP-Java-Client Logo">
7+
</div>
68

9+
# bzst-dip-java-client
10+
11+
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).
12+
13+
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.
14+
15+
Clients need to register / login at [BZSt online.portal](https://www.bzst.de/DE/Service/Portalinformation/Massendaten/DIP/dip.html?nn=68828) through [Elster](https://www.elster.de/elsterweb/start), [BundID](https://id.bund.de/de) or [BZSt Online-Portal (BOP)](https://www.elster.de/bportal/start).
16+
17+
See the [BZSt Information](https://www.bzst.de/EN/Service/Portalinformation/Login/login_node.html) for more information.
18+
19+
> [!NOTE]
20+
> **BZSt Online-Portal** (deprecated) is different from **BZSt online.portal**.
21+
22+
## Rationale
23+
24+
We created this client to make it as easy as possible for the developer to use the BZSt DIP.
25+
Through usage of the builder pattern (see [Configuration](#configuration) below), DTOs and a typesafe data model we ensure high usability and readability.
26+
27+
The BZSt provides [XSD](https://www.bzst.de/SharedDocs/Downloads/DE/Digitale_Plattformbetreiber/amtlicher_datensatz_entwurf) 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/>
28+
Our library validates each request through these XSD find errors before they are sent to the DIP.
729

830
## Installation
9-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
31+
[Installation guide for the latest release](https://github.com/xdev-software/bzst-dip-java-client/releases/latest#Installation)
32+
33+
## Usage
34+
35+
See the [examples in the demo package](./bzst-dip-java-client-demo/src/main/java/software/xdev/).
36+
37+
### Create keystore file
38+
39+
For authentification at the BZST you have to create a public- and private-key.
40+
41+
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).
42+
43+
OpenSSL can be downloaded from their [website](https://www.openssl.org/).
44+
45+
```
46+
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
47+
```
48+
49+
Next you have to convert that file to a **PKCS12** file.
50+
51+
```
52+
openssl pkcs12 -export -in cert.pem -inkey key.pem -out certificate.p12 -name "certificate"
53+
```
54+
55+
The [keytool](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html) is contained in your JDK installation.
56+
57+
```
58+
keytool -importkeystore -srckeystore certificate.p12 -srcstoretype pkcs12 -destkeystore cert.jks
59+
```
60+
61+
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):
62+
63+
```
64+
certificate.keystore.password=SECRET_PASSWORD
65+
certificate.keystore.file=cert.jks
66+
```
67+
68+
You also have to set the public key in the [BZST online.portal](https://online.portal.bzst.de/).
69+
Exporting the public key with OpenSSL is easy:
70+
71+
```
72+
openssl rsa -in key.pem -pubout > publicKey.pub
73+
```
74+
75+
### Client ID
76+
77+
It's also important to use the client id provided by [BZST online.portal](https://online.portal.bzst.de/)
78+
in the client configuration. See example
79+
at [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties):
80+
81+
```
82+
client.id=abcd1234-ab12-ab12-ab12-abcdef123456
83+
```
84+
85+
### Configuration
86+
87+
The client can be configured through a properties file (see [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties) and [ApplicationWithConfigurationFromProperties.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/ApplicationWithConfigurationFromProperties.java)) or by creating a configuration object (see [Application.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/Application.java)).
88+
89+
```java
90+
public static BzstDipConfiguration createConfiguration()
91+
{
92+
return new BzstDipConfigurationBuilder()
93+
.setClientId("abcd1234-ab12-ab12-ab12-abcdef123456")
94+
.setTaxID("86095742719")
95+
.setTaxNumber("123")
96+
.setCertificateKeystoreInputStream(() -> ClassLoader.getSystemClassLoader()
97+
.getResourceAsStream("DemoKeystore.jks"))
98+
.setCertificateKeystorePassword("test123")
99+
.setRealmEnvironmentBaseUrl(BzstDipConfiguration.ENDPOINT_URL_TEST)
100+
.setMessageTypeIndic(BzstDipDpiMessageType.DPI_401)
101+
.setReportingPeriod(LocalDate.now())
102+
.setDocTypeIndic(BzstDipOecdDocType.OECD_1)
103+
.setPlatformOperatorOrganizationName("TestOrg")
104+
.setPlatformOperatorPlatformName("TestApp")
105+
.setPlatformOperatorAddress(new BzstDipAddressFix("TestCity"))
106+
.buildAndValidate();
107+
}
108+
```
10109

11110
## Support
12-
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).
111+
112+
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).
13113

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

17117
## Dependencies and Licenses
18-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/template-placeholder/dependencies)
118+
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)