OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
6.45k stars 947 forks source link

Taxii sharing: it's not possible anymore to select authorized user/group allowed #9106

Open aHenryJard opened 1 day ago

aHenryJard commented 1 day ago

Description

Trying to update the list "Accessible for" in Taxii collection sharing fails.

Environment

  1. OS (where OpenCTI server runs): Testing
  2. OpenCTI version: 6.4.0
  3. OpenCTI client: { e.g. frontend or python }
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Go on Data > Sharing > Taxii collection
  2. Update one that is not public
  3. Add a user to share with

Expected Output

Works fine

Actual Output

Error and update not saved.

Additional information

{
  "category": "APP",
  "errors": [
    {
      "attributes": {
        "field": "authorized_members",
        "genre": "BUSINESS",
        "http_status": 500
      },
      "message": "You cannot update incompatible attribute",
      "name": "VALIDATION_ERROR",
      "stack": "GraphQLError: You cannot update incompatible attribute\n    at error (/opt/opencti/build/src/config/errors.js:7:10)\n    at ValidationError (/opt/opencti/build/src/config/errors.js:129:58)\n    at validateInputUpdateFn (/opt/opencti/build/src/schema/schema-validator.ts:234:13)\n    at updateAttribute (/opt/opencti/build/src/database/middleware.js:2254:3)\n    at taxiiCollectionEditField (/opt/opencti/build/src/domain/taxii.js:66:23)"
    }
  ],
  "inner_relation_creation": 0,
  "level": "error",
  "message": "You cannot update incompatible attribute",
  "operation": "Unspecified",
  "operation_query": "mutation TaxiiCollectionEditionFieldPatchMutation($id:ID!$input:[EditInput]!){taxiiCollectionEdit(id:$id){fieldPatch(input:$input){...TaxiiCollectionEdition_taxiiCollection id}}}fragment TaxiiCollectionEdition_taxiiCollection on TaxiiCollection{id name description filters taxii_public include_inferences score_to_confidence authorized_members{id name}}",
  "size": 170,
  "source": "backend",
  "time": 79,
  "timestamp": "2024-11-21T10:13:02.694Z",
  "type": "WRITE_ERROR",
  "user": {
    "group_ids": [
      "49546dc0-0800-4979-87c7-93b8c369612e"
    ],
    "ip": "5.49.14.6",
    "organization_ids": [
      "ccebe5a8-3e48-4701-8761-bc87ae92100f"
    ],
    "socket": "query",
    "user_id": "d34f47a8-33c5-4691-a44c-8d5a357fa9c1",
    "user_metadata": {}
  },
  "variables": {
    "id": "44f3bc62-37cf-485d-bbe9-e4e077d3486b",
    "input": {
      "key": "authorized_members",
      "value": [
        "df3aab8c-4d8b-435b-9fa6-928301a253a4",
        "da357ee0-4740-4235-9323-537306fcb0c1"
      ]
    }
  },
  "version": "6.4.0"
}

Screenshots (optional)

Image