Repository navigation
fix(mcp): accept dotted SSO realm identifiers like example.com - #1419
Merged
Cam Kennedy (cjkenned) merged 1 commit intoOct 22, 2026
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792655670-mcp-sso-dotted-realms' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792655670-mcp-sso-dotted-realms'PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
Co-Authored-By: bot_apk <apk@cognition.ai>
devin-ai-integration
Bot
force-pushed
the
devin/1792655670-mcp-sso-dotted-realms
branch
from
October 22, 2026 07:58
034337d to
a379ba2
Compare
Contributor
Code coverage overviewLanguages: Python Python / code-coverage/pytest-no-creds
View coverage of the 10 most impacted files.
Python / code-coverage/pytest
View coverage of the 10 most impacted files.
Python / code-coverage/pytest-unit
Line coverage data for the main branch is not yet available. View coverage of the 10 most covered files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Subodh Chaturvedi (subodh1810)
marked this pull request as ready for review
October 22, 2026 08:03
Subodh Chaturvedi (subodh1810)
approved these changes
Oct 22, 2026
Cam Kennedy (cjkenned)
deleted the
devin/1792655670-mcp-sso-dotted-realms
branch
October 22, 2026 15:55
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The hosted MCP SSO login rejected valid Keycloak realm names that contain a dot (e.g. a realm named
example.com, whose/auth/realms/example.com/.well-known/openid-configurationexists while the undotted variant 404s). The Cloud webapp's SSO pages have no such restriction, so these orgs could sign in to Cloud via SSO but not to the hosted MCP.REALM_IDENTIFIER_PATTERNis used by bothvalidate_realm_identifier(login form) andSsoRealmRegistry.realm_from_issuer(tokeniss→ realm), so both rejected dotted realms. Before this change, validation raisedInvalidRealmIdentifierErrorandrealm_from_issuer(".../realms/example.com")returnedNone.Dots are allowed only between non-empty labels: no leading, trailing, or consecutive dots, so
./..can never form the path segment./,%,@, a leading_, and >63 chars are still rejected, so the identifier still stays inside the template's single path segment. The user-facing error text and docstring were updated to match. The login page has no client-sidepatternto update.Reviewer note: please sanity-check the relaxed regex from a security angle (the traversal/segment cases are covered in tests).
Resolves https://github.com/airbytehq/oncall/issues/13820:
Close on merge: no — customer-filed; support confirms the fix with the customer before closing.
Test Coverage
tests/unit_tests/test_mcp_sso_auth.py:example.com,acme.example,a.b-c_d.e, 63-char dotted value.acme,acme.,acme..example,.,..,../master, 64-char dotted value (existing traversal/percent/at cases kept)realm_from_issuer: dotted round-trip, plus/..,acme..example,acme.→Nonetest_registry_discovers_dotted_realm: discovery for a dotted realm end to end throughSsoRealmRegistryThe new cases failed against unfixed code (5 failed) and pass with the fix (115 passed in the file). Ruff and pyrefly are clean.
Declarative-First Evaluation
N/A — not a declarative connector; this is PyAirbyte MCP server code.
Requested by the
/ai-fixworkflow on the linked oncall issue.Link to Devin session: https://app.devin.ai/sessions/cdc6e6dde6b04b0daa0105707ef65ab9
Open in Devin Desktop: https://app.devin.ai/desktop/session/cdc6e6dde6b04b0daa0105707ef65ab9?variant=devin