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

Creation of created-by relatiohship is not protected to target only identity #6291

Closed
richard-julien opened this issue Mar 8, 2024 · 1 comment · Fixed by #6309
Closed
Assignees
Labels
bug use for describing something not working as expected critical use to identify critical bug to fix ASAP solved use to identify issue that has been solved (must be linked to the solving PR)
Milestone

Comments

@richard-julien
Copy link
Member

richard-julien commented Mar 8, 2024

Description

Creation of created-by relationship is not protected to target only identity.
At creation it will not fail but then the read will fail.

Steps

  1. Get a user id from the platform
  2. Create a malware + read
mutation createMalware {
  malwareAdd(input: {
    name: "new_malware",
    createdBy: "dc5f1601-e4ff-4d17-9233-ec80ceef207d"
  }) {
    id
    createdBy {
      id
    }
  }
}

Result

Create ok but return read fail.
"message": "Runtime Object type \"User\" is not a possible type for \"Identity\".",

Expected

The creation must fail has USER is not a correct target for createdBy.

@richard-julien richard-julien added bug use for describing something not working as expected critical use to identify critical bug to fix ASAP labels Mar 8, 2024
@richard-julien richard-julien added this to the Release 6.0.6 milestone Mar 8, 2024
@aHenryJard aHenryJard self-assigned this Mar 8, 2024
@Jipegien
Copy link
Member

@aHenryJard is the mentionned PR resolving this bug critical? If so, can you link the PR to the issue in the "Development" section? Thank you ! :)

@aHenryJard aHenryJard linked a pull request Mar 12, 2024 that will close this issue
5 tasks
@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Mar 13, 2024
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 critical use to identify critical bug to fix ASAP solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants