Feat cern mattermost support#526
Draft
hassan11196 wants to merge 4 commits intoarchi-physics:mainfrom
Draft
Conversation
…role-based access
… including role-based access control and SSO authentication
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.
Mattermost RBAC Authentication
Summary
(
token_store: config) and an SSO-backed DB mode (token_store: db) whereroles are pulled from CERN JWT tokens and stored in PostgreSQL
ContextVar-based user context (MattermostUserContext) propagatesMattermost user identity through the full call stack, including into agent
tool permission checks — no Flask session required
(
/mattermost-auth+/mattermost-auth/callback), keepingapp.pyunchangedre-login only required after session expiry (default 30 days)
mattermost:accesspermission gates Mattermost bot access independentlyof
chat:query, sobase-user(web chat) and Mattermost access can becontrolled separately
RemoteCatalogClient.__init__was missingretry_attemptsandretry_backoff_secondsparameters andimport timeFiles changed
src/utils/rbac/mattermost_context.pyContextVar-based per-request user contextsrc/utils/mattermost_auth.pyMattermostAuthManager: config mode and db modesrc/utils/mattermost_token_service.pysrc/interfaces/mattermost.pysrc/archi/pipelines/agents/tools/base.pysrc/utils/rbac/permission_enum.pyPermission.Mattermost.ACCESSsrc/cli/templates/init.sqlmattermost_tokenstablesrc/cli/templates/base-config.yamlservices.mattermost.authconfig blocksrc/archi/pipelines/agents/tools/local_files.pyimport timedocs/docs/services.md