Skip to content

[Bug] Reveal API key not working for users with profile analyst #1806

Closed
@kwouffe

Description

@kwouffe

Request Type

Bug

Work Environment

Question Answer
OS version (server) Debian 10.7
OS version (client) Mac OS X
TheHive version / git hash Scalligraph 0.1.0-SNAPSHOT , TheHive 4.0.3-1 , Play 2.8.5
Package Type DEB
Browser type & version Firefox 85.0.2 (64-bit)

Problem Description

When trying to reveal their API keys, users with Analyst profile get nothing. It works for Org-admin users

Request to : https://THEHIVESERVER/api/v1/user/analyst_user/key
Answer: {"type":"NotFoundError","message":"User not found"}

Request to : https://THEHIVESERVER/api/v1/user/org_admin_user/key
Answer: API_key

In both case, user was authenticated and an API key was created for it.

Steps to Reproduce

  1. create user with analyst profile (example: analyst_user@thehive.local)
  2. create API key for the user from the admin panel
  3. authenticate as newly created user
  4. Go to https://THEHIVESERVER/api/v1/user/analyst_user@thehive.local/key

Possible Solutions

Looks like a permission issue :D

rgrds,

Emilien

Metadata

Metadata

Assignees

Labels

TheHive4TheHive4 related issuesbug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions