generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/init cosys integration (#134)
* 🎉 cosys cp from digiwf * ♻️ cosys refactor poms * ♻️ cosys cleanup poms * 🔥 cosys rm streaming adapter * ♻️ cosys rm presignedurls and refactor digiwf exceptions * 🔥 cosys rm archunit test * ♻️ cosys update package names * ♻️ cosys convert domain models to records * 🎨 cosys format with spotless * 🔥 cosys rm unneeded openapi generator files * 🔥 cosys refactor digiwf naming for classes and properties * 🎨 s3 format with spotless * ♻️ s3 configure oauth provider s3 specific * ✨ cosys init auth config in starter * 📝 cosys update README.md * 🔥 cosys rm deprecated comment * 📌 cosys cleanup pom versions * ♻️ cosys rm oauth config through starter * ♻️ cosys example use new oauth2 config style * 🔖 cosys fix versions after bump * 🔖 cosys fix versions after bump * 🐛 cosys rm oauth config through starter fix import * 🚨 fix pmd warnings * fix cosys name typo Co-authored-by: Tobias Stadler <[email protected]> * ♻️ cosys align mockito usage * 🔥 cosys rm unneeded format suppress * ✨ cosys validate merge props and add example * ✨ cosys add link to product * ♻️ cosys example use example url for cosys --------- Co-authored-by: Tobias Stadler <[email protected]>
- Loading branch information
Showing
31 changed files
with
2,937 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# RefArch CoSys integration | ||
|
||
Integration for creating documents with [coSys](https://www.cib.de/cosys/). Uses s3-integration for file handling. | ||
|
||
## Usage | ||
|
||
```xml | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>de.muenchen.refarch</groupId> | ||
<artifactId>refarch-cosys-integration-starter</artifactId> | ||
<version>...</version> | ||
</dependency> | ||
</dependencies> | ||
``` | ||
|
||
and a [s3-integration starter](../refarch-s3-integration/README.md#usage). | ||
|
||
## Configuration | ||
|
||
Following are the properties to configure the different modules. Some of them are custom defined and others are synonyms | ||
for spring package properties. | ||
Whether a property is an alias can be checked in the corresponding `application.yml` of each module. | ||
|
||
### refarch-cosys-integration-starter | ||
|
||
| Property | Description | Example | | ||
|--------------------------------------|-------------------------------------------------------------------------------|------------------| | ||
| `refarch.cosys.url` | Url of the CoSys service | | | ||
| `refarch.cosys.merge.datafile` | | `/root/multi` | | ||
| `refarch.cosys.merge.inputLanguage` | incoming language | `Deutsch` | | ||
| `refarch.cosys.merge.outputLanguage` | outgoing language | `Deutsch` | | ||
| `refarch.cosys.merge.keepFields` | | `unresolved-ref` | | ||
|
||
For authentication against cosys a OAuth2 registration with the name `cosys` needs to be provided. | ||
See following example or the [according Spring documentation](https://docs.spring.io/spring-security/reference/servlet/oauth2/index.html#oauth2-client). | ||
|
||
```yml | ||
spring: | ||
security: | ||
oauth2: | ||
client: | ||
provider: | ||
sso: | ||
issuer-uri: https://sso.example.com/auth/realms/refarch | ||
user-info-uri: ${spring.security.oauth2.client.provider.sso.issuer-uri}/protocol/openid-connect/userinfo | ||
jwk-set-uri: ${spring.security.oauth2.client.provider.sso.issuer-uri}/protocol/openid-connect/certs | ||
# used for RequestResponseLoggingFilter in s3-rest-service | ||
# only required if filter is explicitly enabled | ||
user-name-attribute: user_name | ||
registration: | ||
cosys: | ||
provider: sso | ||
authorization-grant-type: client_credentials | ||
client-id: refarch_client | ||
client-secret: client_secret_123 | ||
# profile required for username used in s3-rest-service RequestResponseLoggingFilter | ||
# openid required for user info endpoint used in s3-rest-service JwtUserInfoAuthenticationConverter | ||
# both scopes are only required if the according functions are explicitly used | ||
scope: profile, openid | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>de.muenchen.refarch</groupId> | ||
<artifactId>refarch-integrations</artifactId> | ||
<version>1.2.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>refarch-cosys-integration</artifactId> | ||
<description>CoSys integration</description> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>refarch-cosys-integration-client</module> | ||
<module>refarch-cosys-integration-core</module> | ||
<module>refarch-cosys-integration-starter</module> | ||
<module>refarch-cosys-integration-example</module> | ||
</modules> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>de.muenchen.refarch</groupId> | ||
<artifactId>refarch-s3-integration-client-core</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
</project> |
94 changes: 94 additions & 0 deletions
94
refarch-integrations/refarch-cosys-integration/refarch-cosys-integration-client/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>de.muenchen.refarch</groupId> | ||
<artifactId>refarch-cosys-integration</artifactId> | ||
<version>1.2.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>refarch-cosys-integration-client</artifactId> | ||
|
||
<properties> | ||
<openapi-generator-maven-plugin.version>7.8.0</openapi-generator-maven-plugin.version> | ||
|
||
<jackson-databind-nullable.version>0.2.6</jackson-databind-nullable.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- Spring --> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-webflux</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-logging</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-validation</artifactId> | ||
</dependency> | ||
|
||
<!-- openApi --> | ||
<dependency> | ||
<groupId>org.springdoc</groupId> | ||
<artifactId>springdoc-openapi-starter-webflux-ui</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openapitools</groupId> | ||
<artifactId>jackson-databind-nullable</artifactId> | ||
<version>${jackson-databind-nullable.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jsr310</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.openapitools</groupId> | ||
<artifactId>openapi-generator-maven-plugin</artifactId> | ||
<version>${openapi-generator-maven-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>cosys-api</id> | ||
<goals> | ||
<goal>generate</goal> | ||
</goals> | ||
<configuration> | ||
<inputSpec>${project.basedir}/src/main/api/api-docs.json</inputSpec> | ||
<library>webclient</library> | ||
<generatorName>java</generatorName> | ||
|
||
<apiPackage>de.muenchen.refarch.integration.cosys.api</apiPackage> | ||
<modelPackage>de.muenchen.refarch.integration.cosys.model</modelPackage> | ||
<invokerPackage>de.muenchen.refarch.integration.cosys</invokerPackage> | ||
|
||
<generateApiTests>false</generateApiTests> | ||
<generateModelTests>false</generateModelTests> | ||
<generateApiDocumentation>false</generateApiDocumentation> | ||
<generateModelDocumentation>false</generateModelDocumentation> | ||
<generateSupportingFiles>true</generateSupportingFiles> | ||
<configOptions> | ||
<hideGenerationTimestamp>true</hideGenerationTimestamp> | ||
<useJakartaEe>true</useJakartaEe> | ||
</configOptions> | ||
|
||
<globalProperties> | ||
<supportingFiles> | ||
ApiClient.java,JavaTimeFormatter.java,Authentication.java,OAuth.java,ApiKeyAuth.java,HttpBasicAuth.java,HttpBearerAuth.java,RFC3339DateFormat.java | ||
</supportingFiles> | ||
</globalProperties> | ||
|
||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
Oops, something went wrong.