Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

2 different keys for reading/writing #29

Open
Conobi opened this issue May 8, 2018 · 3 comments
Open

2 different keys for reading/writing #29

Conobi opened this issue May 8, 2018 · 3 comments

Comments

@Conobi
Copy link

Conobi commented May 8, 2018

Hello,
An idea would be to have two differents keys: one to do GET requests, that can be only used to read data, and another private key that let us to write data on our store.
Thanks !

@bluzi
Copy link
Owner

bluzi commented May 11, 2018

Hey @Donokami,

While I see the point of what you're suggesting, I only see little benefits coming out of implementing this.

Right now, jsonstore is meant to be used only in the server, so that the token remains secret and no one can read or modify the data attached to it.
Now, say we apply your idea, developers will be able to use either the read or the write key in the client, but honestly, sharing the write key is super dangerous and should not be done, and I can't think of many applications that will only store public data, and even if they do, I wouldn't recommend sharing the read key.

However, I'd be happy if you could change my mind :)

@knrdl
Copy link

knrdl commented May 12, 2018

This kind of role / view implementation would allow to build a secure website which displays data (for example temperature measurement) by accessing your webservice directly (using the read-key).
The sensor in the backend on the other hand would use the write-key.

I think that's a really nice feature

@bluzi
Copy link
Owner

bluzi commented Jun 9, 2018

Well, I'm willing to give it a shot, if someone will try to implement it as an advanced option, leaving the current behavior as the default behavior, I'll be happy to merge it.

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

No branches or pull requests

3 participants