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:

  • anthropicComplianceIntegrationUpdate takes either a new apiKey (verified with Anthropic before it is saved) or enabled to turn syncing on or off. Re-enabling without a new key checks the stored key again.
  • anthropicComplianceIntegrationDelete removes 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_FOUND error reason and audit events for both actions.

Two small related changes:

  • The Group.anthropicComplianceIntegration field description now says it also returns null when the user cannot read the integration, matching orbitAccess.
  • 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

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.rb

MR 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

Merge request reports

Loading
Loading