kinisi / geoserver

MIT License
0 stars 0 forks source link

Support automatic device registration #2

Closed trevorcarlson closed 10 years ago

trevorcarlson commented 10 years ago

One idea is to send the serial number of the rPi along with the data to the server. Authentication would need to change from device_id + API Key to email + API Key. We could continue to use the device_id + rPi serial number as an identifier, or we could just use the rPi serial number as the new device_id. Changes would need to occur on both the client and server sides at the same time.

aohren commented 10 years ago

8e03d106173944e6a38e0103bfaf0ac508e84575 implemented auto-creation of new DeviceConfigurations upon POST iff device_id A) doesn't already exist and B) accompanying api_token is valid.

This allows rPi serial number to be used as device_id, along with a potentially shared SD card image that contains the user's API key. Then he can image that card as many times as he wants, and as long as the rPi hasn't already been associated with a different API key, they will automatically be usable and distinct without intervention on our side.

sajacy commented 10 years ago

Any ideas on how to pull the rPi serial? Any reason not to simply create a uuid?

On Apr 5, 2014, at 14:53, Adam Ohren notifications@github.com wrote:

8e03d10https://github.com/kinisi/geoserver/commit/8e03d106173944e6a38e0103bfaf0ac508e84575implemented auto-creation of new DeviceConfigurations upon POST iff device_id A) doesn't already exist and B) accompanying api_token is valid.

This allows rPi serial number to be used as device_id, along with a potentially shared SD card image that contains the user's API key. Then he can image that card as many times as he wants, and as long as the rPi hasn't already been associated with a different API key, they will automatically be usable and distinct without intervention on our side.

— Reply to this email directly or view it on GitHubhttps://github.com/kinisi/geoserver/issues/2#issuecomment-39647413 .

trevorcarlson commented 10 years ago

Jeff,

 The latest version of the nodejs agent pulls the serial automatically now. It was a hack on my part, but it appears to work. Now we just need to test it out a bit, but feel free to clean it up if you have a better implementation in mind.

Trevor

On Apr 5, 2014, at 3:52 PM, Jeffrey Yang notifications@github.com wrote:

Any ideas on how to pull the rPi serial? Any reason not to simply create a uuid?

On Apr 5, 2014, at 14:53, Adam Ohren notifications@github.com wrote:

8e03d10https://github.com/kinisi/geoserver/commit/8e03d106173944e6a38e0103bfaf0ac508e84575implemented auto-creation of new DeviceConfigurations upon POST iff device_id A) doesn't already exist and B) accompanying api_token is valid.

This allows rPi serial number to be used as device_id, along with a potentially shared SD card image that contains the user's API key. Then he can image that card as many times as he wants, and as long as the rPi hasn't already been associated with a different API key, they will automatically be usable and distinct without intervention on our side.

— Reply to this email directly or view it on GitHubhttps://github.com/kinisi/geoserver/issues/2#issuecomment-39647413 . — Reply to this email directly or view it on GitHub.