-
Notifications
You must be signed in to change notification settings - Fork 10k
feat: SSO foundations, login seams, and remove OSS Admin Page #14276
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 all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
4b39cb9
feat: add enterprise feature flag and custom admin menu item
deon-sanchez 71fee19
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez a1c7b1b
feat(sso): implement multi-identity support for users and enhance SSO…
deon-sanchez 85d4d4d
feat(sso): enhance SSO identity management and secure client secret h…
deon-sanchez f3c127c
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez c08092a
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez 823d9fb
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez ccfabe1
feat(auth): refresh login and signup pages
deon-sanchez dd09fed
refactor(LoginPage): update layout and accessibility of login options…
deon-sanchez 804b311
feat(port): enhance port configuration by prioritizing LANGFLOW_PORT …
deon-sanchez 8fdcb06
feat(auth): introduce customizable login components and enhance authe…
deon-sanchez 8da998a
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez 9000c81
fix(alembic): resolve duplicate e8f1a2b3c4d5 revision after release m…
deon-sanchez 13e3d90
clean up
deon-sanchez 256cc7d
clean up 2
deon-sanchez e4d2f7f
fix superuser test
deon-sanchez b36efa0
fix a11y test
deon-sanchez ac5aeaa
codeRabbit fixes
deon-sanchez 660c74f
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez 29cb0c1
erics suggestions
deon-sanchez aa96368
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez 4c9193e
Implement SSO client secret migration and validation checks
deon-sanchez c27fcff
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez 992b9b2
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez 46558c8
fixed playwright tests
deon-sanchez e792d3e
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez d4a1401
fix migration
deon-sanchez 1c2c6de
fixed db migrations
deon-sanchez 8038c51
fix playwright tests
deon-sanchez ef6f5e0
Merge branch 'release-1.12.0' of https://github.com/langflow-ai/langf…
deon-sanchez 5f42a64
refactor: enhance accessibility and structure of login and signup pages
deon-sanchez c902a22
fix: address SSO review findings
erichare 01af799
fix: allow SSO expand schema drift
erichare 52f0022
fix: address SSO review follow-ups
erichare 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
Large diffs are not rendered by default.
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
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,109 @@ | ||
| """Autogenerate compatibility rules for active EXPAND migration windows.""" | ||
|
|
||
| from alembic.operations import ops | ||
|
|
||
| # ``sso_config`` is deliberately in an EXPAND window: released N-1 services | ||
| # still need the scalar columns, while N reads the typed JSON representation. | ||
| # Alembic therefore sees the retained DB-only columns and nullable typed columns | ||
| # as a future CONTRACT migration. Keep this list exact and remove it with that | ||
| # contract revision; rolling-compatibility migration tests assert that the | ||
| # temporary physical schema remains present and synchronized. | ||
| SSO_EXPAND_LEGACY_COLUMNS = frozenset( | ||
| { | ||
| "provider", | ||
| "provider_name", | ||
| "enforce_sso", | ||
| "client_id", | ||
| "discovery_url", | ||
| "redirect_uri", | ||
| "scopes", | ||
| "token_endpoint", | ||
| "authorization_endpoint", | ||
| "jwks_uri", | ||
| "issuer", | ||
| } | ||
| ) | ||
| SSO_EXPAND_NULLABLE_COLUMNS = frozenset({"slug", "display_name", "protocol", "provider_settings"}) | ||
| _REMOVE_COLUMN_DIFF_LENGTH = 4 | ||
| _MODIFY_NULLABLE_DIFF_LENGTH = 7 | ||
|
|
||
|
|
||
| def filter_sso_expand_diffs(diffs: list) -> list: | ||
| """Suppress only schema diffs intentionally deferred to SSO CONTRACT.""" | ||
| significant_diffs = [] | ||
| for diff in diffs: | ||
| # Alembic can group multiple alter-column operations in a nested list. | ||
| if isinstance(diff, list): | ||
| filtered_group = filter_sso_expand_diffs(diff) | ||
| if filtered_group: | ||
| significant_diffs.append(filtered_group) | ||
| continue | ||
| if not isinstance(diff, tuple): | ||
| significant_diffs.append(diff) | ||
| continue | ||
|
|
||
| if ( | ||
| len(diff) >= _REMOVE_COLUMN_DIFF_LENGTH | ||
| and diff[0] == "remove_column" | ||
| and diff[2] == "sso_config" | ||
| and getattr(diff[3], "name", None) in SSO_EXPAND_LEGACY_COLUMNS | ||
| ): | ||
| continue | ||
| if ( | ||
| len(diff) >= _MODIFY_NULLABLE_DIFF_LENGTH | ||
| and diff[0] == "modify_nullable" | ||
| and diff[2] == "sso_config" | ||
| and diff[3] in SSO_EXPAND_NULLABLE_COLUMNS | ||
| and diff[5] is True | ||
| and diff[6] is False | ||
| ): | ||
| continue | ||
| significant_diffs.append(diff) | ||
|
|
||
| return significant_diffs | ||
|
|
||
|
|
||
| def _filter_sso_expand_operations(container: ops.OpContainer) -> None: | ||
| filtered_operations = [] | ||
| for operation in container.ops: | ||
| if isinstance(operation, ops.OpContainer): | ||
| _filter_sso_expand_operations(operation) | ||
| if operation.ops: | ||
| filtered_operations.append(operation) | ||
| continue | ||
|
|
||
| if ( | ||
| isinstance(operation, ops.DropColumnOp) | ||
| and operation.table_name == "sso_config" | ||
| and operation.column_name in SSO_EXPAND_LEGACY_COLUMNS | ||
| ): | ||
| continue | ||
|
|
||
| if ( | ||
| isinstance(operation, ops.AlterColumnOp) | ||
| and operation.table_name == "sso_config" | ||
| and operation.column_name in SSO_EXPAND_NULLABLE_COLUMNS | ||
| and operation.existing_nullable is True | ||
| and operation.modify_nullable is False | ||
| ): | ||
| # Preserve any type/default/comment change Alembic grouped with the | ||
| # expected nullable diff so real schema drift remains visible. | ||
| operation.modify_nullable = None | ||
| if not operation.has_changes(): | ||
| continue | ||
|
|
||
| filtered_operations.append(operation) | ||
|
|
||
| container.ops[:] = filtered_operations | ||
|
|
||
|
|
||
| def filter_expand_revision_directives(_context, _revision, directives: list[ops.MigrationScript]) -> None: | ||
| """Apply active EXPAND allowlists to Alembic autogenerate/check output.""" | ||
| for directive in directives: | ||
| for upgrade_ops, downgrade_ops in zip( | ||
| directive.upgrade_ops_list, | ||
| directive.downgrade_ops_list, | ||
| strict=True, | ||
| ): | ||
| _filter_sso_expand_operations(upgrade_ops) | ||
| upgrade_ops.reverse_into(downgrade_ops) |
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.
Uh oh!
There was an error while loading. Please reload this page.