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

[Bug] In TheHive, a user is a member of one or more organisations. One user has a profile for each organisation and can have different profiles for different organisations. #1247

Closed
torsolaso opened this issue Mar 3, 2020 · 2 comments
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@torsolaso
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) Debian
TheHive version / git hash 4.0

Problem Description

if I did not misunderstand the description of the documentation I should be able to see in the case menu the two cases of the two organizations ¿right?

Steps to Reproduce

  1. create two organizations and link them.
  2. create one user with the same email on each ORG, ORG1 and ORG2
  3. create one specific user on each org. ORG1 ORG2
    1. create a case with user org1
    1. create a case with user org2
  4. login with user on two ORGs and check that this user only see cases from ORG2 and on right in the live stream you can see that the other cases exists
  5. Click on the live case and you get this error

Complementary information

Log on debug.

`
[warn] o.t.s.q.InputFilter - Use of filter {"owner": "FString(userinseveralorgs@thehive.com)"} is deprecated. Please use {"_is":{"owner":"FString(userinseveralorgs@thehive.com)"}}
[warn] o.t.s.q.InputFilter - Use of filter {"status": "FString(Waiting)"} is deprecated. Please use {"_is":{"status":"FString(Waiting)"}}
[warn] o.t.s.ErrorHandler - GET /api/case/16472?nstats=true returned 400
java.lang.IllegalArgumentException: The provided traverser does not map to a value: v[16472]->[JanusGraphVertexStep(IN,[ShareCase],vertex), TraversalFilterStep([JanusGraphVertexStep(IN,[OrganisationShare],vertex), HasStep([name.eq(ORG2)])]), ProjectStep([c909894a-9c8f-4d65-bab9-5b6adab033e6, 0295f114-f1f7-478b-935a-f101d7439807],[[JanusGraphVertexStep(OUT,[ShareTask],vertex), TraversalFilterStep([HasStep([status.eq(Cancel)]), RangeGlobalStep(0,1), CountGlobalStep, IsStep(eq(0))]), GroupCountStep(value(status)), LambdaMapStep(lambda)], [JanusGraphVertexStep(OUT,[ShareObservable],edge), CountGlobalStep, LambdaMapStep(lambda)]]), LambdaMapStep(lambda)]
at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil.apply(TraversalUtil.java:46)
at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil.applyNullable(TraversalUtil.java:87)
at org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectStep.map(ProjectStep.java:55)
at org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectStep.map(ProjectStep.java:40)
at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:37)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:36)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
[warn] o.t.s.q.InputFilter - Use of filter {"status": "FString(Cancel)"} is deprecated. Please use {"_is":{"status":"FString(Cancel)"}}
[warn] o.t.s.q.InputFilter - Use of filter {"status": "FString(Ok)"} is deprecated. Please use {"_is":{"status":"FString(Ok)"}}
[warn] o.t.s.q.InputFilter - Use of filter {"case": "FString(36864)"} is deprecated. Please use {"_is":{"case":"FString(36864)"}}
[warn] o.t.s.q.InputFilter - Use of filter {"status": "FString(Deleted)"} is deprecated. Please use {"_is":{"status":"FString(Deleted)"}}
[warn] o.t.s.ErrorHandler - POST /api/connector/cortex/action/_search?range=0-100&sort=-startDate returned 404
org.thp.scalligraph.NotFoundError: /api/connector/cortex/action/_search
at org.thp.scalligraph.ScalligraphRouter$$anonfun$2.$anonfun$applyOrElse$4(ScalligraphRouter.scala:102)
at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.$anonfun$invokeBlock$2(SessionAuthSrv.scala:84)
at scala.Option.fold(Option.scala:251)
at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.invokeBlock(SessionAuthSrv.scala:82)
at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.invokeBlock(SessionAuthSrv.scala:79)
at org.thp.scalligraph.ScalligraphRouter$$anonfun$2.$anonfun$applyOrElse$3(ScalligraphRouter.scala:102)
at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:441)
at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:439)
at play.api.mvc.ActionBuilder$$anon$9.apply(Action.scala:379)
at play.api.mvc.Action.$anonfun$apply$4(Action.scala:82)

`

@torsolaso torsolaso added TheHive4 TheHive4 related issues bug labels Mar 3, 2020
@cyberpescadito
Copy link

I did have the same bug (or misunderstanding of the doc?), this is not an isolated issue.

@To-om
Copy link
Contributor

To-om commented Mar 3, 2020

A user can be a member of more than one organisation but only one at a time. The user will be able to switch between all his organisations (not yet implemented). In your example, it is not possible to see case#2 and case#3 at the same time (except if you share them).

Regarding the error you get (IllegalArgumentException: The provided traverser does not map to a value). It is a bug.

@To-om To-om self-assigned this Mar 3, 2020
To-om added a commit that referenced this issue Mar 4, 2020
@To-om To-om closed this as completed Mar 4, 2020
@To-om To-om added this to the 4.0.0-RC2 milestone Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

3 participants