Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c8916a4
feat: Introduce service registration decorator and enhance ServiceMan…
ogabrielluiz Oct 3, 2025
c1b5458
feat: Implement VariableService for managing environment variables
ogabrielluiz Oct 3, 2025
8a66bbb
feat: Enhance LocalStorageService with Service integration and async …
ogabrielluiz Oct 3, 2025
e691cff
feat: Implement telemetry service with abstract base class and minima…
ogabrielluiz Oct 3, 2025
54fdff1
feat: Introduce BaseTracingService and implement minimal TracingService
ogabrielluiz Oct 3, 2025
9003c57
feat: Add unit tests for service registration decorators
ogabrielluiz Oct 3, 2025
ba46ad5
feat: Add comprehensive unit and integration tests for ServiceManager
ogabrielluiz Oct 3, 2025
c95db6e
feat: Add unit and integration tests for minimal service implementations
ogabrielluiz Oct 3, 2025
241a1c4
docs: Add detailed documentation for pluggable services architecture …
ogabrielluiz Oct 3, 2025
8561245
feat: Add example configuration file for Langflow services
ogabrielluiz Oct 3, 2025
83d0568
docs: Update PLUGGABLE_SERVICES.md to enhance architecture benefits s…
ogabrielluiz Oct 3, 2025
e881dc5
Merge branch 'main' into pluggable-service-layer
ogabrielluiz Oct 30, 2025
9f616f1
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 30, 2025
8a9e240
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Oct 30, 2025
edd8aae
[autofix.ci] apply automated fixes (attempt 3/3)
autofix-ci[bot] Oct 30, 2025
e090136
test(services): improve variable service teardown test with public AP…
ogabrielluiz Oct 30, 2025
2145851
docs(pluggable-service-layer): add docstrings for service manager and…
ogabrielluiz Oct 30, 2025
8d2ff27
feat(auth): implement abstract base class for authentication services…
ogabrielluiz Nov 24, 2025
5dc0f2a
refactor(auth): move authentication logic from utils to AuthService
ogabrielluiz Nov 24, 2025
4bdb1f6
refactor(auth): update authentication methods and remove settings_ser…
ogabrielluiz Nov 24, 2025
87a4c79
test(auth): add unit tests for AuthService and pluggable authentication
ogabrielluiz Nov 24, 2025
96e8e2b
fix(tests): update test cases to use AuthService and correct user ret…
ogabrielluiz Nov 24, 2025
1ff542a
docs(pluggable-services): add auth_service to ServiceType enum docume…
ogabrielluiz Nov 24, 2025
b5bacaa
[autofix.ci] apply automated fixes
autofix-ci[bot] Nov 24, 2025
596485e
fix(auth): Add missing type hints and abstract methods to AuthService…
Copilot Nov 25, 2025
4312143
[autofix.ci] apply automated fixes
autofix-ci[bot] Nov 25, 2025
fa935dc
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Nov 25, 2025
753a34d
fix(auth): refactor api_key_security method to accept optional databa…
ogabrielluiz Nov 27, 2025
606b537
feat(auth): enhance AuthServiceBase with detailed design principles a…
ogabrielluiz Nov 27, 2025
e33e9c6
Merge branch 'main' into pluggable-auth-service
ogabrielluiz Nov 27, 2025
c1c49a3
fix(auth): remove settings_service from encrypt/decrypt_api_key calls
ogabrielluiz Nov 27, 2025
bdd0e77
[autofix.ci] apply automated fixes
autofix-ci[bot] Nov 27, 2025
3418a59
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -755,16 +755,6 @@
"is_secret": false
}
],
"src/backend/base/langflow/inputs/input_mixin.py": [
{
"type": "Secret Keyword",
"filename": "src/backend/base/langflow/inputs/input_mixin.py",
"hashed_secret": "3442496b96dd01591a8cd44b1eec1368ab728aba",
"is_verified": false,
"line_number": 22,
"is_secret": false
}
],
"src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json": [
{
"type": "Hex High Entropy String",
Expand Down Expand Up @@ -881,6 +871,16 @@
"is_secret": false
}
],
"src/backend/base/langflow/inputs/input_mixin.py": [
{
"type": "Secret Keyword",
"filename": "src/backend/base/langflow/inputs/input_mixin.py",
"hashed_secret": "3442496b96dd01591a8cd44b1eec1368ab728aba",
"is_verified": false,
"line_number": 22,
"is_secret": false
}
],
"src/backend/base/langflow/schema/table.py": [
{
"type": "Secret Keyword",
Expand All @@ -897,7 +897,7 @@
"filename": "src/backend/base/langflow/services/auth/utils.py",
"hashed_secret": "b894b81be94cf8fa8d7536475aaec876addf05c8",
"is_verified": false,
"line_number": 28,
"line_number": 25,
"is_secret": false
}
],
Expand Down Expand Up @@ -1303,7 +1303,7 @@
"filename": "src/backend/tests/unit/test_setup_superuser.py",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 56,
"line_number": 60,
"is_secret": false
}
],
Expand Down Expand Up @@ -1528,5 +1528,5 @@
}
]
},
"generated_at": "2025-11-19T18:36:04Z"
"generated_at": "2025-11-27T20:39:39Z"
}
5 changes: 3 additions & 2 deletions src/backend/base/langflow/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
from langflow.cli.progress import create_langflow_progress
from langflow.initial_setup.setup import get_or_create_default_folder
from langflow.main import setup_app
from langflow.services.auth.utils import check_key, get_current_user_by_jwt
from langflow.services.auth.utils import get_current_user_from_access_token
from langflow.services.database.models.api_key.crud import check_key
from langflow.services.deps import get_db_service, get_settings_service, is_settings_service_initialized, session_scope
from langflow.services.utils import initialize_services
from langflow.utils.version import fetch_latest_version, get_version_info
Expand Down Expand Up @@ -736,7 +737,7 @@ async def _create_superuser(username: str, password: str, auth_token: str | None
# Try JWT first
user = None
try:
user = await get_current_user_by_jwt(auth_token, session)
user = await get_current_user_from_access_token(auth_token, session)
except (JWTError, HTTPException):
# Try API key
api_key_result = await check_key(session, auth_token)
Expand Down
2 changes: 1 addition & 1 deletion src/backend/base/langflow/api/v1/api_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def save_store_api_key(
api_key = api_key_request.api_key

# Encrypt the API key
encrypted = auth_utils.encrypt_api_key(api_key, settings_service=settings_service)
encrypted = auth_utils.encrypt_api_key(api_key)
current_user.store_api_key = encrypted
db.add(current_user)
await db.commit()
Expand Down
4 changes: 2 additions & 2 deletions src/backend/base/langflow/api/v1/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_user_store_api_key(user: CurrentActiveUser):
if not user.store_api_key:
raise HTTPException(status_code=400, detail="You must have a store API key set.")
try:
return auth_utils.decrypt_api_key(user.store_api_key, get_settings_service())
return auth_utils.decrypt_api_key(user.store_api_key)
except Exception as e:
raise HTTPException(status_code=500, detail="Failed to decrypt API key. Please set a new one.") from e

Expand All @@ -33,7 +33,7 @@ def get_optional_user_store_api_key(user: CurrentActiveUser):
if not user.store_api_key:
return None
try:
return auth_utils.decrypt_api_key(user.store_api_key, get_settings_service())
return auth_utils.decrypt_api_key(user.store_api_key)
except Exception: # noqa: BLE001
logger.exception("Failed to decrypt API key")
return user.store_api_key
Expand Down
Loading
Loading