Commit 04de150
Add Keycloak with Postgres integration (#811)
* **Add Keycloak with Postgres integration**
- Introduced a new project `CommunityToolkit.Aspire.Keycloak.Postgress` for configuring Keycloak with PostgreSQL.
- Added an extension method to simplify Keycloak and Postgres database resource integration.
- Updated solution and package references for Aspire dependencies.
* Refactor Keycloak Postgres extension for improved configuration
- Enhanced parameter descriptions in XML documentation.
- Updated method to support asynchronous operations.
- Introduced additional environment variables for finer-grained database configuration.
- Added cancellation token support for improved task management.
* Refactor Keycloak Postgres extension for streamlined configuration
- Simplified XML documentation and parameter descriptions.
- Removed exceptions for parent resource validation.
- Replaced manual environment variable setup with connection string parsing using `NpgsqlConnectionStringBuilder`.
- Introduced optional port parameter for database configuration.
* Update src/CommunityToolkit.Aspire.Keycloak.Postgress/KeycloakPostgresExtension.cs
Co-authored-by: Alireza Baloochi <[email protected]>
* Refactor Keycloak Postgres extension and restructure project
- Renamed `CommunityToolkit.Aspire.Keycloak.Postgress` to `CommunityToolkit.Aspire.Keycloak.Extensions.Postgres`.
- Refactored methods to improve flexibility, including support for different configurations (e.g., development, credentials).
- Introduced a dedicated test project `CommunityToolkit.Aspire.Keycloak.Extensions.Postgres.Tests`.
- Updated solution, dependencies, and project references accordingly.
* Update src/CommunityToolkit.Aspire.Keycloak.Extensions.Postgres/KeycloakPostgresExtension.cs
Co-authored-by: Copilot <[email protected]>
* Update src/CommunityToolkit.Aspire.Keycloak.Extensions.Postgres/KeycloakPostgresExtension.cs
Co-authored-by: Copilot <[email protected]>
* Update src/CommunityToolkit.Aspire.Keycloak.Extensions.Postgres/KeycloakPostgresExtension.cs
Co-authored-by: Copilot <[email protected]>
* Remove Postgres-specific Keycloak extension and merge functionality into core Keycloak extensions
- Deleted `CommunityToolkit.Aspire.Keycloak.Extensions.Postgres`.
- Integrated Postgres configuration methods into `CommunityToolkit.Aspire.Keycloak.Extensions`.
- Updated project and solution references to reflect the restructuring.
- Standardized package versioning using `AspireVersion`.
* Update tests/CommunityToolkit.Aspire.Keycloak.Extensions.Postgres.Tests/CommunityToolkit.Aspire.Keycloak.Extensions.Postgres.Tests.csproj
Co-authored-by: David Fowler <[email protected]>
* Refactor Keycloak Postgres extension for code reuse and improved flexibility
- Extracted `WithPostgresData` helper method to reduce redundant code.
- Improved default credential handling for Username and Password parameters.
- Updated XML documentation for clarity and consistency.
* Move Keycloak Postgres extension tests into core Keycloak extensions
- Removed `CommunityToolkit.Aspire.Keycloak.Extensions.Postgres.Tests`.
- Added `WithPostgres` tests to `CommunityToolkit.Aspire.Keycloak.Extensions.Tests`.
- Updated solution and project references to reflect restructuring.
* Add README and comprehensive tests for Keycloak PostgreSQL integration
- Introduced detailed `README.md` explaining the Keycloak PostgreSQL Aspire extension's features, usage, and API.
- Added extensive unit tests in `KeycloakExtensionTests` for validating default credentials, explicit parameters, server parameters, and XA transaction enablement.
- Refactored `WithPostgres` method to streamline environment variable configuration and enhance maintainability.
* Remove outdated comment in KeycloakExtensionTests regarding server parameter expectations
* Add integration tests for Keycloak with Postgres and update project references
- Introduced `KeycloakWithPostgresIntegrationTest` for verifying Keycloak's behavior with PostgreSQL.
- Updated `WithPostgres` method to include a wait condition for database readiness.
- Added project reference to `CommunityToolkit.Aspire.Testing` for testing utilities.
* Add Keycloak Postgres example projects and enhance Aspire integration
- Added example projects under `examples/keycloak-postgres` for showcasing Keycloak integration with PostgreSQL in development and production environments.
- Introduced `AppHost` projects with service defaults for common functionalities like OpenTelemetry, resilience, and health checks.
- Updated `CommunityToolkit.Aspire.Keycloak.Extensions` with a description and additional package tags for better discoverability.
- Registered the new example projects in the solution file.
* Remove unused Moq package reference from Keycloak extension tests project
* Update Keycloak Postgres example projects and dependencies
- Added conditional handling for `RequireHttpsMetadata` in development environments for both Dev and Prod projects.
- Updated `Aspire.Hosting` and `Aspire.Keycloak.Authentication` package versions to 9.4.2.
- Standardized XML formatting across example project files.
* Update Aspire package version references to use variable-based approach
- Switched `Aspire.Hosting` and related package versions to reference `$(AspireVersion)` for consistency.
- Downgraded `Aspire.Keycloak.Authentication` from `9.4.2-preview.1.25428.12` to `9.4.1-preview.1.25408.4`.
* Update Directory.Packages.props and Keycloak tests for new package versions and refactoring
* Rename Keycloak Extensions and Examples to use "Hosting" for consistency
- Updated namespace and project names from `CommunityToolkit.Aspire.Keycloak.Extensions` to `CommunityToolkit.Aspire.Keycloak.Hosting.Extensions`.
- Adjusted all associated file paths, project references, and solution entries.
- Renamed example projects under `examples/keycloak-postgres` to align with the namespace changes.
- Verified updates in integration and unit test coverage.
* Rename Keycloak Extensions to "Hosting" for consistency
- Updated namespaces, project names, and file paths from `CommunityToolkit.Aspire.Keycloak.Extensions` to `CommunityToolkit.Aspire.Keycloak.Hosting.Extensions`.
- Adjusted test projects, README files, and integration tests accordingly.
- Verified alignment with example projects and ensured test coverage.
* Update Keycloak PostgreSQL extensions for hosting model compliance
- Refactored namespaces to align with `Aspire.Hosting`.
- Simplified parameter handling in `WithPostgres` methods.
- Updated README with adjusted examples and clarified usage notes.
- Enhanced project metadata and descriptions for consistency.
- Added missing project references in test projects to ensure coverage.
* Enhance XML docs for `WithPostgres` methods and fix project references
- Extended and clarified XML documentation for `WithPostgres` methods to improve developer understanding.
- Removed unused `<TargetFrameworks />` from example project files.
- Corrected project references in `AppHost` to align with the updated namespace and file paths.
- Cleaned up unused `using` directives in `AppHost.cs`.
* Rename Keycloak Hosting Extensions to Aspire.Hosting for consistency
- Updated namespaces, project names, and file paths to align with `Aspire.Hosting` naming convention.
- Renamed example projects in `examples/keycloak-postgres` to reflect changes.
- Corrected project references, solution entries, and adjusted test projects accordingly.
- Simplified `WithPostgres` methods with optional username and password handling.
* Fixing the naming again and some build issues
* Adding the tests in
* Fixing more bad changes
* Dealing with more build errors
---------
Co-authored-by: Alireza Baloochi <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: David Fowler <[email protected]>
Co-authored-by: Aaron Powell <[email protected]>1 parent 4958e4a commit 04de150
File tree
26 files changed
+806
-1
lines changed- .github/workflows
- examples/keycloak-postgres
- CommunityToolkit.Aspire.Hosting.Keycloak.Extensions.AppHost
- Properties
- CommunityToolkit.Aspire.Hosting.Keycloak.Extensions.Dev
- Properties
- CommunityToolkit.Aspire.Hosting.Keycloak.Extensions.Prod
- Properties
- CommunityToolkit.Aspire.Hosting.Keycloak.Extensions.ServiceDefaults
- src/CommunityToolkit.Aspire.Hosting.Keycloak.Extensions
- tests/CommunityToolkit.Aspire.Hosting.Keycloak.Extensions.Tests
26 files changed
+806
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| |||
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
159 | | - | |
160 | 165 | | |
| 166 | + | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
| |||
205 | 211 | | |
206 | 212 | | |
207 | 213 | | |
| 214 | + | |
208 | 215 | | |
209 | 216 | | |
210 | 217 | | |
| |||
249 | 256 | | |
250 | 257 | | |
251 | 258 | | |
| 259 | + | |
252 | 260 | | |
253 | 261 | | |
254 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments