[Endpoints] [14/x] Add encryption availability endpoints#19176
[Endpoints] [14/x] Add encryption availability endpoints#19176BenWilson2 wants to merge 19 commits intomlflow:masterfrom
Conversation
0fa11df to
8f7ba58
Compare
|
Documentation preview for 6b6dc51 is available at: More info
|
5195e71 to
0f7cdfd
Compare
0f7cdfd to
f609398
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds encryption availability validation endpoints to enable secure API key management in the MLflow Gateway UI. When the encryption passphrase is not configured, the UI displays a setup guide instead of non-functional API key features. The changes include comprehensive test coverage for the cryptography utilities, entity models, and UI components.
- Adds encryption configuration validation endpoint to check if secrets management is properly configured
- Implements comprehensive cryptography utilities with envelope encryption using AES-256-GCM and PBKDF2
- Adds database models and entities for secrets, model definitions, endpoints, and bindings
- Implements UI components and pages for the Gateway feature with proper error handling
Reviewed changes
Copilot reviewed 108 out of 119 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/entities/test_gateway_endpoint.py |
Comprehensive tests for Gateway entity models including proto round-trip conversions |
tests/cli/test_cryptography.py |
Tests for KEK rotation CLI command with various scenarios and edge cases |
requirements/genai-requirements.yaml |
Adds litellm dependency configuration for Gateway features |
pyproject.toml |
Adds litellm<2,>=1.0.0 to genai extras |
pyproject.release.toml |
Mirrors litellm dependency addition for release configuration |
mlflow/utils/providers.py |
Provider configuration utilities using litellm for credential and capability management |
mlflow/utils/cryptography.py |
Core cryptography implementation with envelope encryption and key rotation |
mlflow/store/tracking/sqlalchemy_store.py |
Store implementations for secrets, model definitions, endpoints, and bindings |
mlflow/store/tracking/rest_store.py |
REST API client methods for Gateway features |
mlflow/store/tracking/dbmodels/models.py |
SQLAlchemy model conversions to MLflow entities |
mlflow/store/tracking/abstract_store.py |
Abstract store method signatures for Gateway features |
mlflow/store/tracking/_secret_cache.py |
Encrypted in-memory cache for decrypted secrets with forward secrecy |
mlflow/server/js/src/lang/default/en.json |
Internationalization strings for Gateway UI |
mlflow/server/js/src/gateway/utils/providerUtils.ts |
Provider grouping and formatting utilities |
mlflow/server/js/src/gateway/utils/dateUtils.ts |
Timestamp conversion utilities with unit detection |
mlflow/server/js/src/gateway/utils/dateUtils.test.ts |
Tests for timestamp conversion edge cases |
mlflow/server/js/src/gateway/types.ts |
TypeScript type definitions for Gateway API |
mlflow/server/js/src/gateway/routes.ts |
Route path definitions for Gateway pages |
mlflow/server/js/src/gateway/route-defs.ts |
Route configuration with lazy loading |
mlflow/server/js/src/gateway/pages/ModelDefinitionsPage.tsx |
Models list page with CRUD operations |
mlflow/server/js/src/gateway/pages/ModelDefinitionsPage.test.tsx |
Tests for models list page rendering |
mlflow/server/js/src/gateway/pages/ModelDefinitionDetailsPage.tsx |
Model details page with configuration display |
mlflow/server/js/src/gateway/pages/GatewayPage.tsx |
Endpoints list page |
mlflow/server/js/src/gateway/pages/GatewayLayout.tsx |
Layout with backend validation and setup guide |
mlflow/server/js/src/gateway/hooks/useUpdateSecretMutation.ts |
React hook for updating secrets |
mlflow/server/js/src/gateway/hooks/useUpdateModelDefinitionMutation.tsx |
React hook for updating model definitions |
mlflow/server/js/src/gateway/hooks/useSecretsQuery.ts |
React hook for fetching secrets list |
mlflow/server/js/src/gateway/hooks/useSecretsConfigQuery.ts |
React hook for checking secrets configuration |
mlflow/server/js/src/gateway/hooks/useSecretQuery.ts |
React hook for fetching single secret |
mlflow/server/js/src/gateway/hooks/useProvidersQuery.ts |
React hook for fetching provider list |
mlflow/server/js/src/gateway/hooks/useProviderConfigQuery.ts |
React hook for fetching provider configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3178cff to
686c531
Compare
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
f9a7399 to
8ece09e
Compare
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
8ece09e to
08d4627
Compare
| position: 'sticky', | ||
| top: 0, | ||
| alignSelf: 'flex-start', | ||
| [`@media (max-width: ${sidebarHideBreakpoint}px)`]: { |
There was a problem hiding this comment.
this should align with the breakpoints defined in LongFormSection / LongFormSummary and the create/edit pages
| * A layout component for long forms with an optional summary sidebar. | ||
| * The sidebar is flexible and hides on narrow screens to avoid clipping the form. | ||
| */ | ||
| export function LongFormLayout({ |
There was a problem hiding this comment.
where is this used? i don't see any references in code
| * Displays provider, model (with capabilities and connection/API key info). | ||
| * Connection is nested under Model since each model can have its own API key mapping. | ||
| */ | ||
| export const EndpointSummary = ({ |
There was a problem hiding this comment.
is this used anywhere?
| @@ -1,4 +1,4 @@ | |||
| import { useMutation, useQueryClient } from '@mlflow/mlflow/src/common/utils/reactQueryHooks'; | |||
There was a problem hiding this comment.
was it necessary to revert the changes here? i think the @mlflow/mlflow import pattern is better as it stays consistent even as we move files around.
daniellok-db
left a comment
There was a problem hiding this comment.
stamping to unblock
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
There was a problem hiding this comment.
@BenWilson2 Let's split the PR. This includes so many changes across different domains.
🥞 Stacked PR
Use this link to review incremental changes.
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
Adds:
How is this PR tested?
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.