Skip to content

feat(oauth2): add image URL support for OAuth2 clients#628

Merged
pando85 merged 2 commits intomasterfrom
feat/567-oauth2-image-support
Feb 17, 2026
Merged

feat(oauth2): add image URL support for OAuth2 clients#628
pando85 merged 2 commits intomasterfrom
feat/567-oauth2-image-support

Conversation

@forkline-bot
Copy link

@forkline-bot forkline-bot bot commented Feb 16, 2026

Summary

  • Add image field to KanidmOAuth2ClientSpec with URL configuration
  • Add OAuth2ClientImageStatus for caching image metadata (ETag, hash, size)
  • Add image.rs module with download and validation logic
  • Add image reconciliation with change detection via HEAD requests
  • Support content types: png, jpg, gif, svg, webp
  • Enforce max size of 256KB

Implementation Details

  • Uses HEAD requests for efficient change detection (ETag, Last-Modified, Content-Length)
  • Only downloads images when changes are detected
  • Stores image metadata in status to survive operator restarts
  • Surfaces HTTP errors via Kubernetes Events

Resolves: #567

Allow configuring an image URL for OAuth2 clients that will be
downloaded and set in Kanidm for display in the application portal.

- Add  field to KanidmOAuth2ClientSpec with URL configuration
- Add OAuth2ClientImageStatus for caching image metadata (ETag, hash)
- Add image.rs module with download and validation logic
- Add image reconciliation with change detection via HEAD requests
- Support content types: png, jpg, gif, svg, webp
- Enforce max size of 256KB

Resolves: #567
@pando85
Copy link
Owner

pando85 commented Feb 16, 2026

@forkline fix fmt and clippy

@forkline-bot
Copy link
Author

forkline-bot bot commented Feb 16, 2026

Fixed formatting issues in libs/oauth2/src/image.rs, libs/oauth2/src/reconcile/mod.rs, and libs/oauth2/src/reconcile/status.rs. Both cargo fmt and cargo clippy now pass. Pushed commit 92ec2e9 to branch feat/567-oauth2-image-support.

@pando85
Copy link
Owner

pando85 commented Feb 16, 2026

@forkline fix previous commit. Follow commit lint. It has to start with uppercase the title after the tag

Repository owner deleted a comment from forkline-bot bot Feb 17, 2026
@pando85
Copy link
Owner

pando85 commented Feb 17, 2026

@forkline fix previous commit. Follow commit lint. It has to start with uppercase the title after the tag

@forkline-bot forkline-bot bot force-pushed the feat/567-oauth2-image-support branch from 92ec2e9 to ddacf65 Compare February 17, 2026 12:26
@forkline-bot
Copy link
Author

forkline-bot bot commented Feb 17, 2026

Fixed. Commit message amended to fix: Apply cargo fmt to oauth2 image support code and pushed to feat/567-oauth2-image-support.

@pando85 pando85 enabled auto-merge (rebase) February 17, 2026 12:29
@pando85 pando85 merged commit 3bce9cf into master Feb 17, 2026
11 checks passed
@pando85 pando85 deleted the feat/567-oauth2-image-support branch February 17, 2026 12:46
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.

feat: allow setting of images (via url)

1 participant