Skip to content

enh: Require API-Key for webDAV API - #1393

Merged
marcelklehr merged 3 commits into
mainfrom
enh/ai-safety-api-key
Sep 25, 2025
Merged

enh: Require API-Key for webDAV API#1393
marcelklehr merged 3 commits into
mainfrom
enh/ai-safety-api-key

Conversation

@marcelklehr

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr
marcelklehr requested a review from Copilot September 25, 2025 09:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the security of the webDAV API by requiring API key authentication for recognize-related endpoints. The implementation adds a new API key management system and enforces validation through the webDAV plugin system.

  • Adds API key generation and validation functionality through a new ApiKeyManager class
  • Implements API key authentication in the webDAV PropFindPlugin with timeout-based expiration
  • Moves plugin registration from XML configuration to runtime registration for proper hook timing

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
psalm-baseline.xml Updates static analysis baseline to handle new dependencies and class references
lib/Public/ApiKeyManager.php New class for generating encrypted API keys with timestamp validation
lib/Dav/Faces/PropFindPlugin.php Enhanced with API key validation logic and beforeMethod hook for authentication
lib/AppInfo/Application.php Moves plugin registration to runtime event listener for proper initialization timing
appinfo/info.xml Removes XML-based plugin registration in favor of runtime registration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread lib/Dav/Faces/PropFindPlugin.php Outdated
Comment thread lib/Dav/Faces/PropFindPlugin.php
Comment thread lib/AppInfo/Application.php Outdated
marcelklehr and others added 2 commits September 25, 2025 12:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Comment thread lib/Public/ApiKeyManager.php
@marcelklehr
marcelklehr merged commit 92afc36 into main Sep 25, 2025
45 of 46 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.

3 participants