Loading
Add GraphQL update and delete mutations for the Anthropic Compliance integration
What does this MR do and why?
Adds GraphQL mutations to update and delete the Anthropic Compliance integration of a top-level group, behind the claude_code_compliance_api_ingestion feature flag:
anthropicComplianceIntegrationUpdatetakes either a newapiKey(verified with Anthropic before it is saved) orenabledto turn syncing on or off. Re-enabling without a new key checks the stored key again.anthropicComplianceIntegrationDeleteremoves the integration and its transcript walk state. Ingested sessions are kept.- Owner only. Checking a key with Anthropic uses the same rate limits as create. Adds the
NOT_FOUNDerror reason and audit events for both actions.
Two small related changes:
- The
Group.anthropicComplianceIntegrationfield description now says it also returnsnullwhen the user cannot read the integration, matchingorbitAccess. - GraphQL variable logging now filters
apiKey. The case-sensitive/key$/filter does not match the camelCase variable used by the create and update mutations.
References
- Builds on !264339 (merged) (merged)
- https://gitlab.com/gitlab-org/gitlab/-/work_items/628487
Screenshots or screen recordings
Not a UI change.
How to set up and validate locally
bundle exec rspec \
ee/spec/requests/api/graphql/mutations/ai/compliance/anthropic/integrations/update_spec.rb \
ee/spec/requests/api/graphql/mutations/ai/compliance/anthropic/integrations/delete_spec.rb \
spec/lib/gitlab/graphql/query_analyzers/ast/logger_analyzer_spec.rbMR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Hitesh Raghuvanshi