warren-bank / Android-Bonjour-WebRTC

Android app that allows device discovery on WLAN (w/ Bonjour) and video calls to be placed between devices on WLAN (w/ WebRTC) without any external server.
GNU General Public License v2.0
14 stars 4 forks source link

question on permissions #5

Closed IzzySoft closed 1 month ago

IzzySoft commented 1 month ago

At IzzyOnDroid, the scanner reported

! repo/com.github.warren_bank.bonjour_webrtc_1040021.apk declares flag(s): usesCleartextTraffic
! repo/com.github.warren_bank.bonjour_webrtc_1040021.apk declares sensitive permission(s):
  android.permission.CAMERA android.permission.RECORD_AUDIO
  android.permission.SYSTEM_ALERT_WINDOW android.permission.READ_EXTERNAL_STORAGE*

I guess cleartext traffic is only for connections in the local network, so I've put that to the app's "green list" with that explanation. Also straight to the "green list" went the CAMERA and RECORD_AUDIO permissions, which are clearly needed for video calls. Could you please clarify the other two? Note: the asterisk at android.permission.READ_EXTERNAL_STORAGE* indicates this permission was granted implicitly due to the app requesting the WRITE permission – which is also unclear for me why it's needed.

Thanks in advance!

warren-bank commented 1 month ago
IzzySoft commented 1 month ago

present the user with a dialog to announce an inbound call

Thanks! Added to the "green list".

As for storage: if you don't use any of those listed activities, and they cannot be activated/triggered via the app, it should be safe to omit the permission I'd say. Worst case, any of those features are indeed addressed and raise an exception – and you can decide whether to catch it or to add the permission back (and have me add it to the "green list" with a proper reason).

Your app, so your say. If you do not want to go through that trouble, just give me a short description what to put as reason for the green-listing (max ~50 chars).

warren-bank commented 1 month ago

I haven't tested this app in many years.. so my saying that I don't remember what features are available isn't to say that they don't exist in the app; they're probably all accessible through the app settings.. which are the same as upstream.

This app is pretty much a superset of the original/upstream app. When I was reading its code (ages ago), I noticed that it supports direct IP-to-IP connections to completely bypass any required signalling. Based on this observation, I though it would be useful to add local discovery over a LAN using mDNS. That functionality is what I've added. If Google says it needs those other permissions, then I'm inclined to believe them.

I trust you.. whatever description you think is helpful to your users is good by me.

IzzySoft commented 1 month ago

Thanks Warren! So let's put it like this:

android.permission.CAMERA: required for video calls
android.permission.RECORD_AUDIO: required for video calls
android.permission.SYSTEM_ALERT_WINDOW: used to present a dialog to announce an inbound call
android.permission.READ_EXTERNAL_STORAGE: implicitly granted due to the WRITE permission
android.permission.WRITE_EXTERNAL_STORAGE: needed by some features of the WebRTC API

I just put that live now. If I should adjust something, just let me know.