Skip to content

feat: add local caching for remote IdP logos#942

Open
Menrath wants to merge 1 commit intocatalyst:MOODLE_500_STABLEfrom
Menrath:cache_idp_logos
Open

feat: add local caching for remote IdP logos#942
Menrath wants to merge 1 commit intocatalyst:MOODLE_500_STABLEfrom
Menrath:cache_idp_logos

Conversation

@Menrath
Copy link
Copy Markdown

@Menrath Menrath commented Feb 16, 2026

Summary

  • Store IdP logos/icons in a local plugin filearea (idplogo), with itemid matching the auth_saml2_idps.id.
  • Generate deterministic filenames by hashing the source URL (preserving extension).
  • Provide helper methods to cache, retrieve, and delete cached logos.

Why

  • Avoid loading third‑party resources at runtime and prevent outbound requests on page render.
  • Improve privacy and compliance: serving assets locally helps meet GDPR expectations by avoiding unsolicited requests to external hosts and potential user tracking.

Tests

Are still missing. ToDo.

Notes

  • No database schema changes.
  • Existing IdPs without a logo continue to work.
  • Remote network access only occurs during upgrade or metadata refresh tasks, never during normal page rendering.

@Menrath
Copy link
Copy Markdown
Author

Menrath commented Feb 16, 2026

I consider this PR to be ready for review. I offer to write tests, after a first round of feedback.

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.

1 participant