feat: auto-sync permissions ACL for Jira and Confluence connectors#4619
Open
junaiddshaukat wants to merge 2 commits into
Open
feat: auto-sync permissions ACL for Jira and Confluence connectors#4619junaiddshaukat wants to merge 2 commits into
junaiddshaukat wants to merge 2 commits into
Conversation
Adds a third knowledge-source visibility mode (auto-sync-permissions) that extracts per-document ACL from Jira and Confluence during sync and enforces it at query time. Gated behind the knowledge-base enterprise license. Closes archestra-ai#3218
Contributor
Author
|
@joeyorlando have a look on this pr when you got time, thanks |
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
Adds a third knowledge-source visibility mode, Auto-sync permissions, that extracts per-document ACL from Jira and Confluence during sync and enforces it at query time via
query_knowledge_sources. Each document is filtered against the caller's identity (email) so users only see results they can already read upstream.KnowledgeSourceVisibilitySchemawithauto-sync-permissions(no DB migration — column istext).buildDocumentAccessControlListto deriveorg:*/user_email:<email>/group:<id>entries fromConnectorDocument.permissions.connector-synccomputes per-doc ACL when visibility is auto-sync, otherwise reuses the connector-wide ACL.refreshConnectorDocumentAccessControlListsskips auto-sync connectors so a visibility flip doesn't flatten per-document ACLs.extractPermissions?: booleanparam onConnector.sync.BaseConnector.buildDocumentPermissionsnormalizes/dedupes upstream user + group payloads so future connectors plug in without duplication./project/{key}/role/{id}. Emails resolved via/user/search?query=<displayName>because AtlassianCloud no longer returns emails from
accountId-based endpoints even when profile visibility is "Anyone"./restriction/byOperation/readwith fallback to space permissions. Email resolution via/api/user/bulkfirst, then/api/user.auto-sync-permissionsfor unsupported connector types and requireARCHESTRA_ENTERPRISE_LICENSE_KNOWLEDGE_BASE_ACTIVATED.platform-knowledge-connectors.mdcovering identity mapping, ACL sources per connector, group-sync limitation, and fail-closed behavior.Demo video
demo-1.mp4
The video shows three browser sessions (admin, user1, user2) running the same prompt against the same agent. Each user only sees results they can read upstream in Jira/Confluence:
knowledgeSource:adminbypass, sees every ticket and page.rhondachamb...) — added to DEMO project role only; sees Plan Q3 roadmap, Fix login bug, Architecture Review 2026, Ship feature X; gets no SECRET project results.billyroberts...) — added to SECRET project role only; sees Acquisition target ACME, Layoff plan, Confidential pricing; gets no DEMO results.Confluence space and page restrictions follow the same pattern. ACL refresh on every sync was verified by removing user1 from the DEMO Jira role, re-syncing, and re-running the user1 query — DEMO results disappeared within one sync cycle.
Closes #3218
/claim #3218