Skip to content

Authentication

mrlt8 edited this page Jul 22, 2024 · 5 revisions

Default Authentication

Important

WebUI and stream authentication will be enabled by default to prevent unintentional access.

- WB_AUTH=True
  • To disable default authentication, set WB_AUTH=False explicitly.
  • Note that all streams and the REST API will necessitate authentication when WB_AUTH is enabled.

WebUI Authentication

- WB_USERNAME=MyCustomUsernameForWebUI
- WB_PASSWORD=MyCustomPasswordForWebUI
  • Credentials are case sensitive.
  • WB_USERNAME will default to wbadmin if not explicitly set.
  • WB_PASSWORD will default to username part of the Wyze email address if not explicitly set.
    • Example: For the email address john123@doe.com, the WB_PASSWORD will be john123.

REST API Authentication

- WB_API=My-Custom-API-Key-For-WebUI
  • A unique API key will be accessible at the bottom of your WebUI.
  • REST API will require an api query parameter or header.
    • Example: http://localhost:5000/api/<camera-name>/state?api=My-Custom-API-Key-For-WebUI
    • Example: -H "api: My-Custom-API-Key-For-WebUI"

Stream Authentication

API Key Stream Auth

- WB_API=My-Custom-API-Key-For-WebUI
  • A unique API key will be accessible at the bottom of your WebUI.
  • Streams will also require authentication when WB_AUTH is enabled.
    • username: wb
    • password: My-Custom-API-Key-For-WebUI

Custom Stream Auth

- STREAM_AUTH=user:pass
  • Username and password should be separated by a :
  • An additional : can be used to specify the allowed IP address for the user.
    • This does NOT work with docker desktop
    • Specify multiple IPs using a comma
  • Use the @ to specify paths accessible to the user.
    • Paths are optional for each user.
    • Multiple paths can be specified by using a comma. If none are provided, the user will have access to all paths/streams
  • Multiple users can be specified by using | as a separator

EXAMPLES:

STREAM_AUTH=user:pass@cam-1,other-cam|second-user:password@just-one-cam|user3:pass
  • user:pass has access to cam-1 and other-cam
  • second-user:password has access to just-one-cam
  • user3:pass has access to all paths/cameras
STREAM_AUTH=user:pass:192.168.0.7|::192.168.0.10|::192.168.0.15,192.168.0.20@just-one-cam
  • user:pass has access to all paths/cameras when streaming from 192.168.0.7
  • No authentication required for all paths/cameras when streaming from 192.168.0.10
  • No authentication required for just-one-cam when streaming from 192.168.0.15 or from 192.168.0.20
STREAM_AUTH=user:pass|:@public-cam|::192.168.0.17
  • user:pass has access to all paths/cameras
  • No authentication required for public-cam
  • No authentication required for all paths/cameras when streaming from 192.168.0.17