Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing READ_PHONE_STATE #232

Open
breedx-splk opened this issue Jan 25, 2024 · 2 comments
Open

Consider removing READ_PHONE_STATE #232

breedx-splk opened this issue Jan 25, 2024 · 2 comments

Comments

@breedx-splk
Copy link
Contributor

So in our Splunk distro, a user raised an issue about READ_PHONE_STATE permission being a security concern. It exists in the manifest here.

I don't remember the exact details right now, but I think that maybe network detection doesn't work correctly on older versions of Android without it?

Curious if other folks know specifics, and if we should consider relaxing the requirement around this permission.

Relates to #49.

@marandaneto
Copy link
Member

The issue is here

if (hasPermission(Manifest.permission.READ_PHONE_STATE)) {
subType = getDataNetworkTypeName(telephonyManager.getDataNetworkType());
}

It checks if the permission is available, so you can technically remove the SDK implicit permission but that if will always return false. If they want that info, you can tell people via docs to add the permission directly on their app.

@ber4444
Copy link

ber4444 commented Jan 27, 2024

Just to clarify, will Open telemetry as well as Splunk RUM properly handle network subtype being null?

If so, it should not be added here by default:

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

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

No branches or pull requests

3 participants