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

Iplement whitelist for authenticated clients #179

Open
mStirner opened this issue Jun 30, 2022 · 3 comments
Open

Iplement whitelist for authenticated clients #179

mStirner opened this issue Jun 30, 2022 · 3 comments

Comments

@mStirner
Copy link
Member

For some clients (e.g. Shelly) its not possible to authenticate, to allow them to call the API, enable a whitelist for specific source IPs.

grafik

@mStirner
Copy link
Member Author

Or add the token as query parameter? Would be a long url and could give problems with embedded devices.
Perhaps a combination of both solutions?!

A list of clients that can be authenticate via query parameter "shorted" token? Perhaps a MD5 hash of a JWT?

@mStirner mStirner added this to the v3.0.0 release milestone Oct 29, 2022
@mStirner
Copy link
Member Author

Another approach could be that the connector works like a proxy? (In combination with a whitelist?)

@mStirner
Copy link
Member Author

Create a class.token.js that creates a hash of the jwt stored in the database and pass that hash via URL?
This could also be done when a new token is created, since a token never changes, the hash can also be stored in the database.

Instead of just storing the token as string, store a object:

{
  "token": "yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "md5": "c915345df82a1a3a273e3630e0bf68a0",
  "sha1": "fd9745dfe46131f4fc52f27c3b4bf999511ebd3f",
  "crc32": "0xBF10F3AD "
}

Or so...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant