Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/altinn 3 tilgang #3667

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

Feature/altinn 3 tilgang #3667

wants to merge 45 commits into from

Conversation

krharum
Copy link
Contributor

@krharum krharum commented Nov 5, 2024

No description provided.

Implement a new service to manage organization access in Altinn3. Includes interfaces for CRUD operations, service classes, controllers, and configuration files for both local and production environments. Integrates with Maskinporten for secure access.
#deploy-altinn3-tilgang-service

Deleted unused R2DBC configuration and updated package structure for Altinn3 service. Changes include renaming classes, moving DTOs/Commands, updating Dockerfile, and build.gradle to streamline configuration and dependencies.
#deploy-altinn3-tilgang-service

Updated the application name from 'organisasjon-tilgang-service' to 'altinn3-tilgang-service' throughout relevant files. Added a script to convert NAIS provided keys to PKCS#8 format. This update ensures proper naming consistency and key handling for R2dbc.
#deploy-organisasjon-tilgang-service

Introduced logging to track the output of getOrganisasjoner, getAccessToken, and getRights methods in AltinnConsumer. This will help in debugging and monitoring the data flow through these methods.
Replaced deprecated API methods and DTOs in AltinnConsumer with new equivalents. Removed unused Altinn API key and related configurations. These changes align the code with updated Altinn service requirements and remove obsolete configurations.
#deploy-altinn3-tilgang-service

Deleted several DTO classes and unnecessary command classes related to Altinn and Maskinporten, simplifying the overall structure. Updated configurations in `application-local.yml` and `application.yml`, including database and authorization settings, to improve maintainability and performance.
#deploy-altinn3-tilgang-service

Added the @disabled annotation to ApplicationContextTest class to temporarily disable the test. This change is necessary due to ongoing issues that need resolution before re-enabling.
#deploy-altinn3-tilgang-service

This includes the JVM option --add-opens to allow reflective access to java.lang module. This change ensures compatibility with specific libraries or tools that require this access.
#deploy-altinn3-tilgang-service

Corrected a typo in the AltinnConfig identifier property. Additionally, updated the JDBC URL in the application-prod.yml to use a more consistent and environment-friendly format.
#deploy-altinn3-tilgang-service

Refactor Maskinporten configuration to use properties and update application-local.yml with new credentials and URL. Implement WebFilter for OpenAPI configuration, modify GetAccessTokenCommand to return a token string, and enhance error logging in WebClientFilter. Additionally, disable Flyway migrations for local database configurations.
#deploy-altinn3-tilgang-service

The scope names in the config.yml file were updated to align with the proper naming convention. This change fixes minor inconsistencies by renaming `access-list` to `accesslist`.
#deploy-altinn3-tilgang-service

Updated GetAccessTokenCommand to return an AccessToken object instead of a String, improving type safety and clarity. Modified MaskinportenConsumer to map the response to the access token accordingly.
Renamed various classes to better reflect their responsibilities and improve readability across the codebase. All references to "OrganisasjonTilgang" have been updated to "AltinnTilgang" to ensure consistency.
#deploy-altinn3-tilgang-service

Introduced a new JSON mapping configuration for handling date types, switched `identifiers` from `String` to `JsonNode`, and refined deserialization logic. Modified URLs in several Altinn commands to align with new endpoint structure and corrected query parameters.
…-tilgang-service

Extended `AltinnResponseDTO` and `BrregResponseDTO` with error message and HTTP status fields. Updated mapping strategy and consumer methods to handle these new fields, ensuring errors are propagated correctly.
…n3-tilgang-service

Replaced null check with isBlank() for error handling in multiple classes. Added "organisasjonsnummer" field to BrregResponseDTO and refactored methods to improve clarity and organization number mapping.
#deploy-altinn3-tilgang-service

Updated the delete process to utilize the new OrganisasjonDeleteDTO class for better handling of organization identifiers. This change improves the logging of organization access deletions and organization access creations by extracting and formatting data more efficiently. Additionally, redundant logging in MaskinportenConsumer has been removed.
#deploy-altinn3-tilgang-service

Replaced DeleteStatus with AltinnResponseDTO for clearer response structure. Also, refactored controllers and services to remove redundancy and enhance error handling. Updated repository delete method to return an integer.
#deploy-altinn3-tilgang-service

Added brreg.no to the config.yml external hosts list. Annotated controller methods with Swagger @operation for better API documentation.
#deploy-altinn3-tilgang-service

Change the Altinn host URL to use the platform.tt02.altinn.no address instead of altinn.no. This ensures the application points to the correct environment for testing purposes.
#deploy-altinn3-tilgang-service

Refactor MaskinportenConfig to use @value annotations for property injection. Update host entry in config.yml from brreg.no to data.brreg.no and remove unused MockBean dependencies from ApplicationContextTest.
#deploy-altinn3-tilgang-service

Deleted the DeleteStatus.java file due to its redundancy in the codebase. Modified the configuration file to exclude a deprecated host and re-enabled ApplicationContext tests. These changes result in a cleaner and more efficient codebase.
The WireMock dependency in build.gradle has been removed since it's no longer required. Additionally, the ApplicationContextTest has been disabled to prevent it from running during the test phase.
This change removes the `@Disabled` annotation and includes a mock for `SecretManagerServiceClient` in `ApplicationContextTest`. This addition ensures the application context loads correctly with the secret manager dependency mocked.
#deploy-altinn3-tilgang-service-prod #deploy-altinn3-tilgang-service

This commit introduces environment-specific configurations by removing the production profile from the Dockerfile and creating dedicated config files for dev and prod environments. It also updates GitHub workflows to deploy based on the appropriate environment settings.
#deploy-test-frontend

This commit extends configuration files and Java classes to integrate with the testnav-altinn3-tilgang-service. The additions include new host entries, consumer configurations, and routing details, ensuring seamless connectivity with the new service.
#deploy-test-frontend

Included testnav-altinn3-tilgang-service-prod in config.yml, config.test.yml, config.idporten.yml, and config.unstable.yml files. This addition is essential for aligning the configuration across different environments and ensuring seamless operation of the application in the prod-gcp cluster.
#deploy-altinn3-tilgang-service-prod

Updated the config.prod.yml to include 'cluster: dev-gcp' for every inbound rule. This ensures that all applications reference the correct development cluster, enhancing consistency and configuration management.
#deploy-altinn3-tilgang-service-prod #deploy-altinn3-tilgang-service

Updated create methods in AltinnConsumer, AltinnTilgangController, and AltinnTilgangService to return Flux instead of Mono to handle multiple Organisasjon responses. Also, corrected the scope names in config.prod.yml for Altinn access list permissions.
#deploy-altinn3-tilgang-service

Corrected the naming convention in OAuth scopes by removing unnecessary colons in 'accesslist.read' and 'accesslist.write' entries. This ensures proper configuration alignment and prevents potential authorization issues.
Corrected "BRRREG" to "BRREG" in the default organization name label. This ensures consistency in naming across the mapping logic for better readability and understanding.
#deploy-unstable-frontend

Changed configurations to use testnav-altinn3-tilgang-service instead of testnav-organisasjon-tilgang-service. Updated affected URLs and associated logic across multiple files. Removed unused 'gyldigTil' field from organization access forms.
#deploy-altinn3-tilgang-service
#deploy-altinn3-tilgang-service-prod

Added a Comparator to sort the list of Organisasjon objects by their names. This ensures that the list returned is alphabetically ordered by the organization names.
Switched the Altinn3 access service consumer from the development cluster to the production cluster. Updated the service name and URL to reflect the production environment. This change aims to ensure connectivity and functionality in the live production environment.
…-altinn3-tilgang-service #deploy-testnav-altinn3-tilgang-service-prod

Moved sorting logic from AltinnConsumer to AltinnTilgangController. This ensures that the organizations are sorted by name at the controller layer, simplifying the consumer logic.
#deploy-test-frontend

Replaced "testnav-organisasjon-tilgang-service" with "testnav-altinn3-tilgang-service" in YAML configurations and Java files. Updated multiple Node.js package dependencies in package-lock.json to newer versions. This ensures better service routing and dependency management.
@krharum krharum marked this pull request as ready for review November 19, 2024 14:17
@krharum krharum requested a review from a team as a code owner November 19, 2024 14:17
krharum and others added 2 commits November 19, 2024 15:21
#deploy-test-frontend

Changed the URL scheme from https to http for the Altinn3 service in the application-dev.yml file. Added the packageManager property to the package.json file, specifying Yarn version 1.22.22.
Copy link
Contributor

@stigus stigus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stilig 🤩

@@ -0,0 +1,80 @@
apiVersion: "nais.io/v1alpha1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skulle vi fjerne dev før eventuell merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tenkte å se det an litt ... evt fjerne seinere

Changed the URL for testnav-altinn3-tilgang-service to point to the internal development environment. This change ensures that the service points correctly within the intended environment configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants