Skip to content

Add API key expiration for DB users on Weaviate 1.41+ - #2249

Open
dirkkul wants to merge 2 commits into
mainfrom
user_ttl
Open

dirkkul wants to merge 2 commits into
mainfrom
user_ttl

Conversation

@dirkkul

@dirkkul dirkkul commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@dirkkul
dirkkul requested a review from a team as a code owner November 11, 2026 05:49
Copilot AI balanced review requested due to automatic review settings November 11, 2026 05:49

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

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.

🟢 Approval recommended

The API key expiration changes have no active review issues.

No open issues 🎉

What changed in this PR

Adds API key expiration management to the Python client’s DB user APIs for licensed Weaviate 1.41+ servers.

Changes:

  • Supports expiration during user creation and setting or removing expiration for existing users.
  • Exposes expiration timestamps in user responses and updates synchronous and asynchronous type signatures.
  • Adds integration coverage and configures CI to test against Weaviate 1.41 with optional license credentials.
File Description
weaviate/​util.py Adds the Weaviate 1.41 version guard.
weaviate/​users/​users.py Adds expiration fields to user models.
weaviate/​users/​sync.pyi Updates synchronous API signatures for expiration support.
weaviate/​users/​base.py Implements expiration requests, response parsing, and related documentation.
weaviate/​users/​async_.pyi Updates asynchronous API signatures for expiration support.
weaviate/​rbac/​models.py Types the expiration field in DB user responses.
integration/​test_users.py Tests expiration management, key rotation, and unsupported versions.
ci/​docker-compose-rbac.yml Passes the optional license key to the RBAC server.
.github/​workflows/​main.yaml Adds Weaviate 1.41 to integration testing and supplies license credentials.

Review effort: Balanced

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 42.98246% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.03%. Comparing base (635124c) to head (6b83a33).
⚠️ Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
integration/test_users.py 31.81% 60 Missing ⚠️
weaviate/users/base.py 75.00% 5 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2249      +/-   ##
==========================================
- Coverage   89.23%   89.03%   -0.21%     
==========================================
  Files         312      312              
  Lines       24715    24824     +109     
==========================================
+ Hits        22055    22102      +47     
- Misses       2660     2722      +62     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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