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

API and Websocket Keys Leakage #26

Open
Securitybits-io opened this issue Feb 16, 2022 · 4 comments
Open

API and Websocket Keys Leakage #26

Securitybits-io opened this issue Feb 16, 2022 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Securitybits-io
Copy link

The WebUI leaks the RestAPI and Websocket tokens in the javascript source code! These should not be reflected back to the user as that can lead to unintended requests through for example XSS.

API Bearer Token

SourceCode_RestAPI-key

Websocket Token

SourceCode_WebSocket-key

@brothercorvo brothercorvo added the bug Something isn't working label Apr 9, 2022
@brothercorvo brothercorvo added this to the 2.2 milestone Dec 8, 2022
@brothercorvo
Copy link
Contributor

@naman108 please verify if that is still the case in the current version

@naman108
Copy link
Contributor

This is definitely still an issue

@naman108
Copy link
Contributor

I think this issue can be reasonably decomposed into three parts:

  1. insecure communications between client and server due to HTTP
  2. generic web socket key
  3. API token in text

1: insecure communications

IMO, this is probably the most relevant factor for the security conscious user as the other two pertain mostly to cases where an attacker already has access to the UI. To address this issue we would need two main changes:

  • add automatic UI certificate generation
  • add configuration to Flask to use generated certificates

2: Generic Websockets Keys

I think we could reasonably address this by enabling API tokens for use in the web sockets that way every user has a uniquely identifying access token for FTS which can be revoked.

3: API token in text

In general, we expect that the authenticated user knows their API token however clearly this is an issue over HTTP as anyone listening could get access to the API token. This would bring us back to issue 1, where we should provide the user with an easy mechanism to enable HTTPS.

@naman108
Copy link
Contributor

@brothercorvo @Securitybits-io what are your thought's on this?

@brothercorvo brothercorvo modified the milestones: 2.2, 2.3 May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants