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

Cant create key for X-OpenCTI-Hostname from empty data when creating a new hostname observable #1124

Closed
IOTech17 opened this issue Mar 2, 2021 · 0 comments
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Milestone

Comments

@IOTech17
Copy link

IOTech17 commented Mar 2, 2021

Please replace every line in curly brackets { like this } with an appropriate answer, and remove this line.

Description

When creating a new observable for a hostname I get this error when clicking on create

Screenshot from 2021-03-02 16-54-39

Environment

OpenCTi is running on docker

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Click on the big + in observable
  2. Select hostname
  3. Fill out the form
  4. Click on create and the error message appears so I can't create the observable.

Additional information

error in docker :

{"user":{"ip":"::ffff:172.22.0.1","user_id":"88ec0c6a-13ce-5e39-b486-354fe4a7084f"},"type":"WRITE_ERROR","operation_query":"mutation StixCyberObservableCreationMutation($type:String!$x_opencti_score:Int$x_opencti_description:String$createIndicator:Boolean$createdBy:String$objectMarking:[String]$objectLabel:[String]$externalReferences:[String]$AutonomousSystem:AutonomousSystemAddInput$Directory:DirectoryAddInput$DomainName:DomainNameAddInput$EmailAddr:EmailAddrAddInput$EmailMessage:EmailMessageAddInput$EmailMimePartType:EmailMimePartTypeAddInput$Artifact:ArtifactAddInput$StixFile:StixFileAddInput$X509Certificate:X509CertificateAddInput$IPv4Addr:IPv4AddrAddInput$IPv6Addr:IPv6AddrAddInput$MacAddr:MacAddrAddInput$Mutex:MutexAddInput$NetworkTraffic:NetworkTrafficAddInput$Process:ProcessAddInput$Software:SoftwareAddInput$Url:UrlAddInput$UserAccount:UserAccountAddInput$WindowsRegistryKey:WindowsRegistryKeyAddInput$WindowsRegistryValueType:WindowsRegistryValueTypeAddInput$X509V3ExtensionsType:X509V3ExtensionsTypeAddInput$XOpenCTICryptographicKey:XOpenCTICryptographicKeyAddInput$XOpenCTICryptocurrencyWallet:XOpenCTICryptocurrencyWalletAddInput$XOpenCTIText:XOpenCTITextAddInput$XOpenCTIUserAgent:XOpenCTIUserAgentAddInput){stixCyberObservableAdd(type:$type x_opencti_score:$x_opencti_score x_opencti_description:$x_opencti_description createIndicator:$createIndicator createdBy:$createdBy objectMarking:$objectMarking objectLabel:$objectLabel externalReferences:$externalReferences AutonomousSystem:$AutonomousSystem Directory:$Directory DomainName:$DomainName EmailAddr:$EmailAddr EmailMessage:$EmailMessage EmailMimePartType:$EmailMimePartType Artifact:$Artifact StixFile:$StixFile X509Certificate:$X509Certificate IPv4Addr:$IPv4Addr IPv6Addr:$IPv6Addr MacAddr:$MacAddr Mutex:$Mutex NetworkTraffic:$NetworkTraffic Process:$Process Software:$Software Url:$Url UserAccount:$UserAccount WindowsRegistryKey:$WindowsRegistryKey WindowsRegistryValueType:$WindowsRegistryValueType X509V3ExtensionsType:$X509V3ExtensionsType XOpenCTICryptographicKey:$XOpenCTICryptographicKey XOpenCTICryptocurrencyWallet:$XOpenCTICryptocurrencyWallet XOpenCTIText:$XOpenCTIText XOpenCTIUserAgent:$XOpenCTIUserAgent){__typename id entity_type observable_value x_opencti_description created_at createdBy{__typename ...on Identity{__isIdentity:__typename id name entity_type}}objectMarking{edges{node{id definition}}}objectLabel{edges{node{id value color}}}}}","inner_relation_creation":0,"operation":"StixCyberObservableCreationMutation","time":3,"variables":{"type":"X-OpenCTI-Hostname","x_opencti_score":50,"x_opencti_description":"test","createIndicator":true,"createdBy":null,"objectMarking":[],"objectLabel":[],"externalReferences":null,"AutonomousSystem":null,"Directory":null,"DomainName":null,"EmailAddr":null,"EmailMessage":null,"EmailMimePartType":null,"Artifact":null,"StixFile":null,"X509Certificate":null,"IPv4Addr":null,"IPv6Addr":null,"MacAddr":null,"Mutex":null,"NetworkTraffic":null,"Process":null,"Software":null,"Url":null,"UserAccount":null,"WindowsRegistryKey":null,"WindowsRegistryValueType":null,"X509V3ExtensionsType":null,"XOpenCTICryptographicKey":null,"XOpenCTICryptocurrencyWallet":null,"XOpenCTIText":null,"XOpenCTIUserAgent":null},"size":701,"error":{"data":{"reason":"Cant create key for X-OpenCTI-Hostname from empty data","http_status":501,"category":"business","data":{"x_opencti_score":50,"x_opencti_description":"test","createdBy":null,"objectMarking":[],"objectLabel":[],"externalReferences":null,"AutonomousSystem":null,"Directory":null,"DomainName":null,"EmailAddr":null,"EmailMessage":null,"EmailMimePartType":null,"Artifact":null,"StixFile":null,"X509Certificate":null,"IPv4Addr":null,"IPv6Addr":null,"MacAddr":null,"Mutex":null,"NetworkTraffic":null,"Process":null,"Software":null,"Url":null,"UserAccount":null,"WindowsRegistryKey":null,"WindowsRegistryValueType":null,"X509V3ExtensionsType":null,"XOpenCTICryptographicKey":null,"XOpenCTICryptocurrencyWallet":null,"XOpenCTIText":null,"XOpenCTIUserAgent":null},"properties":[{"src":"value"}]},"stacktrace":["UnsupportedError: Unsupported operation","at t (/opt/opencti/build/index.js:1:60607)","at c (/opt/opencti/build/index.js:1:61418)","at x (/opt/opencti/build/index.js:1:124074)","at /opt/opencti/build/index.js:1:125527","at M (/opt/opencti/build/index.js:1:125541)","at B (/opt/opencti/build/index.js:1:125727)","at Le (/opt/opencti/build/index.js:1:32610)","at async $e (/opt/opencti/build/index.js:1:198865)"]},"version":"4.2.4","level":"error","message":"API Call","timestamp":"2021-02-27T23:34:47.682Z"}

Otherwise the other observable works fine.

@richard-julien richard-julien added the bug use for describing something not working as expected label Mar 3, 2021
@richard-julien richard-julien added this to the Release 4.3.0 milestone Mar 3, 2021
@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

3 participants