-
Notifications
You must be signed in to change notification settings - Fork 1k
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
When using live streams with platform organizations, a user who is not in the platform organization will not receive events #10095
Comments
@samczsun I've not been able to reproduce your bug. Maybe I did not use the correct repro steps? Stream set up
On my platform 2:
Reproduction
Output: The odd thing that I've noticed however is that
|
Are you using User B on Platform 1 to authenticate with the stream? If you don't edit the knowledge, only create it initially, does the stream still record the event? Using your terminology, what I'm observing is that when User A on Platform 1 creates some knowledge while User B is authenticated to the stream, the knowledge won't be visible on the stream at all. However, subsequent updates are visible. Because there are no guarantees that knowledge might be edited, it's not a viable workaround unless I create automation to edit every piece of knowledge as it arrives. The odd thing you're referring to sounds like what I'm experiencing, I'm curious how the data is making it's way to Platform 2 if the stream doesn't contain the create event. |
I'll add more details to what I just shared, to ensure I can provide all answers. I slightly changed the setup compare to what I write before (I've highligted the changes) Stream set up
On my platform 2:
Reproduction Overall result Questions for you
**Side note **
|
Hi @nino-filigran, I just spent some time creating a full minimal reproduction on 6.4.11 (unfortunately, I don't have an EE license for 6.5.x). If you have time, I'm happy to demonstrate this on a call with you. Here are the exact steps to follow:
Let me know if you're able to reproduce the behavior noted in step 16. I believe that Bob's live stream should have been sent the |
Description
I just spent 2 hours debugging this.
I have an instance with the platform organization set to
Acme Inc
. I have two users who are both part ofContonso Corp
. User A is creating knowledge, while User B is consuming knowledge using a live stream.When User A creates knowledge, it is automatically shared with
Contonso Corp
. This is calculated here:opencti/opencti-platform/opencti-graphql/src/database/data-builder.js
Line 29 in 8573c5c
Note that this function returns an object where
element
is the STIX entity, andrelations
is the relationships to create. The entiredataEntity
is then passed toindexCreatedElement
which persists the STIX entity and its relationships into Elastic.However, the returned
createdElement
only containsdataEntity.element
, notdataEntity.relations
. This means that when the created entity is pushed into the Redis stream, it does not contain the correctgranted_refs
.Now, when User B attempts to load the stream,
checkUserCanAccessStixElement
returns false due to the missinggranted_refs
:opencti/opencti-platform/opencti-graphql/src/utils/access.ts
Line 572 in 8573c5c
Environment
Reproducible Steps
Steps to create the smallest reproducible scenario:
Expected Output
Live streams should work while using platform organizations
Actual Output
Live streams do not work
Additional information
Screenshots (optional)
The text was updated successfully, but these errors were encountered: