-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore(applications): add appsettings for yt01 #1312
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughNew JSON configuration files have been added for the Changes
Possibly related PRs
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (5)
src/Digdir.Domain.Dialogporten.Janitor/appsettings.yt01.json (2)
19-35
: LGTM! Application configuration is well-structured.The Application section is properly configured with the correct BaseUri for the yt01 environment. The use of primary and secondary Ed25519 key pairs is a good practice for key rotation.
Consider adding a brief comment explaining the purpose of the Ed25519 key pairs for better clarity.
36-53
: LGTM! WebApi authentication configuration is comprehensive.The WebApi section properly defines the necessary JWT Bearer token schemas for Maskinporten, Altinn, and Idporten. The WellKnown URLs are correctly set for the test/yt01 environment.
For consistency with the other sections, consider adding a brief comment explaining the purpose of each authentication schema.
src/Digdir.Domain.Dialogporten.WebApi/appsettings.yt01.json (1)
27-43
: LGTM: Application section is well-structured. Consider adding a comment for Ed25519 key pairs.The Application section is correctly configured with appropriate placeholders for sensitive information. The structure for Ed25519 key pairs is consistent and well-organized.
Suggestion for improvement:
Consider adding a brief comment explaining the purpose of the Ed25519 key pairs and their usage in the application. This would enhance the configuration's self-documentation.Example comment to add above line 30:
// Ed25519 key pairs used for signing and verifying dialogporten tokens
src/Digdir.Domain.Dialogporten.GraphQL/appsettings.yt01.json (2)
27-43
: LGTM! Consider documenting key rotation procedures.The Application section is well-structured with appropriate settings for the yt01 environment. The use of Azure API Management for the BaseUri and the inclusion of both Primary and Secondary Ed25519KeyPairs are good practices.
Consider adding documentation (if not already present) on the procedures for rotating the Ed25519KeyPairs, including how often they should be rotated and the process for updating the configuration when rotation occurs.
1-62
: Overall, the configuration looks good and is well-structured.The
appsettings.yt01.json
file is properly configured for the yt01 environment, with appropriate settings for Infrastructure, Application, and GraphQl sections. The use of "TODO: Add to local secrets" placeholders for sensitive information is consistent with project practices and security best practices.To further improve the configuration file:
- Consider adding comments to explain any yt01-specific settings or deviations from other environments.
- Ensure that all TODO placeholders are replaced with actual values before deployment to the yt01 environment.
- Document the process for managing and updating these configuration values, especially for the Ed25519KeyPairs and other sensitive information.
🧰 Tools
🪛 Biome
[error] 7-7: Expected a property but instead found '// Settings from appsettings.json, environment variables or other configuration providers.'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: Expected a property but instead found '// 1. Valid values are test and prod'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-12: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-14: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-18: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
- src/Digdir.Domain.Dialogporten.GraphQL/appsettings.yt01.json (1 hunks)
- src/Digdir.Domain.Dialogporten.Janitor/appsettings.yt01.json (1 hunks)
- src/Digdir.Domain.Dialogporten.WebApi/appsettings.yt01.json (1 hunks)
🧰 Additional context used
📓 Learnings (3)
src/Digdir.Domain.Dialogporten.GraphQL/appsettings.yt01.json (2)
Learnt from: elsand PR: digdir/dialogporten#1182 File: src/Digdir.Domain.Dialogporten.Janitor/appsettings.staging.json:4-4 Timestamp: 2024-09-24T11:25:25.336Z Learning: In this project, "TODO: Add to local secrets" placeholders in configuration files are intentionally used to ensure that missing configurations fail fast and loud. These settings are overridden by Azure app configuration mechanisms, as documented in `docs/Configuration.md`.
Learnt from: elsand PR: digdir/dialogporten#1182 File: src/Digdir.Domain.Dialogporten.Janitor/appsettings.staging.json:4-4 Timestamp: 2024-10-08T15:39:24.789Z Learning: In this project, "TODO: Add to local secrets" placeholders in configuration files are intentionally used to ensure that missing configurations fail fast and loud. These settings are overridden by Azure app configuration mechanisms, as documented in `docs/Configuration.md`.
src/Digdir.Domain.Dialogporten.Janitor/appsettings.yt01.json (2)
Learnt from: elsand PR: digdir/dialogporten#1182 File: src/Digdir.Domain.Dialogporten.Janitor/appsettings.staging.json:4-4 Timestamp: 2024-10-08T15:39:24.789Z Learning: In this project, "TODO: Add to local secrets" placeholders in configuration files are intentionally used to ensure that missing configurations fail fast and loud. These settings are overridden by Azure app configuration mechanisms, as documented in `docs/Configuration.md`.
Learnt from: elsand PR: digdir/dialogporten#1182 File: src/Digdir.Domain.Dialogporten.Janitor/appsettings.staging.json:4-4 Timestamp: 2024-09-24T11:25:25.336Z Learning: In this project, "TODO: Add to local secrets" placeholders in configuration files are intentionally used to ensure that missing configurations fail fast and loud. These settings are overridden by Azure app configuration mechanisms, as documented in `docs/Configuration.md`.
src/Digdir.Domain.Dialogporten.WebApi/appsettings.yt01.json (2)
Learnt from: elsand PR: digdir/dialogporten#1182 File: src/Digdir.Domain.Dialogporten.Janitor/appsettings.staging.json:4-4 Timestamp: 2024-09-24T11:25:25.336Z Learning: In this project, "TODO: Add to local secrets" placeholders in configuration files are intentionally used to ensure that missing configurations fail fast and loud. These settings are overridden by Azure app configuration mechanisms, as documented in `docs/Configuration.md`.
Learnt from: elsand PR: digdir/dialogporten#1182 File: src/Digdir.Domain.Dialogporten.Janitor/appsettings.staging.json:4-4 Timestamp: 2024-10-08T15:39:24.789Z Learning: In this project, "TODO: Add to local secrets" placeholders in configuration files are intentionally used to ensure that missing configurations fail fast and loud. These settings are overridden by Azure app configuration mechanisms, as documented in `docs/Configuration.md`.
🪛 Biome
src/Digdir.Domain.Dialogporten.GraphQL/appsettings.yt01.json
[error] 7-7: Expected a property but instead found '// Settings from appsettings.json, environment variables or other configuration providers.'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: Expected a property but instead found '// 1. Valid values are test and prod'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-12: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-14: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-18: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
src/Digdir.Domain.Dialogporten.WebApi/appsettings.yt01.json
[error] 7-7: Expected a property but instead found '// Settings from appsettings.json, environment variables or other configuration providers.'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: Expected a property but instead found '// 1. Valid values are test and prod'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-12: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-14: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-18: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
🔇 Additional comments (6)
src/Digdir.Domain.Dialogporten.Janitor/appsettings.yt01.json (2)
2-18
: LGTM! Infrastructure configuration looks good.The Infrastructure section is well-structured and includes all necessary components: Redis, DialogDbConnectionString, Maskinporten, and Altinn.
The use of "TODO: Add to local secrets" placeholders is intentional and aligns with the project's practice of ensuring missing configurations fail fast and loud. These settings will be overridden by Azure app configuration mechanisms as documented.
1-54
: Overall, the configuration file is well-structured and appropriate for the yt01 environment.The
appsettings.yt01.json
file is comprehensive and includes all necessary configurations for the Infrastructure, Application, and WebApi sections. The use of "TODO: Add to local secrets" placeholders is consistent with the project's practices and ensures that sensitive information is handled securely.The configuration aligns well with the PR objectives of adding application settings for the new yt01 environment. No major issues were found during the review, and only minor suggestions for improvement were made regarding adding brief comments for clarity and consistency.
Great job on setting up this configuration file!
src/Digdir.Domain.Dialogporten.WebApi/appsettings.yt01.json (2)
2-26
: LGTM: Infrastructure section is well-structured with appropriate placeholders.The Infrastructure section is correctly configured with placeholders for sensitive information. This approach, using "TODO: Add to local secrets", is intentional and aligns with the project's practices to ensure missing configurations fail fast and loud.
Key points:
- Redis and database connection strings are properly included.
- Maskinporten configuration is comprehensive, including environment, client ID, and required scopes.
- Altinn configuration includes necessary base URIs and a placeholder for the subscription key.
🧰 Tools
🪛 Biome
[error] 7-7: Expected a property but instead found '// Settings from appsettings.json, environment variables or other configuration providers.'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: Expected a property but instead found '// 1. Valid values are test and prod'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-12: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-14: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-18: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
1-62
: Overall: Excellent configuration file for the yt01 environment.This new
appsettings.yt01.json
file successfully meets the PR objectives by providing comprehensive configuration for the yt01 environment. Key observations:
- The file structure is consistent, well-organized, and easy to read.
- Sensitive information is handled appropriately with "TODO: Add to local secrets" placeholders, aligning with the project's practices.
- Environment-specific configurations are correctly set for yt01/test, including URLs and other relevant settings.
- The configuration covers all necessary aspects: Infrastructure, Application, and WebApi authentication.
Great job on creating a thorough and well-structured configuration file!
🧰 Tools
🪛 Biome
[error] 7-7: Expected a property but instead found '// Settings from appsettings.json, environment variables or other configuration providers.'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: Expected a property but instead found '// 1. Valid values are test and prod'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-12: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-14: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-18: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
src/Digdir.Domain.Dialogporten.GraphQL/appsettings.yt01.json (2)
2-26
: LGTM! Verify Maskinporten scope.The Infrastructure section is well-structured and appropriate for the yt01 environment. The use of "TODO: Add to local secrets" placeholders is intentional and aligns with the project's configuration practices.
Please verify that the Maskinporten scope on line 15 includes all necessary permissions for this environment:
"Scope": "altinn:events.publish altinn:events.publish.admin altinn:register/partylookup.admin altinn:authorization/authorize.admin altinn:accessmanagement/authorizedparties.admin"
Ensure that these scopes are correct and required for the yt01 environment.
🧰 Tools
🪛 Biome
[error] 7-7: Expected a property but instead found '// Settings from appsettings.json, environment variables or other configuration providers.'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: Expected a property but instead found '// 1. Valid values are test and prod'.
Expected a property here.
(parse)
[error] 9-9: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 10-10: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-11: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 11-12: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-13: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 13-14: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-15: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 15-18: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
[error] 19-19: End of file expected
Use an array for a sequence of values:
[1, 2]
(parse)
44-61
: LGTM! Verify well-known URLs.The GraphQl section is well-configured with appropriate JWT Bearer Token Schemas for the yt01 environment. The inclusion of multiple authentication providers (Maskinporten, Altinn, Idporten) demonstrates a comprehensive authentication strategy.
Please verify that the following well-known URLs are correct and up-to-date for the yt01 environment:
- Maskinporten: https://test.maskinporten.no/.well-known/oauth-authorization-server/
- Altinn: https://platform.yt01.altinn.no/authentication/api/v1/openid/.well-known/openid-configuration
- Idporten: https://test.idporten.no/.well-known/openid-configuration
Ensure these URLs are the most current for the test environments of each service.
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Quality Gate passedIssues Measures |
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Co-authored-by: Knut Haug <154342485+knuhau@users.noreply.github.com>
Quality Gate passedIssues Measures |
Description
Adds appsettings for the new yt01 environment
Related Issue(s)
Verification
Documentation
docs
-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)Summary by CodeRabbit
These changes are essential for the application's functionality, particularly in a test environment.