Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add yrkesskade-proxy application #deploy-proxy-yrkesskade (#3640)
* Add yrkesskade-proxy application #deploy-proxy-yrkesskade Added configuration files and scripts to implement the `yrkesskade-proxy` application, including Gradle build scripts, Dockerfile, application properties, and CI/CD pipeline. This setup configures OAuth2 security, logging, and application routing. * Rename workflow and disable ApplicationContextTest #deploy-proxy-yrkesskade Updated the workflow name from 'udistub-proxy' to 'yrkesskade-proxy' for consistency. Additionally, disabled the ApplicationContextTest in the yrkesskadeproxy module for now. * Remove legacy Spring dependencies Removed Spring Boot Starter WebFlux and Spring Cloud Starter dependencies to clean up deprecated bootstrap configurations. This change simplifies the build configuration and reduces potential conflicts. * Deploy #deploy-proxy-yrkesskade * Add YrkesskadeClient to handle yrkesskade bestilling Introduces YrkesskadeClient and related classes to handle the creation and status tracking of yrkesskade (work injury) requests. This includes mappings, DTOs, and configurations necessary for the integration with the yrkesskade-proxy. * Add support for Trygdeetaten Azure AD integration #deploy-proxy-yrkesskade Updated configuration to include a new Azure AD application for Trygdeetaten and modified the application starter to use TrygdeetatenAzureAdTokenService for authentication. These changes facilitate seamless integration of Testnav Yrkesskade Proxy with Trygdeetaten's Azure AD instance. * Remove unused config and add dev environment setup Removed obsolete port and webproxy settings from config.yml to clean up configuration. Added a new application-dev.yaml file to set up the development environment with the yrkesskade data generator service URL. Updated bean names for gateway filters to improve clarity and maintain consistency. * Deploy #deploy-proxy-yrkesskade * Add Swagger annotations to YrkesskadeRequest fields Annotated various fields in the YrkesskadeRequest class with @Schema for better API documentation. Also added a nested Periode class with its own annotations and adjusted the getPerioder method to initialize the perioder list if null. * Add FakedingsConsumer and switch to TokenX authentication Introduced FakedingsConsumer for generating fake tokens. Replaced TrygdeetatenAzureAdTokenService with TokenXService for authentication. Cleaned up unused dependencies and old configuration references. * Deploy #deploy-proxy-yrkesskade * test push * Add "ident" header and handle special "Innmelderrolletype" Include "ident" header in YrkesskadePostCommand to enhance request authentication. Also, update YrkesskadeMappingStrategy to set "paaVegneAv" for specific Innmelderrolletype cases such as "denSkadelidte" and "vergeOgForesatt". * deploy #deploy-test-dolly-backend * Update Yrkesskade mappings and add logging improvements #deploy-test-dolly-backend Revised the BestillingYrkesskadeStatusMapper to handle Yrkesskade statuses instead of Skattekort. Enhanced YrkesskadeConsumer and YrkesskadeClient with detailed log statements for better traceability. * Add new types and queries for pension and tax data #deploy-test-dolly-backend Updated `ElasticTyper` and `OpenSearchQueryBuilder` to include new enums and query cases for `PEN_AFP_OFFENTLIG`, `PEN_PENSJONSAVTALE`, `SKATTEKORT`, and `YRKESSKADE`. Also fixed a typo in the `SystemTyper` description for `YRKESSKADE`. This enhances the system's ability to handle additional pension and tax types. * Add logging filter for Reactor Netty HTTP client #deploy-proxy-yrkesskade Configured application.yml to set logging levels for Reactor Netty and Spring Cloud Gateway. Created a new LogFilter configuration class to add wiretap logging for HTTP client at INFO level. * Deploy #deploy-test-dolly-backend * Enable HTTP client wiretap for debugging #deploy-proxy-yrkesskade Added the wiretap configuration to the HTTP client section in the application.yml. This aids in capturing the raw HTTP communication, which is useful for debugging purposes. * Log authentication token value in filter Added logging to output the TokenX authentication token value in the request filter. This will assist in debugging and tracking token-related issues. * Deploy #deploy-proxy-yrkesskade * Remove redundant build includes and add local configuration #deploy-test-dolly-backend Eliminated numerous unnecessary build includes from settings.gradle to streamline dependencies. Added LocalConfig for local environment setup including Flyway and Vault configurations. Incorporated 'vault' library into build.gradle to support secure database interactions. * Change skadetidspunkt type to Instant in YrkesskadeRequest #deploy-test-dolly-backend Updated skadetidspunkt from LocalDate to Instant for more precise timestamp handling. This change ensures consistency in capturing exact moments of injury occurrences. * Update skattekort handling and add afpOffentlig mapping #deploy-test-dolly-backend Revised logic to check non-null skattekort before updating arbeidsgiverSkatt. Added mapping for afpOffentlig field in the PensjonData class. These changes enhance the robustness and completeness of the data transformation logic. * Update ident header in YrkesskadePostCommand #deploy-test-dolly-backend Changed the ident header source from getSkadelidtIdentifikator to getInnmelderIdentifikator. This ensures the correct identifier is used in the request headers. * Refactor Yrkesskade commands to return standardized DTOs #deploy-test-dolly-backend Updated YrkesskadePostCommand, YrkesskadeClient, and related classes to return a new YrkesskadeResponseDTO instead of ResponseEntity. This change standardizes the response handling and improves clarity in the API’s error and success responses. * Update identifier mapping for verge and representative roles #deploy-test-dolly-backend Corrected the call to `getInnmelderIdentifikator` for the `virksomhetsrepresentant` role instead of using `getSkadelidtIdentifikator`. Also, reformatted parts of the innmelder identifier logic for better readability. * Update database credentials and improve Yrkesskade mapping strategy #deploy-test-dolly-backend Changed the database URL and username in the local environment configuration to use a test database. Updated YrkesskadeMappingStrategy to include default values for specific cases, ensuring proper handling of innmelder roles. * Add testnav-yrkesskade-proxy application and update IDs #deploy-test-dolly-backend Included the testnav-yrkesskade-proxy in config and config.test files. Updated specific placeholders with correct identifier strings in YrkesskadeMappingStrategy. * Refactor error message handling in YrkesskadeClient #deploy-test-dolly-backend Improve message logic for successful and non-successful statuses by adding conditional checks. Use `StringUtils.isNotBlank` to ensure proper handling of empty or null messages. * Improve yrkesskade handling and update local DB config #deploy-test-dolly-backend Added a new `SaksoversiktDTO` class to handle yrkesskade data responses. Implemented `YrkesskadeGetCommand` for fetching yrkesskade case overviews and adjusted `YrkesskadeClient` to handle new cases conditionally. Updated the local database configuration to use a test DB and default `postgres` user. * Add transaction persistence for Yrkesskade status #deploy-test-dolly-backend Introduced code for persisting transaction status updates in `YrkesskadeClient`. Modified existing methods to utilize the new persistence logic, ensuring `YrkesskadeStatus` is updated effectively. * Refactor Yrkesskade status formatting. #deploy-test-dolly-backend Updated `YrkesskadeClient` to use formatted string for `YrkesskadeStatus`. This enhances clarity and consistency in status reporting by embedding an identifier directly within the message format. * Handle null Innmelderrolle in YrkesskadeMappingStrategy #deploy-test-dolly-backend Add a null check to ensure that the innmelderIdentifikator is only set if innmelderrolle is not null. This prevents potential NullPointerException and improves code robustness.
- Loading branch information