Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend] Organization sharing behavior change for upsert and enrichment #6101

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 60 additions & 60 deletions opencti-platform/opencti-graphql/config/schema/opencti.graphql

Large diffs are not rendered by default.

30 changes: 18 additions & 12 deletions opencti-platform/opencti-graphql/src/database/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ import {
RELATION_OBJECT_MARKING,
STIX_REF_RELATIONSHIP_TYPES
} from '../schema/stixRefRelationship';
import { ENTITY_TYPE_STATUS, ENTITY_TYPE_USER, isDatedInternalObject } from '../schema/internalObject';
import { ENTITY_TYPE_SETTINGS, ENTITY_TYPE_STATUS, ENTITY_TYPE_USER, isDatedInternalObject } from '../schema/internalObject';
import { isStixCoreObject, isStixObject } from '../schema/stixCoreObject';
import { isBasicRelationship, isStixRelationshipExceptRef } from '../schema/stixRelationship';
import {
Expand Down Expand Up @@ -183,7 +183,7 @@ import {
storeLoadById
} from './middleware-loader';
import { checkRelationConsistency, isRelationConsistent } from '../utils/modelConsistency';
import { getEntitiesListFromCache } from './cache';
import { getEntitiesListFromCache, getEntityFromCache } from './cache';
import { ACTION_TYPE_SHARE, ACTION_TYPE_UNSHARE, createListTask } from '../domain/backgroundTask-common';
import { ENTITY_TYPE_VOCABULARY, vocabularyDefinitions } from '../modules/vocabulary/vocabulary-types';
import { getVocabulariesCategories, getVocabularyCategoryForField, isEntityFieldAnOpenVocabulary, updateElasticVocabularyValue } from '../modules/vocabulary/vocabulary-utils';
Expand Down Expand Up @@ -1686,6 +1686,7 @@ const updateAttributeRaw = async (context, user, instance, inputs, opts = {}) =>
export const updateAttributeMetaResolved = async (context, user, initial, inputs, opts = {}) => {
const { locks = [], impactStandardId = true } = opts;
const updates = Array.isArray(inputs) ? inputs : [inputs];
const settings = await getEntityFromCache(context, SYSTEM_USER, ENTITY_TYPE_SETTINGS);
// Region - Pre-Check
const elementsByKey = R.groupBy((e) => e.key, updates);
const multiOperationKeys = Object.values(elementsByKey).filter((n) => n.length > 1);
Expand Down Expand Up @@ -1871,7 +1872,9 @@ export const updateAttributeMetaResolved = async (context, user, initial, inputs
}
} else {
// Special access check for RELATION_GRANTED_TO meta
if (relType === RELATION_GRANTED_TO && !isUserHasCapability(user, KNOWLEDGE_ORGANIZATION_RESTRICT)) {
// If not supported, update must be rejected
const isUserCanManipulateGrantedRefs = isUserHasCapability(user, KNOWLEDGE_ORGANIZATION_RESTRICT) && isNotEmptyField(settings.enterprise_edition);
if (relType === RELATION_GRANTED_TO && !isUserCanManipulateGrantedRefs) {
throw ForbiddenAccess();
}
let { value: refs, operation = UPDATE_OPERATION_REPLACE } = meta[metaIndex];
Expand Down Expand Up @@ -2350,6 +2353,7 @@ const buildRelationDeduplicationFilters = (input) => {

const upsertElement = async (context, user, element, type, basePatch, opts = {}) => {
// -- Independent update
const settings = await getEntityFromCache(context, SYSTEM_USER, ENTITY_TYPE_SETTINGS);
const updatePatch = { ...basePatch };
// Handle attributes updates
if (isNotEmptyField(basePatch.stix_id) || isNotEmptyField(basePatch.x_opencti_stix_ids)) {
Expand All @@ -2376,7 +2380,6 @@ const upsertElement = async (context, user, element, type, basePatch, opts = {})
updatePatch.number_observed = element.number_observed + updatePatch.number_observed;
}
}

if (type === ENTITY_TYPE_INDICATOR) {
if (updatePatch.decay_applied_rule && updatePatch.decay_base_score === element.decay_base_score) {
logApp.debug('UPSERT INDICATOR -- no decay reset because no score change', { element, basePatch });
Expand All @@ -2389,7 +2392,6 @@ const upsertElement = async (context, user, element, type, basePatch, opts = {})
logApp.debug('UPSERT INDICATOR -- Decay is reset', { element, basePatch });
}
}

// Upsert relations with times extensions
if (isStixCoreRelationship(type)) {
const { date: cStartTime } = computeExtendedDateValues(updatePatch.start_time, element.start_time, ALIGN_OLDEST);
Expand All @@ -2416,13 +2418,11 @@ const upsertElement = async (context, user, element, type, basePatch, opts = {})
const fileImpact = { key: 'x_opencti_files', value: [...(element.x_opencti_files ?? []), convertedFile] };
inputs.push(fileImpact);
}

// region confidence control / upsert
const { confidenceLevelToApply, isConfidenceMatch } = controlUpsertInputWithUserConfidence(user, updatePatch, element);
updatePatch.confidence = confidenceLevelToApply;
// note that if the existing data has no confidence (null) it will still be updated below, even if isConfidenceMatch = false
// endregion

// -- Upsert attributes
const attributes = Array.from(schemaAttributesDefinition.getAttributes(type).values());
for (let attrIndex = 0; attrIndex < attributes.length; attrIndex += 1) {
Expand Down Expand Up @@ -2455,19 +2455,22 @@ const upsertElement = async (context, user, element, type, basePatch, opts = {})
if (isInputAvailable) {
const patchInputData = updatePatch[inputField];
const isInputWithData = isNotEmptyField(patchInputData);
const isUpsertSynchro = (context.synchronizedUpsert || inputField === INPUT_GRANTED_REFS); // Granted Refs are always fully sync
const isUpsertSynchro = context.synchronizedUpsert;
if (relDef.multiple) {
const currentData = element[relDef.databaseName] ?? [];
const isCurrentWithData = isNotEmptyField(currentData);
const targetData = (patchInputData ?? []).map((n) => n.internal_id);
// Specific case for organization restriction, has EE must be activated.
// If not supported, upsert of organization is not applied
const isUserCanManipulateGrantedRefs = isUserHasCapability(user, KNOWLEDGE_ORGANIZATION_RESTRICT) && isNotEmptyField(settings.enterprise_edition);
const allowedOperation = relDef.databaseName !== RELATION_GRANTED_TO || (relDef.databaseName === RELATION_GRANTED_TO && isUserCanManipulateGrantedRefs);
// If expected data is different from current data
if (R.symmetricDifference(currentData, targetData).length > 0) {
if (allowedOperation && R.symmetricDifference(currentData, targetData).length > 0) {
const diffTargets = (patchInputData ?? []).filter((target) => !currentData.includes(target.internal_id));
// In full synchro, just replace everything
if (isUpsertSynchro) {
inputs.push({ key: inputField, value: patchInputData ?? [], operation: UPDATE_OPERATION_REPLACE });
} else if (
(isCurrentWithData && isInputWithData && diffTargets.length > 0 && isConfidenceMatch)
} else if ((isCurrentWithData && isInputWithData && diffTargets.length > 0 && isConfidenceMatch)
|| (isInputWithData && !isCurrentWithData)
) {
// If data is provided, different from existing data, and of higher confidence
Expand Down Expand Up @@ -2674,6 +2677,7 @@ export const createRelationRaw = async (context, user, rawInput, opts = {}) => {
const entitySetting = await getEntitySettingFromCache(context, relationshipType);
const filledInput = fillDefaultValues(user, input, entitySetting);
await validateEntityAndRelationCreation(context, user, filledInput, relationshipType, entitySetting, opts);

// We need to check existing dependencies
const resolvedInput = await inputResolveRefs(context, user, filledInput, relationshipType, entitySetting);
const { from, to } = resolvedInput;
Expand All @@ -2687,6 +2691,7 @@ export const createRelationRaw = async (context, user, rawInput, opts = {}) => {
if (!validateUserAccessOperation(user, from, 'edit') || !validateUserAccessOperation(user, to, 'edit')) {
throw ForbiddenAccess();
}

// Check consistency
await checkRelationConsistency(context, user, relationshipType, from, to);
// In some case from and to can be resolved to the same element (because of automatic merging)
Expand All @@ -2708,6 +2713,7 @@ export const createRelationRaw = async (context, user, rawInput, opts = {}) => {
throw UnsupportedError('Cant add another relation on single ref', errorData);
}
}

// Build lock ids
const inputIds = getInputIds(relationshipType, resolvedInput, fromRule);
if (isImpactedTypeAndSide(relationshipType, ROLE_FROM)) inputIds.push(from.internal_id);
Expand Down Expand Up @@ -3183,7 +3189,7 @@ export const createEntity = async (context, user, input, type, opts = {}) => {
const data = await createEntityRaw(context, user, input, type, opts);
// In case of creation, start an enrichment
if (data.isCreation) {
await createEntityAutoEnrichment(context, user, data.element.standard_id, type);
await createEntityAutoEnrichment(context, user, data.element, type);
}
return isCompleteResult ? data : data.element;
};
Expand Down
12 changes: 8 additions & 4 deletions opencti-platform/opencti-graphql/src/domain/enrichment.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
import { connectorsEnrichment } from '../database/repository';
import { ENTITY_TYPE_CONNECTOR } from '../schema/internalObject';
import { getEntitiesListFromCache } from '../database/cache';
import { CONNECTOR_INTERNAL_ENRICHMENT } from '../schema/general';

export const createEntityAutoEnrichment = async (context, user, stixCoreObjectId, scope) => {
export const createEntityAutoEnrichment = async (context, user, element, scope) => {
const elementStandardId = element.standard_id;
// Get the list of compatible connectors
const connectors = await getEntitiesListFromCache(context, user, ENTITY_TYPE_CONNECTOR);
const targetConnectors = connectorsEnrichment(connectors, scope, true, true);
// Create a work for each connector
const workList = await Promise.all(
map((connector) => {
return createWork(context, user, connector, `Enrichment (${stixCoreObjectId})`, stixCoreObjectId).then((work) => {
return createWork(context, user, connector, `Enrichment (${elementStandardId})`, elementStandardId).then((work) => {

Check warning on line 18 in opencti-platform/opencti-graphql/src/domain/enrichment.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/enrichment.js#L18

Added line #L18 was not covered by tests
return { connector, work };
});
}, targetConnectors)
Expand All @@ -25,10 +27,12 @@
const message = {
internal: {
work_id: work.id, // Related action for history
applicant_id: null, // User asking for the import
applicant_id: null, // No specific user asking for the import

Check warning on line 30 in opencti-platform/opencti-graphql/src/domain/enrichment.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/enrichment.js#L30

Added line #L30 was not covered by tests
},
event: {
entity_id: stixCoreObjectId,
event_type: CONNECTOR_INTERNAL_ENRICHMENT,
entity_id: elementStandardId,
entity_type: element.entity_type,

Check warning on line 35 in opencti-platform/opencti-graphql/src/domain/enrichment.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/enrichment.js#L33-L35

Added lines #L33 - L35 were not covered by tests
},
};
return pushToConnector(connector.internal_id, message);
Expand Down
3 changes: 3 additions & 0 deletions opencti-platform/opencti-graphql/src/domain/stix.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
ABSTRACT_STIX_DOMAIN_OBJECT,
ABSTRACT_STIX_OBJECT,
ABSTRACT_STIX_RELATIONSHIP,
CONNECTOR_INTERNAL_EXPORT_FILE,
INPUT_GRANTED_REFS
} from '../schema/general';
import { UPDATE_OPERATION_ADD, UPDATE_OPERATION_REMOVE } from '../database/utils';
Expand Down Expand Up @@ -74,6 +75,7 @@
return {
internal,
event: {
event_type: CONNECTOR_INTERNAL_EXPORT_FILE,

Check warning on line 78 in opencti-platform/opencti-graphql/src/domain/stix.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/stix.js#L78

Added line #L78 was not covered by tests
export_scope: 'selection', // query or selection or single
file_name: fileName, // Export expected file name
selected_ids: selectedIds, // ids that are both selected via checkboxes and respect the filtering
Expand Down Expand Up @@ -135,6 +137,7 @@
applicant_id: user.id, // User asking for the import
},
event: {
event_type: CONNECTOR_INTERNAL_EXPORT_FILE,

Check warning on line 140 in opencti-platform/opencti-graphql/src/domain/stix.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/stix.js#L140

Added line #L140 was not covered by tests
file_name: fileName, // Export expected file name
...baseEvent
},
Expand Down
10 changes: 8 additions & 2 deletions opencti-platform/opencti-graphql/src/domain/stixCoreObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
ABSTRACT_STIX_CORE_OBJECT,
ABSTRACT_STIX_DOMAIN_OBJECT,
buildRefRelationKey,
CONNECTOR_INTERNAL_ENRICHMENT,
ENTITY_TYPE_CONTAINER,
INPUT_EXTERNAL_REFS,
REL_INDEX_PREFIX,
REL_INDEX_PREFIX
} from '../schema/general';
import { RELATION_CREATED_BY, RELATION_EXTERNAL_REFERENCE, RELATION_OBJECT, RELATION_OBJECT_MARKING } from '../schema/stixRefRelationship';
import {
Expand Down Expand Up @@ -190,10 +191,12 @@
const message = {
internal: {
work_id: work.id, // Related action for history
applicant_id: user.id, // User asking for the import
applicant_id: null, // No specific user asking for the import

Check warning on line 194 in opencti-platform/opencti-graphql/src/domain/stixCoreObject.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/stixCoreObject.js#L194

Added line #L194 was not covered by tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we set the applicant_id to the connector user id if we want the enrichment update to have the connector as the creator?

},
event: {
event_type: CONNECTOR_INTERNAL_ENRICHMENT,

Check warning on line 197 in opencti-platform/opencti-graphql/src/domain/stixCoreObject.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/stixCoreObject.js#L197

Added line #L197 was not covered by tests
entity_id: element.standard_id,
entity_type: element.entity_type,

Check warning on line 199 in opencti-platform/opencti-graphql/src/domain/stixCoreObject.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/stixCoreObject.js#L199

Added line #L199 was not covered by tests
},
};
await pushToConnector(connector.internal_id, message);
Expand Down Expand Up @@ -444,6 +447,9 @@
}
// Get the context
const baseDocument = await documentFindById(context, user, fileId);
if (!baseDocument) {
throw UnsupportedError('File removed or inaccessible', { fileId });
}

Check warning on line 452 in opencti-platform/opencti-graphql/src/domain/stixCoreObject.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/domain/stixCoreObject.js#L450-L452

Added lines #L450 - L452 were not covered by tests
const entityId = baseDocument.metaData.entity_id;
const externalReferenceId = baseDocument.metaData.external_reference_id;
const previous = await storeLoadByIdWithRefs(context, user, entityId);
Expand Down
23 changes: 19 additions & 4 deletions opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
READ_INDEX_STIX_SIGHTING_RELATIONSHIPS,
READ_STIX_INDICES,
} from '../database/utils';
import { BYPASS, computeUserMemberAccessIds, executionContext, isUserCanAccessStixElement, isUserHasCapability, SYSTEM_USER } from '../utils/access';
import {
BYPASS,
computeUserMemberAccessIds,
executionContext,
isUserCanAccessStixElement,
isUserHasCapability,
KNOWLEDGE_ORGANIZATION_RESTRICT,
SYSTEM_USER
} from '../utils/access';

Check warning on line 35 in opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js#L27-L35

Added lines #L27 - L35 were not covered by tests
import { FROM_START_STR, utcDate } from '../utils/format';
import { stixRefsExtractor } from '../schema/stixEmbeddedRelationship';
import { ABSTRACT_STIX_CORE_RELATIONSHIP, buildRefRelationKey, ENTITY_TYPE_CONTAINER, STIX_TYPE_RELATION, STIX_TYPE_SIGHTING } from '../schema/general';
Expand Down Expand Up @@ -237,7 +245,7 @@
},
setLastEventId: (id) => { lastEventId = id; },
connected: () => !req.finished,
sendEvent: (eventId, topic, data) => {
sendEvent: (eventId, topic, event) => {

Check warning on line 248 in opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js#L248

Added line #L248 was not covered by tests
if (req.finished) {
// Write on an already terminated response
return;
Expand All @@ -250,9 +258,16 @@
if (topic) {
message += `event: ${topic}\n`;
}
if (data) {
if (event) {

Check warning on line 261 in opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js#L261

Added line #L261 was not covered by tests
message += 'data: ';
message += JSON.stringify(data);
const isDataTopic = eventId && topic !== 'heartbeat';
if (isDataTopic && req.user && !isUserHasCapability(req.user, KNOWLEDGE_ORGANIZATION_RESTRICT)) {
const filtered = { ...event };
delete filtered.data.extensions[STIX_EXT_OCTI].granted_refs;
message += JSON.stringify(filtered);
} else {
message += JSON.stringify(event);
}

Check warning on line 270 in opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/graphql/sseMiddleware.js#L263-L270

Added lines #L263 - L270 were not covered by tests
message += '\n';
}
message += '\n';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
}
if (action.event_scope === 'enrich') {
const { entity_name, connector_name } = action.context_data;
const message = `asks for \`${connector_name}\` enrichment in \`${entity_name}\``;
const message = `asks for \`${entity_name}\` enrichment with connector \`${connector_name}\``;

Check warning on line 197 in opencti-platform/opencti-graphql/src/manager/activityListener.ts

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/manager/activityListener.ts#L197

Added line #L197 was not covered by tests
await activityLogger(action, message);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type AdministrativeArea implements BasicObject & StixCoreObject & StixDomainObje
createdBy: Identity
numberOfConnectedElement: Int!
objectMarking: [MarkingDefinition!]
objectOrganization: [Organization!] @auth(for: [KNOWLEDGE_KNUPDATE_KNORGARESTRICT])
objectOrganization: [Organization!]
objectLabel: [Label!]
externalReferences(first: Int): ExternalReferenceConnection
containersNumber: Number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const HistoryDefinition: AttributeDefinition[] = [
{ name: 'message', label: 'Message', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: true },
{ name: 'commit', label: 'Commit', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: true },
{ name: 'element_id', label: 'Element ID', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: true },
{ name: 'entity_id', label: 'Entity ID', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: true },
{ name: 'entity_type', label: 'Entity type', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: true },
{ name: 'path', label: 'Path', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: true },
{ name: 'format', label: 'Format', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: true },
Expand All @@ -114,6 +115,7 @@ const HistoryDefinition: AttributeDefinition[] = [
{ name: 'connector_name', label: 'Connector name', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: true },
{ name: 'marking_definition_ids', label: 'Marking definition', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: true, upsert: true, isFilterable: false },
{ name: 'object_marking_refs_ids', label: 'Marking definition', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: true, upsert: true, isFilterable: false },
{ name: 'connector_id', label: 'Source connector', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: false },
{ name: 'from_id', label: 'Source entity', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: false },
{ name: 'to_id', label: 'Target entity', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: false },
{ name: 'created_by_id', label: 'Created by', type: 'string', format: 'short', editDefault: false, mandatoryType: 'no', multiple: false, upsert: true, isFilterable: false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type CaseIncident implements BasicObject & StixObject & StixCoreObject & StixDom
createdBy: Identity
numberOfConnectedElement: Int!
objectMarking: [MarkingDefinition!]
objectOrganization: [Organization!] @auth(for: [KNOWLEDGE_KNUPDATE_KNORGARESTRICT])
objectOrganization: [Organization!]
objectLabel: [Label!]
externalReferences(first: Int): ExternalReferenceConnection
containersNumber: Number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type CaseRfi implements BasicObject & StixObject & StixCoreObject & StixDomainOb
createdBy: Identity
numberOfConnectedElement: Int!
objectMarking: [MarkingDefinition!]
objectOrganization: [Organization!] @auth(for: [KNOWLEDGE_KNUPDATE_KNORGARESTRICT])
objectOrganization: [Organization!]
objectLabel: [Label!]
externalReferences(first: Int): ExternalReferenceConnection
containersNumber: Number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type CaseRft implements BasicObject & StixObject & StixCoreObject & StixDomainOb
createdBy: Identity
numberOfConnectedElement: Int!
objectMarking: [MarkingDefinition!]
objectOrganization: [Organization!] @auth(for: [KNOWLEDGE_KNUPDATE_KNORGARESTRICT])
objectOrganization: [Organization!]
objectLabel: [Label!]
externalReferences(first: Int): ExternalReferenceConnection
containersNumber: Number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface Case implements BasicObject & StixObject & StixCoreObject & StixDomain
createdBy: Identity
numberOfConnectedElement: Int!
objectMarking: [MarkingDefinition!]
objectOrganization: [Organization!] @auth(for: [KNOWLEDGE_KNUPDATE_KNORGARESTRICT])
objectOrganization: [Organization!]
objectLabel: [Label!]
externalReferences(first: Int): ExternalReferenceConnection
containersNumber: Number
Expand Down
Loading
Loading