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

Release/0.5.5 #156

Closed
wants to merge 4 commits into from
Closed

Release/0.5.5 #156

wants to merge 4 commits into from

Conversation

nganntqe170236
Copy link
Collaborator

@nganntqe170236 nganntqe170236 commented Feb 26, 2025

Summary by CodeRabbit

  • New Features

    • Updated all user-facing URLs so that authentication, data retrieval, and navigation now use the production domain “https://greenbuildings.cloud.”
    • The mobile app now displays an updated version (“Green Building v0.5.5 - 4ddb062”) for enhanced transparency.
  • Chores

    • Streamlined configurations and dependency management for improved deployment and logging.
    • Removed outdated and redundant assets across multiple platforms to ensure a cleaner, more maintainable codebase.

Thống and others added 4 commits February 26, 2025 00:00
release: deployment configs
release: rm mobile
release: homepage url
release: angular configs
Copy link

coderabbitai bot commented Feb 26, 2025

Walkthrough

This pull request applies numerous configuration and routing updates across the project. XML files have been modified—removing an unused DB_SCHEMA variable and updating a server-name from "Docker" to "Podman." Gradle configurations now exclude logging modules and add Splunk and Log4j2 dependencies. REST controllers have been adjusted to remove the “/api” prefix from endpoints, and application settings (YAML, frontend, and environment files) have been updated to use production URLs and Kafka settings. In addition, extensive mobile Flutter files have been removed.

Changes

File(s) Change Summary
.run/IdentityProvider.run.xml, .run/infrastructure.run.xml Removed <env name="DB_SCHEMA" ...>; updated server-name from "Docker" to "Podman" with minor formatting tweaks.
sep490-commons/springfw-impl/build.gradle, sep490-enterprise/build.gradle, sep490-idp/build.gradle Added configuration blocks to exclude logging modules; introduced Splunk and Log4j2 dependencies; added new Maven repository.
Configs.java; REST controllers in sep490-enterprise/src/main/java/enterprise/rest/ Modified CORS allowed origins and updated base request mappings by removing the "/api" prefix.
sep490-enterprise/src/main/resources/application.yml, sep490-idp/src/main/resources/application.yml, Log4j2 XML files Updated homepage URL and Kafka bootstrap settings; added Kafka admin settings, logging levels, and server context paths; introduced new Log4j2 configuration files.
Test files in sep490-enterprise/src/test/java/enterprise/, sep490-frontend/package.json, sep490-frontend/src/environments/environment.ts, sep490-frontend/src/app/components/footer/footer.component.html Revised HTTP endpoints to include an /enterprise prefix; updated frontend build base-href and version information for production.
sep490-infrastructure/.env.local.example, sep490-infrastructure/docker-compose.yml Added multiple new environment variables; defined new Docker services (web, enterprise, idp) and updated Kafka service configuration.
All files under sep490-mobile/* Removed extensive Flutter mobile files including build configurations, platform-specific files, assets, tests, and utilities.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant W as Web Service
    participant E as Enterprise Service
    participant I as Identity Provider
    participant K as Kafka

    C->>W: Send request to production URL
    W->>E: Forward API call (e.g., /buildings)
    E->>K: Publish/consume Kafka messages
    E->>I: Initiate passkey authentication
    I-->>E: Return authentication response
    E-->>W: Deliver API response
    W-->>C: Respond with updated data
Loading

Poem

I’m a bunny hopping in code’s delight,
Skipping through configs from morning to night.
No more old prefixes weighing me down—
New production URLs make me dance around.
With Podman, Splunk, and logs that sing,
I’m all a-jump with joy in every spring! 🐇✨

Tip

CodeRabbit's docstrings feature is now available as part of our Pro Plan! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (6)
sep490-enterprise/src/main/resources/log4j2-spring.xml (2)

10-14: Document environment variables required for Splunk logging

The Splunk appender relies on five environment variables that need to be properly set for logging to work in production. Consider adding documentation for these required variables.


24-27: Consider adding separate logger configurations for specific packages

Currently only the root logger is configured at "info" level. Consider adding specific logger configurations for application packages to better control verbosity in different areas of the application.

    <Loggers>
        <Root level="info">
            <AppenderRef ref="console"/>
            <AppenderRef ref="splunkhttp"/>
        </Root>
+        <Logger name="enterprise" level="info" additivity="false">
+            <AppenderRef ref="console"/>
+            <AppenderRef ref="splunkhttp"/>
+        </Logger>
+        <Logger name="org.springframework" level="warn">
+            <AppenderRef ref="console"/>
+            <AppenderRef ref="splunkhttp"/>
+        </Logger>
    </Loggers>
sep490-idp/src/main/java/green_buildings/idp/entity/UserEntity.java (1)

84-84:

❓ Verification inconclusive

Review default locale choice

Setting "vi-VN" as the default locale may not be suitable for an international application. Consider using a more neutral default or detecting the user's locale from their browser/request.


🏁 Script executed:

#!/bin/bash
# Check if there's any internationalization configuration or documentation
echo "Checking for i18n configuration..."
fd "i18n" --type d
fd "messages" --type f --extension properties
fd "LocaleConfig" --extension java

Length of output: 418


Action: Re-evaluate the Default Locale Configuration in UserEntity

The UserEntity class currently initializes the locale with "vi-VN". While our internationalization setup (see folders and message files in sep490-idp/src/main/resources/i18n/) supports multiple languages, hardcoding "vi-VN" may limit the application's flexibility for a global audience. Consider one of the following approaches:

  • Change the default to a more neutral locale (e.g., "en-US").
  • Implement logic to detect and assign the user's locale (from browser/request headers) dynamically.

Reviewing this setting now can help ensure consistency with our internationalization strategy.

sep490-idp/src/main/resources/application.yml (1)

1-1: Remove unnecessary blank line

There's an extra blank line at the beginning of the file that could be removed.

-
 spring:
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 1-1: too many blank lines

(1 > 0) (empty-lines)

sep490-infrastructure/.env.local.example (2)

1-33: Environment variables are missing default values.

The .env.local.example file is a template for developers to create their own .env.local file, but it lacks default values or comments explaining what each variable is used for. This makes it harder for new developers to understand what values should be provided.

Consider adding comments explaining each variable's purpose and providing example values where appropriate. For sensitive variables, include placeholders (like <your-api-key-here>) to indicate format requirements.

Example:

-OIDC_AUTHORITY=
+# OpenID Connect Authority URL (e.g., https://auth.example.com)
+OIDC_AUTHORITY=

-SPLUNK_URL=
+# Splunk HEC endpoint URL (e.g., https://splunk.example.com:8088/services/collector)
+SPLUNK_URL=

24-33: Consider organizing Splunk variables into logical groups.

The Splunk variables are spread across different sections of the file, which reduces readability.

Group all Splunk-related variables together to improve configuration organization:

 SPLUNK_URL=
 SPLUNK_HOST=
+
+# Enterprise Splunk configuration
 ENTERPRISE_SPLUNK_TOKEN=
 ENTERPRISE_SPLUNK_INDEX=
 ENTERPRISE_SPLUNK_SOURCE=
+
+# IDP Splunk configuration
 IDP_SPLUNK_TOKEN=
 IDP_SPLUNK_INDEX=
 IDP_SPLUNK_SOURCE=
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 39fc6cf and 906d248.

⛔ Files ignored due to path filters (37)
  • sep490-mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png is excluded by !**/*.png
  • sep490-mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png is excluded by !**/*.png
  • sep490-mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png is excluded by !**/*.png
  • sep490-mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png is excluded by !**/*.png
  • sep490-mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png is excluded by !**/*.png
  • sep490-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png is excluded by !**/*.png
  • sep490-mobile/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png is excluded by !**/*.png
  • sep490-mobile/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png is excluded by !**/*.png
  • sep490-mobile/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png is excluded by !**/*.png
  • sep490-mobile/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png is excluded by !**/*.png
  • sep490-mobile/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png is excluded by !**/*.png
  • sep490-mobile/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png is excluded by !**/*.png
  • sep490-mobile/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png is excluded by !**/*.png
  • sep490-mobile/pubspec.lock is excluded by !**/*.lock
  • sep490-mobile/web/favicon.png is excluded by !**/*.png
  • sep490-mobile/web/icons/Icon-192.png is excluded by !**/*.png
  • sep490-mobile/web/icons/Icon-512.png is excluded by !**/*.png
  • sep490-mobile/web/icons/Icon-maskable-192.png is excluded by !**/*.png
  • sep490-mobile/web/icons/Icon-maskable-512.png is excluded by !**/*.png
  • sep490-mobile/windows/runner/resources/app_icon.ico is excluded by !**/*.ico
📒 Files selected for processing (107)
  • .run/IdentityProvider.run.xml (1 hunks)
  • .run/infrastructure.run.xml (2 hunks)
  • sep490-commons/springfw-impl/build.gradle (1 hunks)
  • sep490-commons/springfw-impl/src/main/java/commons/springfw/impl/Configs.java (1 hunks)
  • sep490-enterprise/build.gradle (2 hunks)
  • sep490-enterprise/src/main/java/enterprise/rest/BuildingController.java (1 hunks)
  • sep490-enterprise/src/main/java/enterprise/rest/CreditPackageController.java (1 hunks)
  • sep490-enterprise/src/main/java/enterprise/rest/EnterpriseController.java (1 hunks)
  • sep490-enterprise/src/main/java/enterprise/rest/PaymentController.java (1 hunks)
  • sep490-enterprise/src/main/java/enterprise/rest/WalletController.java (1 hunks)
  • sep490-enterprise/src/main/resources/application.yml (4 hunks)
  • sep490-enterprise/src/main/resources/log4j2-spring.xml (1 hunks)
  • sep490-enterprise/src/test/java/enterprise/TestcontainersConfigs.java (3 hunks)
  • sep490-enterprise/src/test/java/enterprise/rest/BuildingControllerTest.java (5 hunks)
  • sep490-enterprise/src/test/java/enterprise/rest/DevControllerTest.java (2 hunks)
  • sep490-frontend/eslint.config.mjs (0 hunks)
  • sep490-frontend/package.json (1 hunks)
  • sep490-frontend/src/app/components/footer/footer.component.html (1 hunks)
  • sep490-frontend/src/environments/environment.ts (1 hunks)
  • sep490-idp/build.gradle (2 hunks)
  • sep490-idp/src/main/java/green_buildings/idp/configs/MvcSecurityConfig.java (1 hunks)
  • sep490-idp/src/main/java/green_buildings/idp/entity/UserEntity.java (1 hunks)
  • sep490-idp/src/main/resources/application.yml (4 hunks)
  • sep490-idp/src/main/resources/log4j2-spring.xml (1 hunks)
  • sep490-idp/src/main/resources/templates/login.html (1 hunks)
  • sep490-infrastructure/.env.local.example (1 hunks)
  • sep490-infrastructure/docker-compose.yml (2 hunks)
  • sep490-mobile/.gitignore (0 hunks)
  • sep490-mobile/.metadata (0 hunks)
  • sep490-mobile/README.md (0 hunks)
  • sep490-mobile/analysis_options.yaml (0 hunks)
  • sep490-mobile/android/.gitignore (0 hunks)
  • sep490-mobile/android/app/build.gradle (0 hunks)
  • sep490-mobile/android/app/src/debug/AndroidManifest.xml (0 hunks)
  • sep490-mobile/android/app/src/main/AndroidManifest.xml (0 hunks)
  • sep490-mobile/android/app/src/main/kotlin/com/example/sep490_mobile/MainActivity.kt (0 hunks)
  • sep490-mobile/android/app/src/main/res/drawable-v21/launch_background.xml (0 hunks)
  • sep490-mobile/android/app/src/main/res/drawable/launch_background.xml (0 hunks)
  • sep490-mobile/android/app/src/main/res/values-night/styles.xml (0 hunks)
  • sep490-mobile/android/app/src/main/res/values/styles.xml (0 hunks)
  • sep490-mobile/android/app/src/profile/AndroidManifest.xml (0 hunks)
  • sep490-mobile/android/build.gradle (0 hunks)
  • sep490-mobile/android/gradle.properties (0 hunks)
  • sep490-mobile/android/gradle/wrapper/gradle-wrapper.properties (0 hunks)
  • sep490-mobile/android/settings.gradle (0 hunks)
  • sep490-mobile/assets/i18n/en.json (0 hunks)
  • sep490-mobile/assets/i18n/vi.json (0 hunks)
  • sep490-mobile/ios/.gitignore (0 hunks)
  • sep490-mobile/ios/Flutter/AppFrameworkInfo.plist (0 hunks)
  • sep490-mobile/ios/Flutter/Debug.xcconfig (0 hunks)
  • sep490-mobile/ios/Flutter/Release.xcconfig (0 hunks)
  • sep490-mobile/ios/Runner.xcodeproj/project.pbxproj (0 hunks)
  • sep490-mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (0 hunks)
  • sep490-mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (0 hunks)
  • sep490-mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (0 hunks)
  • sep490-mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (0 hunks)
  • sep490-mobile/ios/Runner.xcworkspace/contents.xcworkspacedata (0 hunks)
  • sep490-mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (0 hunks)
  • sep490-mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (0 hunks)
  • sep490-mobile/ios/Runner/AppDelegate.swift (0 hunks)
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (0 hunks)
  • sep490-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (0 hunks)
  • sep490-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (0 hunks)
  • sep490-mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard (0 hunks)
  • sep490-mobile/ios/Runner/Base.lproj/Main.storyboard (0 hunks)
  • sep490-mobile/ios/Runner/Info.plist (0 hunks)
  • sep490-mobile/ios/Runner/Runner-Bridging-Header.h (0 hunks)
  • sep490-mobile/ios/RunnerTests/RunnerTests.swift (0 hunks)
  • sep490-mobile/lib/dtos/responses/api_response.dart (0 hunks)
  • sep490-mobile/lib/enums/http_method.dart (0 hunks)
  • sep490-mobile/lib/enums/popup_type.dart (0 hunks)
  • sep490-mobile/lib/exceptions/custom_exception.dart (0 hunks)
  • sep490-mobile/lib/extensions/custom_string.dart (0 hunks)
  • sep490-mobile/lib/main.dart (0 hunks)
  • sep490-mobile/lib/pages/app_routes.dart (0 hunks)
  • sep490-mobile/lib/pages/login/login.dart (0 hunks)
  • sep490-mobile/lib/repositories/auth_repository.dart (0 hunks)
  • sep490-mobile/lib/repositories/token_repository.dart (0 hunks)
  • sep490-mobile/lib/services/api_constants.dart (0 hunks)
  • sep490-mobile/lib/services/base_service.dart (0 hunks)
  • sep490-mobile/lib/utils/color/app_colors.dart (0 hunks)
  • sep490-mobile/lib/utils/l10n/app_localizations.dart (0 hunks)
  • sep490-mobile/lib/utils/openid_browser.dart (0 hunks)
  • sep490-mobile/lib/utils/openid_io.dart (0 hunks)
  • sep490-mobile/lib/utils/theme/theme_mode.dart (0 hunks)
  • sep490-mobile/lib/utils/utility.dart (0 hunks)
  • sep490-mobile/lib/utils/validations.dart (0 hunks)
  • sep490-mobile/lib/widgets/info_popup.dart (0 hunks)
  • sep490-mobile/lib/widgets/loading.dart (0 hunks)
  • sep490-mobile/lib/widgets/uibutton.dart (0 hunks)
  • sep490-mobile/linux/.gitignore (0 hunks)
  • sep490-mobile/linux/CMakeLists.txt (0 hunks)
  • sep490-mobile/linux/flutter/CMakeLists.txt (0 hunks)
  • sep490-mobile/linux/flutter/generated_plugin_registrant.cc (0 hunks)
  • sep490-mobile/linux/flutter/generated_plugin_registrant.h (0 hunks)
  • sep490-mobile/linux/flutter/generated_plugins.cmake (0 hunks)
  • sep490-mobile/linux/main.cc (0 hunks)
  • sep490-mobile/linux/my_application.cc (0 hunks)
  • sep490-mobile/linux/my_application.h (0 hunks)
  • sep490-mobile/macos/.gitignore (0 hunks)
  • sep490-mobile/macos/Flutter/Flutter-Debug.xcconfig (0 hunks)
  • sep490-mobile/macos/Flutter/Flutter-Release.xcconfig (0 hunks)
  • sep490-mobile/macos/Flutter/GeneratedPluginRegistrant.swift (0 hunks)
  • sep490-mobile/macos/Runner.xcodeproj/project.pbxproj (0 hunks)
  • sep490-mobile/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (0 hunks)
  • sep490-mobile/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (0 hunks)
  • sep490-mobile/macos/Runner.xcworkspace/contents.xcworkspacedata (0 hunks)
⛔ Files not processed due to max files limit (34)
  • sep490-mobile/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  • sep490-mobile/macos/Runner/AppDelegate.swift
  • sep490-mobile/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  • sep490-mobile/macos/Runner/Base.lproj/MainMenu.xib
  • sep490-mobile/macos/Runner/Configs/AppInfo.xcconfig
  • sep490-mobile/macos/Runner/Configs/Debug.xcconfig
  • sep490-mobile/macos/Runner/Configs/Release.xcconfig
  • sep490-mobile/macos/Runner/Configs/Warnings.xcconfig
  • sep490-mobile/macos/Runner/DebugProfile.entitlements
  • sep490-mobile/macos/Runner/Info.plist
  • sep490-mobile/macos/Runner/MainFlutterWindow.swift
  • sep490-mobile/macos/Runner/Release.entitlements
  • sep490-mobile/macos/RunnerTests/RunnerTests.swift
  • sep490-mobile/pubspec.yaml
  • sep490-mobile/test/widget_test.dart
  • sep490-mobile/web/index.html
  • sep490-mobile/web/manifest.json
  • sep490-mobile/windows/.gitignore
  • sep490-mobile/windows/CMakeLists.txt
  • sep490-mobile/windows/flutter/CMakeLists.txt
  • sep490-mobile/windows/flutter/generated_plugin_registrant.cc
  • sep490-mobile/windows/flutter/generated_plugin_registrant.h
  • sep490-mobile/windows/flutter/generated_plugins.cmake
  • sep490-mobile/windows/runner/CMakeLists.txt
  • sep490-mobile/windows/runner/Runner.rc
  • sep490-mobile/windows/runner/flutter_window.cpp
  • sep490-mobile/windows/runner/flutter_window.h
  • sep490-mobile/windows/runner/main.cpp
  • sep490-mobile/windows/runner/resource.h
  • sep490-mobile/windows/runner/runner.exe.manifest
  • sep490-mobile/windows/runner/utils.cpp
  • sep490-mobile/windows/runner/utils.h
  • sep490-mobile/windows/runner/win32_window.cpp
  • sep490-mobile/windows/runner/win32_window.h
💤 Files with no reviewable changes (81)
  • sep490-mobile/android/app/src/main/kotlin/com/example/sep490_mobile/MainActivity.kt
  • sep490-mobile/analysis_options.yaml
  • sep490-mobile/ios/Runner/Runner-Bridging-Header.h
  • sep490-mobile/macos/Flutter/Flutter-Debug.xcconfig
  • sep490-mobile/lib/enums/popup_type.dart
  • sep490-mobile/ios/Flutter/Release.xcconfig
  • sep490-mobile/android/app/src/main/res/drawable/launch_background.xml
  • sep490-mobile/macos/Flutter/Flutter-Release.xcconfig
  • sep490-mobile/lib/enums/http_method.dart
  • sep490-mobile/ios/Runner/Info.plist
  • sep490-mobile/linux/main.cc
  • sep490-mobile/ios/.gitignore
  • sep490-mobile/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  • sep490-mobile/ios/Runner.xcworkspace/contents.xcworkspacedata
  • sep490-mobile/macos/Flutter/GeneratedPluginRegistrant.swift
  • sep490-mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  • sep490-mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  • sep490-mobile/android/app/src/profile/AndroidManifest.xml
  • sep490-mobile/ios/Runner/AppDelegate.swift
  • sep490-mobile/lib/utils/color/app_colors.dart
  • sep490-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  • sep490-mobile/android/.gitignore
  • sep490-mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  • sep490-mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  • sep490-mobile/lib/widgets/uibutton.dart
  • sep490-mobile/lib/main.dart
  • sep490-mobile/android/gradle/wrapper/gradle-wrapper.properties
  • sep490-mobile/lib/exceptions/custom_exception.dart
  • sep490-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  • sep490-mobile/lib/widgets/loading.dart
  • sep490-mobile/android/settings.gradle
  • sep490-mobile/lib/services/base_service.dart
  • sep490-mobile/ios/Runner/Base.lproj/Main.storyboard
  • sep490-mobile/.gitignore
  • sep490-mobile/linux/my_application.h
  • sep490-mobile/ios/Flutter/Debug.xcconfig
  • sep490-mobile/assets/i18n/vi.json
  • sep490-mobile/ios/Flutter/AppFrameworkInfo.plist
  • sep490-mobile/linux/flutter/generated_plugin_registrant.h
  • sep490-mobile/android/app/src/main/res/values/styles.xml
  • sep490-mobile/android/app/src/main/res/drawable-v21/launch_background.xml
  • sep490-mobile/lib/utils/theme/theme_mode.dart
  • sep490-mobile/macos/Runner.xcworkspace/contents.xcworkspacedata
  • sep490-mobile/linux/flutter/generated_plugin_registrant.cc
  • sep490-mobile/android/app/src/debug/AndroidManifest.xml
  • sep490-mobile/linux/.gitignore
  • sep490-mobile/macos/.gitignore
  • sep490-mobile/ios/RunnerTests/RunnerTests.swift
  • sep490-mobile/assets/i18n/en.json
  • sep490-mobile/lib/extensions/custom_string.dart
  • sep490-mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard
  • sep490-mobile/lib/services/api_constants.dart
  • sep490-mobile/linux/flutter/generated_plugins.cmake
  • sep490-mobile/lib/repositories/auth_repository.dart
  • sep490-mobile/lib/utils/openid_io.dart
  • sep490-mobile/android/build.gradle
  • sep490-mobile/lib/dtos/responses/api_response.dart
  • sep490-mobile/ios/Runner.xcodeproj/project.pbxproj
  • sep490-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  • sep490-mobile/android/gradle.properties
  • sep490-mobile/linux/flutter/CMakeLists.txt
  • sep490-mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  • sep490-mobile/lib/pages/app_routes.dart
  • sep490-mobile/macos/Runner.xcodeproj/project.pbxproj
  • sep490-mobile/lib/widgets/info_popup.dart
  • sep490-mobile/.metadata
  • sep490-mobile/android/app/src/main/res/values-night/styles.xml
  • sep490-frontend/eslint.config.mjs
  • sep490-mobile/README.md
  • sep490-mobile/lib/utils/validations.dart
  • sep490-mobile/lib/repositories/token_repository.dart
  • sep490-mobile/linux/CMakeLists.txt
  • sep490-mobile/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  • sep490-mobile/lib/utils/utility.dart
  • sep490-mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  • sep490-mobile/android/app/build.gradle
  • sep490-mobile/android/app/src/main/AndroidManifest.xml
  • sep490-mobile/lib/pages/login/login.dart
  • sep490-mobile/lib/utils/l10n/app_localizations.dart
  • sep490-mobile/linux/my_application.cc
  • sep490-mobile/lib/utils/openid_browser.dart
✅ Files skipped from review due to trivial changes (6)
  • sep490-frontend/src/app/components/footer/footer.component.html
  • sep490-enterprise/src/main/java/enterprise/rest/WalletController.java
  • sep490-enterprise/src/main/java/enterprise/rest/CreditPackageController.java
  • sep490-enterprise/src/main/java/enterprise/rest/BuildingController.java
  • sep490-enterprise/src/main/java/enterprise/rest/PaymentController.java
  • sep490-idp/src/main/resources/log4j2-spring.xml
🧰 Additional context used
🧠 Learnings (1)
.run/IdentityProvider.run.xml (1)
Learnt from: GiaBaorr
PR: thongdanghoang/sep490#40
File: .run/IdentityProvider.run.xml:7-7
Timestamp: 2024-12-16T17:24:49.743Z
Learning: In the `sep490-idp` project, the default database schema is `public`, so there's no need to set `DB_SCHEMA` explicitly to `public` in configuration files like `.run/IdentityProvider.run.xml`. The team prefers to rely on the default schema instead of specifying it when it's `public`.
🪛 YAMLlint (1.35.1)
sep490-idp/src/main/resources/application.yml

[warning] 1-1: too many blank lines

(1 > 0) (empty-lines)


[error] 94-94: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build Java Modules (sep490-enterprise)
🔇 Additional comments (36)
sep490-idp/src/main/resources/templates/login.html (1)

92-92: Endpoint update aligns with service context path changes

The change to include the /idp prefix in the passkey login endpoint is consistent with the broader API restructuring in this release.

sep490-commons/springfw-impl/src/main/java/commons/springfw/impl/Configs.java (1)

30-30: CORS configuration updated for production

The CORS allowed origin has been changed from localhost to the production domain, which is appropriate for a release. However, this change will prevent local development against this API.

Consider whether you need to maintain separate development and production configurations, or if developers should be using a different branch for local development.

.run/infrastructure.run.xml (1)

2-2: Container runtime updated from Docker to Podman

The deployment target has been changed from Docker to Podman, which is consistent with modernizing the infrastructure for this release.

This change will require developers to have Podman installed instead of Docker when using this run configuration.

sep490-enterprise/src/test/java/enterprise/rest/DevControllerTest.java (1)

21-21: Test endpoints updated to include service context path

The endpoint paths in the test cases have been correctly updated to include the "/enterprise" prefix, which aligns with the API restructuring in this release.

Also applies to: 37-37

sep490-frontend/package.json (1)

7-7:

❓ Verification inconclusive

Production URL configuration updated correctly

The base URL for the production build has been changed from localhost to the production domain, which is appropriate for a release version. This ensures that all routing and asset references will work correctly in the production environment.

Make sure that all API calls in the frontend code use relative URLs or are updated to match this base URL change to avoid mixed-content or CORS issues.


🏁 Script executed:

#!/bin/bash
# Search for any hardcoded localhost URLs in TypeScript files that might need updating
rg "http://localhost:4200" --type ts

Length of output: 36


Attention: Verify All API Call URLs

The production URL update in sep490-frontend/package.json is correct, and our automated search for hardcoded "http://localhost:4200" in TypeScript files returned no results. However, please manually verify that all API calls throughout the frontend use relative URLs or have been updated to be compatible with the new production base URL. This will help avoid any potential mixed-content or CORS issues.

.run/IdentityProvider.run.xml (1)

3-16: DB_SCHEMA environment variable removal is appropriate

The removal of the explicit DB_SCHEMA setting is in line with best practices since the default schema is already 'public', making this configuration redundant.

sep490-commons/springfw-impl/build.gradle (1)

24-26:

✅ Verification successful

Logging framework configuration update

The exclusion of the default Spring Boot logging starter indicates a switch to an alternative logging framework. This is part of a consistent approach across multiple modules.

Ensure that an alternative logging framework (like Log4j2) is properly configured elsewhere in the project:


🏁 Script executed:

#!/bin/bash
# Check if Log4j2 or other logging dependencies are included elsewhere
rg "spring-boot-starter-log4j2" --type gradle
# Check for Splunk logging dependencies
rg "splunk" --type gradle
# Check for any other logging configurations
find . -name "log4j2.xml" -o -name "logback.xml" -o -name "logging.properties"

Length of output: 709


Logging configuration validated

The exclusion of the default Spring Boot logging starter in sep490-commons/springfw-impl/build.gradle (lines 24–26) aligns with the project's shift to an alternative logging framework. Our review confirms that Log4j2 is included in both sep490-enterprise and sep490-idp modules, and Splunk logging dependencies are also present. The absence of standalone logging configuration files (e.g., log4j2.xml, logback.xml, or logging.properties) suggests that the project is likely relying on the default configurations provided by Log4j2 and associated integrations.

sep490-enterprise/src/main/java/enterprise/rest/EnterpriseController.java (1)

12-12:

✅ Verification successful

API path structure simplified

The RequestMapping has been updated to remove the "/api" prefix, which is consistent with the changes in other controllers. This simplifies the API structure while maintaining the logical organization of endpoints.

Ensure that all client code and tests have been updated to use the new URL structure:


🏁 Script executed:

#!/bin/bash
# Check if there are any references to the old API path pattern in tests or frontend code
rg "/api/enterprise" --type ts --type java
# Also check for other controllers that might need similar updates
rg "@RequestMapping\(\"/api/" --type java

Length of output: 525


API Endpoint Simplification Approved

The change in EnterpriseController.java—removing the /api prefix to simplify the API path to /enterprise—has been verified. Our search did not reveal any lingering references to the old /api/enterprise pattern in the enterprise module’s tests or client code. Note that in the sep490-idp module, a few controllers still use the /api prefix (e.g., /api/user, /api/dev, /api/enterprise-user). Please confirm that these differences between modules are intentional.

sep490-enterprise/src/main/resources/log4j2-spring.xml (1)

8-20:

❓ Verification inconclusive

Review the SplunkHttp appender security configuration

The SplunkHttp appender has certificate validation disabled which could expose the application to security vulnerabilities like man-in-the-middle attacks in production environments.


🏁 Script executed:

#!/bin/bash
# Check if any documentation exists about this security choice
echo "Checking for security documentation regarding disabled certificate validation..."
fd README.md --exec grep -i "certificate validation" {} \;

Length of output: 234


Security Review: SplunkHttp Appender Certificate Validation

The SplunkHttp appender is currently configured with disableCertificateValidation="true", which may expose the application to man-in-the-middle attacks in production. Our initial search for any accompanying security documentation—in README.md and related markdown files—returned no results.

Please verify one of the following:

  • Confirm that this configuration is strictly used in non-production (or a controlled testing) environment.
  • If it must remain in production, add clear documentation detailing the rationale behind disabling certificate validation and any compensating controls that are in place.
sep490-idp/src/main/java/green_buildings/idp/configs/MvcSecurityConfig.java (1)

20-22: Security improvement for WebAuthn configuration

The change from development environment (localhost) to production domain with HTTPS is a good security improvement. The WebAuthn settings now properly use the production domain "greenbuildings.cloud" with secure HTTPS protocol.

Verify that these changes are consistent with other configuration files:

#!/bin/bash
# Check for other configurations that might need to be updated
echo "Checking for other occurrences of domain configurations..."
rg "localhost" --type=java --type=xml --type=properties --type=yaml
rg "greenbuildings.cloud" --type=java --type=xml --type=properties --type=yaml
sep490-enterprise/src/test/java/enterprise/rest/BuildingControllerTest.java (1)

19-20: API endpoint path changes are consistent

The changes to the test endpoints from "/api/buildings/" to "/enterprise/buildings/" reflect the removal of the "/api" prefix as mentioned in the PR summary. This change is consistent across all test methods.

Verify that the controller implementation matches these updated endpoints:

#!/bin/bash
# Check if BuildingController endpoint paths have been updated consistently
echo "Checking BuildingController endpoint annotations..."
fd "BuildingController.java" --exec cat {} \; | grep -A 2 "@RequestMapping"

Also applies to: 31-32, 47-48, 59-60, 71-72

sep490-idp/src/main/java/green_buildings/idp/entity/UserEntity.java (2)

87-87: Default theme setting looks appropriate

Setting "system" as the default theme is a good choice as it typically respects the user's system preferences.


84-87:

✅ Verification successful

Verify migration plan for existing users

Adding default values to previously uninitialized fields may affect existing users. Ensure there's a migration plan or that the application code handles null values appropriately for existing records.


🏁 Script executed:

#!/bin/bash
# Check for migrations or database update scripts
echo "Checking for database migration scripts..."
fd --type f --extension sql | grep -i "migration\|update\|alter"

# Check if there's any code that handles null values for these fields
echo "Checking for null checks on locale and theme..."
rg "locale.*==.*null|theme.*==.*null" --type=java

Length of output: 1739


🏁 Script executed:

#!/bin/bash
echo "Searching for 'locale' and 'theme' in IDP migration scripts..."
rg -i "locale|theme" sep490-idp/src/main/resources/db/migration/*.sql

Length of output: 1102


Migration plan verified for existing users
The migration script sep490-idp/src/main/resources/db/migration/V0.0.1.8__UserConfigs.sql explicitly adds the locale and theme columns with default values ('vi-VN' and 'system' respectively) using NOT NULL DEFAULT. This ensures existing user records receive these values during migration, addressing the initial concern. No further changes are required.

sep490-idp/build.gradle (3)

21-23: Good exclusion of logging module

The exclusion of spring-boot-starter-logging from all configurations is correctly implemented to prepare for the switch to Log4j2.


28-30: Proper addition of Splunk Maven repository

You've correctly added the Splunk repository that will be required for the new logging dependencies.


57-58:

❓ Verification inconclusive

Verify logging dependencies compatibility

The addition of Splunk's logging library and Log4j2 starter looks good. These new dependencies align with the configuration change that excludes the default Spring Boot logging.


🏁 Script executed:

#!/bin/bash
# Check if there are any known incompatibilities between Splunk logging and Log4j2 versions
# Look for any spring-boot-starter-logging that might still be included indirectly

# Check for transitive dependencies that might bring in conflicting logging implementations
./gradlew :sep490-idp:dependencies | grep -E 'logging|log4j'

Length of output: 170


Logging dependencies configuration review: The updated dependencies in sep490-idp/build.gradle (lines 57–58) now include only Splunk's logging library and the Spring Boot Log4j2 starter, which aligns with the intended removal of the default Spring Boot logging. However, the initial automated check using ./gradlew failed because the Gradle wrapper wasn’t found, so we couldn’t automatically confirm that no transitive dependencies (like spring-boot-starter-logging) are being reintroduced. Please manually run a dependency analysis (e.g., using your local Gradle installation with a command such as gradle :sep490-idp:dependencies) to ensure that no conflicting logging implementations are present.

sep490-frontend/src/environments/environment.ts (1)

3-6:

✅ Verification successful

Correctly updated environment URLs for production

The environment variables have been properly updated to use production URLs with the https://greenbuildings.cloud domain. The changes include correct path adjustments for the idp and enterprise APIs.

However, ensure that:

  1. The client ID greenbuildings is properly registered in the IDP service
  2. All frontend code that consumes these endpoints has been tested with the new URLs

🌐 Web query:

Are there any CORS considerations when switching from localhost to a production domain in Angular applications?

💡 Result:

When transitioning an Angular application from localhost to a production domain, several CORS considerations are critical to ensure seamless communication between frontend and backend services:


1️⃣ Backend Configuration Updates

  • Allowed Origins:
    Update your backend (e.g., .NET Core) to explicitly include your production domain (e.g., https://yourdomain.com) alongside localhost in its CORS policy:
    policy.WithOrigins("http://localhost:4200", "https://yourdomain.com")
          .AllowAnyMethod()
          .AllowAnyHeader()
          .AllowCredentials();
    • Wildcards (*) are insufficient if credentials are involved[1][4].
    • Example frameworks:
      • Spring Boot: Use @CrossOrigin(origins = {"https://yourdomain.com"})[2].
      • Node/Express: Configure cors() middleware with explicit origins[4].

2️⃣ Credentials Handling

  • Frontend: Ensure withCredentials: true remains enabled in HTTP requests:
    this.http.get('https://api.yourdomain.com/data', { withCredentials: true });
  • Backend: Set Access-Control-Allow-Credentials: true and avoid wildcard (*) origins[1][5].

3️⃣ Proxy Configuration Removal

  • Development Proxy (proxy.conf.json) works locally but is irrelevant in production[4][7].
  • Ensure API endpoints in Angular’s environment.prod.ts point directly to your production backend URL:
    export const environment = {
      apiUrl: 'https://api.yourdomain.com'
    };

4️⃣ Preflight Request Handling

  • Browsers send OPTIONS requests for non-simple HTTP methods (e.g., PUT/DELETE).
  • Verify your backend responds with:
    • Valid Access-Control-Allow-Methods (e.g., GET/POST/PUT).
    • Correct Access-Control-Allow-Headers (e.g., Authorization, Content-Type)[1][8].

5️⃣ Production-Specific Security

  • Avoid lax configurations like AllowAnyOrigin() or AllowAnyHeader() unless strictly necessary[1][10].
  • Use reverse proxies (e.g., Nginx) or API gateways for additional header management:
    location /api/ {
      proxy_pass http://backend-server;
      add_header 'Access-Control-Allow-Origin' 'https://yourdomain.com';
      add_header 'Access-Control-Allow-Credentials' 'true';
    }

Common Pitfalls

Issue Solution
Backend allows only localhost Update CORS policy to include production domains[1][2].
Missing credentials support Enable AllowCredentials() on the backend and withCredentials on frontend[1][5].
Incorrect headers in preflight Ensure server responds with required Access-Control-* headers[8][10].

By addressing these considerations during deployment, you’ll mitigate CORS errors while maintaining secure cross-origin communication between your Angular frontend and backend services[1][4][7].

Citations:


Production Environment URLs Verified – Ensure Backend CORS and IDP Registration

The environment file at sep490-frontend/src/environments/environment.ts (lines 3–6) correctly reflects production URLs:

  • oidcAuthority: 'https://greenbuildings.cloud/idp'
  • idpApiUrl: 'https://greenbuildings.cloud/idp/api'
  • enterpriseUrl: 'https://greenbuildings.cloud/enterprise/api'
  • oidcClientId: 'greenbuildings'

Please take note of the following:

  • Confirm the greenbuildings client ID is properly registered with the IDP service.
  • Ensure that all frontend functionality consuming these endpoints has been thoroughly tested against the new production URLs.
  • Although the frontend changes are correct, verify that backend CORS configurations are updated appropriately for production. This includes:
    • Explicitly allowing the production domain in the CORS policy instead of defaulting to localhost.
    • Ensuring that credentials are handled properly (e.g., setting withCredentials on HTTP calls and correct CORS headers on the backend).
    • Removing any development-specific proxy configurations (like those in proxy.conf.json).

Overall, the environment changes are approved. Just ensure the external configurations (IDP registration and backend CORS) align with your production rollout.

sep490-enterprise/src/main/resources/application.yml (5)

13-13: Updated homepage URL to production

The homepage URL has been correctly updated to the production domain.


34-36: Kafka fail-fast configuration added

The addition of the Kafka admin configuration with fail-fast set to true is a good practice for production environments. This ensures the application will fail to start if it cannot connect to Kafka.


58-58: Added configurable log level for Spring test

Adding a configurable log level for Spring test framework is a good practice, allowing flexibility in different environments.


74-76: Added enterprise context path configuration

The addition of the server context path for the enterprise service is consistent with the changes in the frontend environment configuration.


37-42:

❓ Verification inconclusive

Kafka bootstrap servers updated to use service name

The Kafka bootstrap servers have been updated to use the service name kafka:9092 instead of localhost:9092. This is appropriate for containerized environments.


🏁 Script executed:

#!/bin/bash
# Check if there are any test configurations that might still be using localhost for Kafka
grep -r "localhost:9092" --include="*.java" --include="*.properties" --include="*.yml" .

Length of output: 88


Action Required: Confirm Kafka Configuration Update

The Kafka bootstrap servers have been correctly changed to use the service name kafka:9092 instead of localhost:9092 for containerized environments. An automated search for occurrences of "localhost:9092" across the repository did not return any results. However, due to the low-quality inference from the automated check, please manually verify that no test configurations or other files still reference "localhost:9092".

  • File affected: sep490-enterprise/src/main/resources/application.yml (lines 37–42)
  • Updated configuration:
      producer:
        bootstrap-servers: kafka:9092
        key-serializer: org.apache.kafka.common.serialization.StringSerializer
        value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
      consumer:
        bootstrap-servers: kafka:9092

Approved, but manual verification on this matter is advised.

sep490-idp/src/main/resources/application.yml (2)

34-34: Updated homepage URL to production domain

The homepage URL has been correctly updated to the production domain.


55-63: Kafka configuration updated consistently

The Kafka configuration has been updated consistently with the enterprise service, adding fail-fast and updating bootstrap servers to use the service name.

sep490-enterprise/build.gradle (4)

16-23: Good addition of logging configuration.

Excluding the default Spring Boot logging and adding Log4j2 with Splunk integration is a good approach for production-ready logging.


27-29: Splunk Maven repository added correctly.

The Splunk repository has been correctly added to retrieve the Splunk logging library.


48-48: Kafka test container dependency added properly.

The Kafka test container dependency is correctly added to support the Kafka container in TestcontainersConfigs.


53-54:

✅ Verification successful

Verify Splunk logging library version.

The Splunk logging library version should be verified to ensure it's compatible with the Spring Boot version and Log4j2.


🌐 Web query:

Is splunk-library-javalogging:1.11.8 compatible with Spring Boot 3.4.2 and Log4j2?

💡 Result:

Splunk logging for Java version 1.11.8 is compatible with Spring Boot 3.x (including 3.4.2) and Log4j2, based on evidence from multiple sources:

Compatibility Details

  1. Log4j2 Support

    • The library explicitly supports Log4j 2.17.x [1][4], which addresses critical CVEs (e.g., CVE-2021-44832) and aligns with modern security requirements.
    • Example configurations for Log4j2 are provided in Splunk’s documentation [1][5].
  2. Spring Boot Integration

    • Maven repository listings show splunk-library-javalogging:1.11.x paired with Spring Boot 3.x dependencies (e.g., spring-boot-starter-log4j2:3.x) in production-grade projects [9].
    • Spring Boot’s default logging framework (Logback) can be replaced with Log4j2 by excluding spring-boot-starter-logging and including spring-boot-starter-log4j2 [9].
  3. Java Version Alignment

    • Splunk logging for Java requires Java 8+, while Spring Boot 3.x targets Java 17+ – no version conflicts exist here [1].

Key Considerations

  • Ensure your log4j2.xml includes Splunk’s appender classes (e.g., HttpSplunk) and references the correct dependencies [5][8].
  • Use Maven/Gradle to manage transitive dependencies:
    <dependency>
      <groupId>com.splunk.logging</groupId>
      <artifactId>splunk-library-javalogging</artifactId>
      <version>1.11.8</version>
    </dependency>
  • For HTTP Event Collector (HEC), verify token configuration and batch settings in your appender [5][8].

Troubleshooting Tips

  • If encountering ClassNotFoundException, confirm the JAR is correctly placed in your classpath [7].
  • For errors like CLASS_NOT_FOUND in XML configurations, ensure you’re using updated appender names from Splunk’s latest examples [2][8].

Citations:


Compatibility Verified: Splunk logging library version is confirmed to be compatible with Spring Boot 3.4.2 and Log4j2.

The web query confirms that splunk-library-javalogging:1.11.8 works well with Spring Boot 3.4.2 and the specified Log4j2 version, so no changes are necessary.

sep490-infrastructure/docker-compose.yml (4)

2-13: Frontend service configuration looks good.

The web service is properly configured with the required environment variables and dependencies.


14-37: Enterprise service configuration is well structured.

The enterprise service is well configured with all necessary environment variables and dependencies.


122-122: Updated Kafka advertised listeners for containerized environment.

Good change - updating the Kafka advertised listeners to use the service name instead of localhost is necessary for containerized environments.


125-125: Updated Kafka controller quorum voters for containerized environment.

Good change - updating the Kafka controller quorum voters to use the service name is necessary for containerized environments.

sep490-enterprise/src/test/java/enterprise/TestcontainersConfigs.java (4)

16-17: Added necessary imports for Kafka container.

The imports for KafkaContainer and DockerImageName are properly added.


26-30: Made container variables static final and added Kafka container.

Good change - making the container variables static final is appropriate for a shared test resource, and the Kafka container is correctly initialized.


33-33: Kafka container is now started in the static block.

The Kafka container is properly initialized in the static block alongside other containers.


66-67: Configured Kafka bootstrap servers for tests.

The Kafka producer and consumer bootstrap servers are correctly configured for tests.

Comment on lines +13 to +14
OIDC_REDIRECT_URI=
OIDC_POST_LOGOUT_REDIRECT_URI=
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

⚠️ Potential issue

🧩 Analysis chain

OIDC URI variables appear to be reversed.

Based on the naming convention and typical OpenID Connect configuration patterns, these variables appear to be reversed in the docker-compose.yml file (line 47-48).

Verify that the environment variables are correctly configured in the following docker-compose.yml assignment:


🏁 Script executed:

#!/bin/bash
grep -A2 "OIDC_POST_LOGOUT_REDIRECT_URI" sep490-infrastructure/docker-compose.yml

Length of output: 289


Critical: Misconfigured OIDC URI Variables in Docker-Compose

The grep output confirms that the assignments in sep490-infrastructure/docker-compose.yml are indeed reversed:

  • OIDC_POST_LOGOUT_REDIRECT_URI is set to ${OIDC_REDIRECT_URI}
  • OIDC_REDIRECT_URI is set to ${OIDC_POST_LOGOUT_REDIRECT_URI}

This reversal contradicts the naming convention typically expected for OpenID Connect configurations. Please verify and update the mapping in the docker-compose file to ensure that each variable correctly references its intended environment variable. Also, ensure that the example file (sep490-infrastructure/.env.local.example at lines 13-14) reflects the correct 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