-
Notifications
You must be signed in to change notification settings - Fork 8.2k
feat: adds authentication to mcp server under feature flag #9095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
80a9512
init auth forms
mfortman11 5cd24b3
Add iam endpoint
lucaseduoli 1e20c9e
Add radix radio
lucaseduoli a7d7ea7
Add radio group UI element
lucaseduoli 3594fe3
Add IAM endpoint to types
lucaseduoli 9b3723c
Add auth modal
lucaseduoli a7b0bdc
Remove auth from tools component
lucaseduoli 4a763b3
Add auth modal to mcp server tab
lucaseduoli 5013477
Add placeholders to fields
lucaseduoli 3534a9b
Add dynamic headers
lucaseduoli dbcda3e
changed authentication name
lucaseduoli d49132b
CHanged paddings
lucaseduoli 1d2852e
Added header and button under feature flag
lucaseduoli bcb9a98
[autofix.ci] apply automated fixes
autofix-ci[bot] 3b76b63
update api key form field
mfortman11 c512d3a
add credential handling and fix feature flag
mfortman11 a8e0018
Merge branch 'main' of github.com:langflow-ai/langflow into mcp-auth-…
mfortman11 b842775
Update autologin condition
mfortman11 b3e3648
design update
mfortman11 fd8471f
style updates
mfortman11 023ff9e
Merge branch 'main' of github.com:langflow-ai/langflow into mcp-auth-…
mfortman11 8811ef3
Merge branch 'main' into mcp-auth-forms
mfortman11 683547c
Merge branch 'main' into mcp-auth-forms
mfortman11 efd0462
ci details
mfortman11 baccb5f
Merge branch 'mcp-auth-forms' of github.com:langflow-ai/langflow into…
mfortman11 91e18e8
Merge branch 'main' into mcp-auth-forms
mfortman11 ca59a9c
revert ci logs
mfortman11 fadf684
test update, ff name update, and username + pass -> basic
mfortman11 c561086
restore ci
mfortman11 7487473
default fix
mfortman11 82ff903
added iam endpoint
lucaseduoli 4b8738d
add oauth
mfortman11 cb5bcf8
Merge branch 'mcp-auth-forms' of github.com:langflow-ai/langflow into…
mfortman11 0a75b6c
remove secretstr
mfortman11 9a847b4
updated backend test and schema
lucaseduoli 98056ff
updated test
lucaseduoli 51e8eff
updated test user can update
lucaseduoli 8e7b162
test fix
mfortman11 03d4455
Merge branch 'mcp-auth-forms' of github.com:langflow-ai/langflow into…
mfortman11 5eeb83c
Merge branch 'main' into mcp-auth-forms
mfortman11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
...kend/base/langflow/alembic/versions/3162e83e485f_add_auth_settings_to_folder_and_merge.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| """Add auth_settings column to folder table and merge migration branches. | ||
|
|
||
| Revision ID: 3162e83e485f | ||
| Revises: 0ae3a2674f32, d9a6ea21edcd | ||
| Create Date: 2025-01-16 13:00:00.000000 | ||
|
|
||
| """ | ||
|
|
||
| from collections.abc import Sequence | ||
|
|
||
| import sqlalchemy as sa | ||
| from alembic import op | ||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision: str = "3162e83e485f" | ||
| down_revision: str | Sequence[str] | None = ("0ae3a2674f32", "d9a6ea21edcd") | ||
| branch_labels: str | Sequence[str] | None = None | ||
| depends_on: str | Sequence[str] | None = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| """Add auth_settings column to folder table and merge migration branches.""" | ||
| conn = op.get_bind() | ||
| inspector = sa.inspect(conn) | ||
|
|
||
| # Check if folder table exists | ||
| table_names = inspector.get_table_names() | ||
| if "folder" not in table_names: | ||
| # If folder table doesn't exist, skip this migration | ||
| return | ||
|
|
||
| # Get current column names in folder table | ||
| column_names = [column["name"] for column in inspector.get_columns("folder")] | ||
|
|
||
| # Add auth_settings column to folder table if it doesn't exist | ||
| with op.batch_alter_table("folder", schema=None) as batch_op: | ||
| if "auth_settings" not in column_names: | ||
| batch_op.add_column(sa.Column("auth_settings", sa.JSON(), nullable=True)) | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| """Remove auth_settings column from folder table.""" | ||
| conn = op.get_bind() | ||
| inspector = sa.inspect(conn) | ||
|
|
||
| # Check if folder table exists | ||
| table_names = inspector.get_table_names() | ||
| if "folder" not in table_names: | ||
| # If folder table doesn't exist, skip this migration | ||
| return | ||
|
|
||
| # Get current column names in folder table | ||
| column_names = [column["name"] for column in inspector.get_columns("folder")] | ||
|
|
||
| # Remove auth_settings column from folder table if it exists | ||
| with op.batch_alter_table("folder", schema=None) as batch_op: | ||
| if "auth_settings" in column_names: | ||
| batch_op.drop_column("auth_settings") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import * as React from "react"; | ||
| import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; | ||
| import { CircleIcon } from "lucide-react"; | ||
| import { cn } from "@/utils/utils"; | ||
| function RadioGroup({ | ||
| className, | ||
| ...props | ||
| }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) { | ||
| return ( | ||
| <RadioGroupPrimitive.Root | ||
| data-slot="radio-group" | ||
| className={cn("grid gap-3", className)} | ||
| {...props} | ||
| /> | ||
| ); | ||
| } | ||
| function RadioGroupItem({ | ||
| className, | ||
| ...props | ||
| }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) { | ||
| return ( | ||
| <RadioGroupPrimitive.Item | ||
| data-slot="radio-group-item" | ||
| className={cn( | ||
| "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", | ||
| className | ||
| )} | ||
| {...props} | ||
| > | ||
| <RadioGroupPrimitive.Indicator | ||
| data-slot="radio-group-indicator" | ||
| className="relative flex items-center justify-center" | ||
| > | ||
| <CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" /> | ||
| </RadioGroupPrimitive.Indicator> | ||
| </RadioGroupPrimitive.Item> | ||
| ); | ||
| } | ||
| export { RadioGroup, RadioGroupItem }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add validation for auth_type field and secure password handling.
The
AuthSettingsmodel needs improvements:auth_typeonly accepts valid valuesSecretStrfor sensitive fieldsThis ensures type safety and prevents sensitive data from being accidentally logged or exposed in error messages.
📝 Committable suggestion
🤖 Prompt for AI Agents