Protecting content provider paths
Content providers are probably the most exploited application components, given that they often hold the data most critical to user authentication. They often hold a lot of sensitive data about users and their affinity to SQL-injection attacks and information leakage. This walkthrough will detail some measures that you can take to protect your content providers' general information leakage caused by common errors in how permissions are configured for content providers. We'll also cover guarding database and content providers against SQL-injection attacks.
This recipe will discuss how to add certain configurations to your AndroidManifest.xml
file to protect access to your content provider, down to the URI path level. It also discusses some of the security risks in misusing the grant URI mechanism, so as to not expose too much of your content provider paths to unauthorized or potentially malicious applications.
Uniform resource identifiers (URIs) are used with...