Skip to content

v1.1.2 Keycloak Auth, .NET 10, and AI Refinements#99

Merged
fboucher merged 41 commits intomainfrom
v-next
Mar 9, 2026
Merged

v1.1.2 Keycloak Auth, .NET 10, and AI Refinements#99
fboucher merged 41 commits intomainfrom
v-next

Conversation

@fboucher
Copy link
Owner

@fboucher fboucher commented Mar 9, 2026

This release upgrades the application to .NET 10, integrates Keycloak for robust authentication, and refactors AI services for enhanced configurability and extensibility.

Key Changes

  • .NET 10 Upgrade: Updates the target framework, SDK, ASP.NET base images, and unit test workflows to .NET 10.
  • Keycloak Authentication and Authorization:
    • Enables OpenID Connect authentication using Keycloak for the Blazor application, enhancing security.
    • Adds dedicated login, logout, and user display components, securing access to most pages.
    • Provides new Docker Compose configurations and comprehensive documentation for setting up Keycloak and deploying the application in a containerized environment.
    • Integrates Aspire.Hosting.Keycloak for streamlined local development.
  • AI Services Refactoring and Centralized Settings:
    • Migrates AI services to leverage the Microsoft AI Agent Framework, promoting better architecture and future extensibility.
    • Introduces a centralized AI settings provider that allows users to configure AI API keys, base URLs, and model names through the application's settings UI, with these settings stored in the database and taking precedence over environment variables.
    • Enhances security by masking AI API keys when retrieved through the API.
    • Improves robustness of PostSuggestion date parsing to handle diverse AI responses.
  • Enhanced Note Management:
    • Adds full CRUD capabilities (Get, Update, Delete) for individual notes via new API endpoints.
    • Refactors the NoteDialog component to offer a unified interface for creating, editing, and deleting notes, including new functionality for managing tags.
    • Strengthens existing domain model tests for increased reliability.
    • Adds a ToMarkdown method for ReadingNote to facilitate summary generation.
  • Documentation and Infrastructure:
    • Updates README.md with new run options, deployment guides, and .NET version.
    • Streamlines Docker Compose files, replacing older general configurations with specific ones for Keycloak and the application.
    • Adds new .gitignore entries for AI team folders and todos, improving repository hygiene.

fboucher and others added 30 commits December 12, 2025 17:45
Updates the target framework to .NET 10.0.

Also, upgrades several package versions, including Microsoft, OpenTelemetry, and other dependencies,
to align with the new .NET version and incorporate the latest features and bug fixes.

Updates Reka SDK to the latest version.

Fixes #82
Upgrades to .NET 10 and updates packages
Corrects assertions in note endpoint tests to accurately reflect expected behavior.

Addresses issues where the test expected a `ReadingNote` object instead of a `Note` object after the type renaming.

Also removes a redundant non-null assertion as the subsequent `BeEmpty()` assertion already implies a non-null value.

Fixes #83
Introduces unit tests for domain models, including:
- `ContainsPlaceholderAttribute`
- `NoteCategories`
- `Note`
- `PostSuggestion`
- `ReadingNote`
- `SearchCriterias`

These tests cover various aspects of the domain models, such as validation, serialization/deserialization, and property setting.

The old `NoteTests` and `ReadingNoteTests` files were deleted since they were duplicated.

The goal is to ensure the correctness and reliability of the core domain logic.
Updates the default .NET version used in the unit tests workflow to version 10.0.
This ensures the project uses a more recent .NET version in the v-next branch.
Updates the .NET SDK and ASP.NET base images in the Dockerfiles
for both the API and Blazor applications to version 10.0.
Co-authored-by: fboucher <2404846+fboucher@users.noreply.github.com>
Co-authored-by: fboucher <2404846+fboucher@users.noreply.github.com>
Co-authored-by: fboucher <2404846+fboucher@users.noreply.github.com>
Co-authored-by: fboucher <2404846+fboucher@users.noreply.github.com>
Add note editing and deletion capabilities
Updates .gitignore to ignore the todos folder.

This prevents the todos folder from being tracked by Git.
Session: 2026-02-14-ai-agent-migration
Requested by: fboucher

Changes:
- Merged 4 decision(s) from inbox into decisions.md
- Consolidated overlapping decisions: Ripley, Newt, Hudson, Hicks migrations
- Logged session to .ai-team/log/2026-02-14-ai-agent-migration.md
- Updated agent histories with team decision notification
- Deleted 4 inbox decision files after merging
- Migrated ResearchService and SummaryService to use Microsoft.Agents.AI
- Added structured output support via AIJsonUtilities.CreateJsonSchema
- Updated services to use configurable API settings (API_KEY, baseUrl, modelName)
- Added AI provider configuration UI in Settings page (API_KEY, baseUrl, modelName)
- Created comprehensive test suite (31 tests) for AI services
- Updated package dependencies:
  - Added: Microsoft.Agents.AI (1.0.0-preview.260209.1)
  - Added: Microsoft.Extensions.AI.OpenAI (10.1.1-preview.1.25612.2)
  - Removed: Reka.SDK

All todos completed:
✅ Convert NoteBookmark.AIServices to use Microsoft AI Agent Framework
✅ Add AI provider settings to Settings page
✅ Configure services to use settings from UI

Co-authored-by: Ripley <lead>
Co-authored-by: Hicks <backend>
Co-authored-by: Newt <frontend>
Co-authored-by: Hudson <tester>
Migrates AI services to use a settings provider, enabling configuration from the database and falling back to IConfiguration.

This allows user-saved settings to take precedence over environment variables and adds handling for various date formats in the AI response. Also mask the API key on the server.
…ework

Migrates AI services to Agent Framework
- Integrated Keycloak via Aspire.Hosting.Keycloak package
- Added OpenID Connect authentication to BlazorApp with Keycloak provider
- Configured home page as public, all other pages require authentication
- Added Login/Logout UI components in top-right corner
- Configured id_token_hint for proper logout flow
- Added comprehensive Keycloak setup documentation
- Updated .gitignore to exclude Development settings and local config files

This implements private website access control where only selected users
can authenticate through Keycloak.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds Keycloak authentication to the application,
securing all pages except the home page.
This enhances security by requiring users to log in
via Keycloak to access most of the application's features.
Adds initial support for Keycloak authentication to the Blazor app.
This includes adding necessary packages and configuring
the application to use OpenID Connect for authentication.
Additionally, sets up squad related file tracking.
Introduces Keycloak for user authentication, enhancing security with OpenID Connect.

Adds Keycloak as an Aspire resource for simplified management and data persistence.

Includes documentation for Keycloak setup and configuration, aiding developers in configuring authentication.

Adds authorization attributes to Blazor pages, restricting access to authenticated users.
Ensures proper handling of asynchronous operations during sign-out redirect to Keycloak.

This change avoids potential deadlocks by awaiting the result of getting the id_token from the HttpContext.
Session: 2026-02-16-docker-compose-docs
Requested by: fboucher

Changes:
- logged session to .ai-team/log/2026-02-16-docker-compose-docs.md
- merged 2 decision(s) from inbox into decisions.md
- consolidated Keycloak decisions with dual-mode architecture, logout flow, and orchestration details
- propagated updates to 2 agent history file(s) (Hicks, Newt)
- deleted merged inbox files
Introduces Keycloak for user authentication.

Provides Docker Compose deployment documentation and sample environment configuration.

The AppHost now supports both development (emulator) and production (docker-compose) modes.
Updates the Docker Compose deployment documentation to reflect the Aspire CLI based deployment workflow, including environment configuration and running instructions.

The documentation now describes how to generate docker-compose.yaml using Aspire instead of `aspirate`. It also configures container names in AppHost for clarity.
Updates the docker-compose deployment documentation, providing
clarified build steps, parameter explanations, and configuration
instructions for a smoother user experience.

Removes compose wait from apphost as it doesn't work.

Allows overriding RequireHttpsMetadata via configuration for
development/docker scenarios
fboucher and others added 11 commits February 17, 2026 06:59
Updates the .NET version badge in README.md to 10.0.
Fixes a typo in the Keycloak authentication setup documentation link in README.md.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
rollback to raw httpclient to keep the domains features

This change includes:
- Addition of Reka.SDK package.
- Updates the ResearchService to use Reka's API for search.
- Configures the DI in the blazor app to use the http client.
- Adds .gitignore entry to ignore the Data folder.

The motivation is to leverage Reka's AI models for improved research capabilities within the NoteBookmark application.
quickfix: refact Research service rollback to raw httpclient
Reorganizes the Docker Compose configuration into modular stacks for Keycloak and the application. This change updates the environment variable templates and provides new, detailed documentation for local container setup and realm configuration.
Refactors Docker Compose and updates deployment guides
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Code Coverage

Package Line Rate Branch Rate Health
NoteBookmark.Domain 5% 9%
NoteBookmark.AIServices 97% 64%
NoteBookmark.Domain 83% 72%
NoteBookmark.ServiceDefaults 96% 75%
NoteBookmark.Api 81% 64%
NoteBookmark.Domain 5% 9%
NoteBookmark.AIServices 97% 64%
NoteBookmark.Domain 83% 72%
NoteBookmark.ServiceDefaults 96% 75%
NoteBookmark.Api 81% 64%
Summary 60% (1492 / 2178) 43% (310 / 568)

@fboucher fboucher merged commit 069c21d into main Mar 9, 2026
3 checks passed
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