0

I have created a number of devices in my Xively account and always selected "private access" in the create wizard. I recently noticed that some of these devices are publicly accessible, even though the Xively portal is telling me they are private. If I use the portal to change the access to public and back to private again then they are no longer publicly accessible. Does anyone know why some devices are public when the portal says they are private?

RobM
  • 49
  • 6

1 Answers1

0

I've found the reason for this now. There are actually two problems which combine to cause what I think is quite a nasty data privacy issue.

Firstly, the Xively portal does not accurately reflect the current accessibility status (public or private) of a feed; it shows the status that was selected when the device was created or subsequently modified via the portal, however if an application changes the status via the API this change is never reflected in the portal UI. If your application accidentally changes the status from private to public the portal will continue to display "private" whenever you look at it.

Secondly, there is a bug in the Xively Java library which changes a device's status to public whenever you use the library to update a device (e.g. submit a reading). The update() method of the FeedRequester class submits every attribute for a feed whether you specify the attribute or not. In most cases this doesn't matter because the method sends a value of null for unspecified attributes which the server (presumably) ignores. The one exception is the "private" attribute - in this case if your application does not specify a value the library will send a value of false, not null, presumably because the attribute is stored in the Java library as a Java primitive type (boolean) and not an object. The net effect is if you call this method without explicitly setting private to true, your device's status will be changed from private to public without you realising it.

RobM
  • 49
  • 6