-
Notifications
You must be signed in to change notification settings - Fork 61
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
fix(application-system-api): Add missing national registry v3 xroad client config #16770
Conversation
WalkthroughThe pull request introduces several updates across multiple configuration files and the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (4)
apps/application-system/api/infra/application-system-api.ts
(2 hunks)charts/islandis/values.dev.yaml
(1 hunks)charts/islandis/values.prod.yaml
(1 hunks)charts/islandis/values.staging.yaml
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
apps/application-system/api/infra/application-system-api.ts (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
🪛 Gitleaks
charts/islandis/values.dev.yaml
613-613: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
charts/islandis/values.prod.yaml
601-601: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
charts/islandis/values.staging.yaml
610-610: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
🔇 Additional comments (4)
apps/application-system/api/infra/application-system-api.ts (2)
39-39
: LGTM: Import statement properly added
The NationalRegistryB2C
import is correctly added to the existing xroad imports, maintaining alphabetical order and consistent formatting.
271-271
: Verify required environment variables for NationalRegistryB2C
While the xroad client is properly added, the configuration appears to be missing the required environment variables mentioned in the AI summary (NATIONAL_REGISTRY_B2C_CLIENT_ID
, NATIONAL_REGISTRY_B2C_ENDPOINT
, NATIONAL_REGISTRY_B2C_PATH
, NATIONAL_REGISTRY_B2C_SCOPE
).
Let's verify if these environment variables are defined elsewhere:
✅ Verification successful
Environment variables for NationalRegistryB2C are properly configured
The required environment variables for NationalRegistryB2C are properly configured across the codebase:
- All necessary variables (
NATIONAL_REGISTRY_B2C_CLIENT_ID
,NATIONAL_REGISTRY_B2C_ENDPOINT
,NATIONAL_REGISTRY_B2C_PATH
,NATIONAL_REGISTRY_B2C_SCOPE
,NATIONAL_REGISTRY_B2C_CLIENT_SECRET
) are defined in:- Configuration files (
infra/src/dsl/xroad.ts
) - Environment-specific values files (
charts/islandis/values.{dev,staging,prod}.yaml
) - Client configuration (
libs/clients/national-registry/v3/src/lib/nationalRegistryV3.config.ts
)
- Configuration files (
The implementation follows the established pattern and all required environment variables are properly set up.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for National Registry B2C environment variables in the codebase
echo "Searching for National Registry B2C environment variables..."
rg -i "NATIONAL_REGISTRY_B2C_" --type yaml
# Search for any references to these variables in the code
echo "Searching for references to these variables in the code..."
rg -i "nationalRegistryB2C" --type typescript
Length of output: 15746
Script:
#!/bin/bash
# Search for references to these variables in TypeScript/JavaScript files
echo "Searching for references to National Registry B2C in TypeScript/JavaScript files..."
rg -i "nationalRegistryB2C" -g "*.ts" -g "*.js" -A 3
# Search for environment variable definitions in TypeScript/JavaScript files
echo "Searching for environment variable definitions..."
rg -i "NATIONAL_REGISTRY_B2C_" -g "*.ts" -g "*.js" -A 3
Length of output: 13109
charts/islandis/values.prod.yaml (1)
601-604
: Configuration pattern is consistently applied across services
The National Registry B2C configuration is correctly applied across multiple services (application-system-api, endorsement-system-api, regulations-admin-backend) with consistent values, which is good for maintainability. The configuration includes all necessary parameters:
- Client ID
- Endpoint
- Path
- Scope
Also applies to: 601-604, 601-604
🧰 Tools
🪛 Gitleaks
601-601: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
charts/islandis/values.dev.yaml (1)
613-616
: Verify National Registry B2C configuration consistency
The National Registry B2C configuration has been added to multiple services. Let's verify the configuration is consistent across all services.
✅ Verification successful
National Registry B2C configuration is consistent across environments
The National Registry B2C configuration is properly configured and consistent across all environments (dev, staging, prod) in both the identity-server and islandis charts. Each environment has its appropriate:
- Client IDs
- Endpoints with correct domain names
- Environment-specific paths (IS-DEV, IS-TEST, IS)
- Matching scopes per environment
- Consistent secret paths
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if National Registry B2C configuration is consistent across services
# Search for National Registry B2C configuration
echo "Checking National Registry B2C configuration consistency..."
rg "NATIONAL_REGISTRY_B2C_" -A 3
Length of output: 35577
🧰 Tools
🪛 Gitleaks
613-613: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16770 +/- ##
=======================================
Coverage 36.55% 36.55%
=======================================
Files 6892 6892
Lines 143767 143767
Branches 40964 40964
=======================================
Hits 52557 52557
Misses 91210 91210
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 21110 Passed, 0 Skipped, 16m 15.98s Total Time |
…lient config (#16770) * fix: init * chore: charts update dirty files --------- Co-authored-by: andes-it <builders@andes.is> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
What
Why
Checklist:
Summary by CodeRabbit
Release Notes
New Features
Improvements
These changes enhance the overall performance and user experience of the application.