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

[SIEM] Kibana crashes when trying to use the detection engine with disabled API keys #54736

Closed
cwurm opened this issue Jan 14, 2020 · 8 comments
Labels
blocker bug Fixes for quality problems that affect the customer experience Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM

Comments

@cwurm
Copy link
Contributor

cwurm commented Jan 14, 2020

By default, API keys are disabled when not using TLS.

When clicking on the Detection engine tab on a fresh install without API keys, Kibana will crash. Server log (logging.verbose: true):

server  respons [14:55:37.095] [access:siem] PUT /api/detection_engine/rules/prepackaged 200 864ms - 9.0B
server    log   [14:55:38.011] [debug][basic][plugins][security] Trying to authenticate user request to /api/siem/graphql.
server    log   [14:55:38.012] [debug][basic][plugins][security] Trying to authenticate via header.
server    log   [14:55:38.012] [debug][basic][plugins][security] Authorization header is not presented.
server    log   [14:55:38.012] [debug][basic][plugins][security] Trying to authenticate via state.
server    log   [14:55:38.014] [debug][api-key][plugins][security] Trying to create an API key
server    log   [14:55:38.017] [debug][api-key][plugins][security] Trying to create an API key
server    log   [14:55:38.026] [debug][api-key][plugins][security] Trying to create an API key
server    log   [14:55:38.076] [debug][api-key][plugins][security] Trying to create an API key
server    log   [14:55:38.078] [debug][api-key][plugins][security] Trying to create an API key
server    log   [14:55:38.084] [debug][api-key][plugins][security] Trying to create an API key
server    log   [14:55:38.098] [debug][api-key][plugins][security] Trying to create an API key
server    log   [14:55:38.181] [debug][basic][plugins][security] Request has been authenticated via state.
server    log   [14:55:38.185] [error][api-key][plugins][security] Failed to create API key: [illegal_state_exception] api keys are not enabled
internal/process/warning.js:153
        throw warning;
        ^

DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    at emitDeprecationWarning (internal/process/promises.js:111:13)
    at emitWarning (internal/process/promises.js:104:3)
    at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
    at process._tickCallback (internal/process/next_tick.js:69:34)
 server crashed  with status code 1

Probably should display an error message to the user instead.

@cwurm cwurm added bug Fixes for quality problems that affect the customer experience blocker Team:SIEM labels Jan 14, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@XavierM
Copy link
Contributor

XavierM commented Jan 21, 2020

This should have been fixed with this PR #55069 and simplify with this PR #55403

@cwurm
Copy link
Contributor Author

cwurm commented Jan 22, 2020

Kibana still crashes when clicking the Load prebuilt detection rules button.

@cwurm
Copy link
Contributor Author

cwurm commented Jan 23, 2020

#55626 seems to have fixed this one, I can no longer reproduce it.

@cwurm cwurm closed this as completed Jan 23, 2020
@tsg
Copy link
Contributor

tsg commented Jan 23, 2020

No longer crashes, but it seems that it reports "success" even if loading the preset rules didn't work due to "api keys not being enabled"

@cwurm
Copy link
Contributor Author

cwurm commented Jan 23, 2020

I get this error message when I click the button with API keys disabled:
Screen Shot 2020-01-23 at 12 57 16

@tsg
Copy link
Contributor

tsg commented Jan 23, 2020

Hmm, weird, for me it showed the success toast but no rules were actually loaded.

@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Oct 27, 2020
@peteyan
Copy link

peteyan commented Nov 10, 2020

Hi, any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM
Projects
None yet
Development

No branches or pull requests

6 participants