The W3C document[0] has a few suggestions:
> A Web application provides input for a smart home system to control lighting.
> A Web aplication checks whether light level at work space is sufficient.
> A Web application calculates settings for a camera with manual controls (apperture, shutter speed, ISO).
> A Web application monitors light level changes produced by hovering hand user gesture and interprets them to control a game character.
While these applications are all potentially valid, it seems like each use case would be better served by a native app.
[0] https://www.w3.org/TR/ambient-light/#usecases-requirements
That is the threat. They're pushing hard to keep the "open web" competitive with native apps, so that the web is not abandoned as an app platform.
Eventually there's a point where the web platform is good enough that some companies choose to sunset native apps.
Delivering the same functionality across 3 disparate platforms is a waste of time and energy. Especially when the form factor in the end users hands is the same.
I get why it's that way now, but the question will come up over time. Especially for any app that needs live remote API calls to function.
Offering up every last conduit one could possibly expose on a general purpose platform, so that competing interests on the other side of the wire are all fighting on a level playing field to harvest all the imaginable minutia of every quiver of flesh (whether voluntary or reflexive) against a piece of smartphone glass, in an effort to line pockets, starts to feel a little obscene after a while.
And if any quarter should be given, the big bad companies will pack up their wares and refuse to conduct business in the commons, leaving the web to disintegrate and decompose back unto what geocities, myspace and aol used to look like? Not sure that’d be so terrible, tbh.
No.
I like my ebook reader app to automatically adjust to the light. I'd like to be able to build similar apps on the web platform.
I agree getting the security balance right is important though.
Then again, here's another reason to keep JavaScript absolutely off, except for sites you really trust and actually need JS on.
A smart home system would probably use a proper light sensor so that it will work if your phone is in your pocket or face down or simply not open on the page that's controlling it. Of course, all of these issues apply to an app version as well.
Controlling a character via gestures sounds like a job for the front-facing camera, not the light sensor.
What if I don't want to give you binary light/dark choice. Perhaps the site is flux offering you an app the change your colour balance. It could show you what the app would do now with your existing light levels.
We're already past the point where the average consumer is confused by what they are actually allowing when they click "Allow" for the various permissions.
Component:▸ Security
Importance: P3 normal
Status: NEW
Reported: 6 months ago
This wouldn't be hard to fix. Filter the signal down to about 0.5Hz, which is comparable to how fast most displays auto-adjust for brightness.> device.sensors.enabled = false
No, that wouldn't help.
From the article: For the light sensor, limiting the frequency will not thwart our attacks; even frequency as low as 1Hz would allow the same type of attack, with only factor-of-two slowdown.
Would you rather wait for the API to go live and then be abused to steal real data? I would much rather researchers discover and report on possible attack vectors long before they are enabled by default. "Trust by default" long ago proved foolish.
They say themselves that their demo is not real world and wont work in the real work and then say it "shouldn't be a problem" to make it work.
Not to mention that it takes 20 seconds of flashing the users screen to do the thing (how is that supposed to work without setting off alarm bells).
As I said, they have no proof of a real world vulnerability, only proof it a staged environment, and they readily admit it.
So what. This "default allow" attitude is easily more damaging than any other source of security problems. You (or anyone else) cannot know all of the ways exposing new data could be exploited, or might already be exploited in ways that we are not lucky enough to know about.
Caring about security - which includes the future unknown unknowns you don't yet know to even look for - means minimizing what is exposed to the public attack surface to what is both needed (which does not include anything merely "wanted") and demonstrated/proven to have trivial risk with known limits.
Compare it to the iPodLinux project, when nilss extracted a bootloader using a piezo buzzer. Yes, this type of hack can be done, but something tells me it's not going to be a frequent worry.
https://web.archive.org/web/20050301010451/http://ipodlinux....