android-security

How to save Oauth Access token securely in android

青春壹個敷衍的年華 提交于 2019-12-03 07:01:30
问题 I have access token from the server after authentication lets say "uyhjjfjfgg567f8fhjkkf" now I want to save it in the device securely. I looked in Keystore and Keychain in android developer sites. I dont clearly understand how it works and how we should retrieve the token from the keystore. KeyPairGenerator kpg = KeyPairGenerator.getInstance( KeyProperties.KEY_ALGORITHM_EC, "AndroidKeyStore"); kpg.initialize(new KeyGenParameterSpec.Builder( alias, KeyProperties.PURPOSE_SIGN | KeyProperties

Google Play Warning: WebViewClient.onReceivedSslError handler

筅森魡賤 提交于 2019-12-03 06:10:17
问题 I recently received an email from Google with the following subject : "Google Play Warning: SSL Error Handler Vulnerability". In this email, Google explains that my app has an ["unsafe implementation of the WebViewClient. onReceivedSslError handler. Specifically, the implementation ignores all SSL certificate validation errors, making your app vulnerable to man-in-the-middle attacks. An attacker could change the affected WebView's content, read transmitted data (such as login credentials),

You are using an unsafe implementation of X509TrustManager

假如想象 提交于 2019-12-03 04:32:37
问题 I've an app in Google Play, today I received a mail from Google saying that: Google Play warning: You are using an unsafe implementation of X509TrustManager It says something about the SSL certificate issues and a way to solve the issue. I'm asking this question because of curiosity, Actually what is this warning all about ? I'm not using any network related activities in my app (it's a local database driven app), so why this warning occurred for my app? More Details: My app was built using

How to save Oauth Access token securely in android

雨燕双飞 提交于 2019-12-02 21:49:50
I have access token from the server after authentication lets say "uyhjjfjfgg567f8fhjkkf" now I want to save it in the device securely. I looked in Keystore and Keychain in android developer sites. I dont clearly understand how it works and how we should retrieve the token from the keystore. KeyPairGenerator kpg = KeyPairGenerator.getInstance( KeyProperties.KEY_ALGORITHM_EC, "AndroidKeyStore"); kpg.initialize(new KeyGenParameterSpec.Builder( alias, KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY) .setDigests(KeyProperties.DIGEST_SHA256, KeyProperties.DIGEST_SHA512) .build()); KeyPair

You are using an unsafe implementation of X509TrustManager

这一生的挚爱 提交于 2019-12-02 17:43:39
I've an app in Google Play, today I received a mail from Google saying that: Google Play warning: You are using an unsafe implementation of X509TrustManager It says something about the SSL certificate issues and a way to solve the issue. I'm asking this question because of curiosity, Actually what is this warning all about ? I'm not using any network related activities in my app (it's a local database driven app), so why this warning occurred for my app? More Details: My app was built using Appcelerator Titanium and google says this implementation is in ti.modules.titanium.network

Google Play Error: SSL Error Handler vulnerabilities and APP UPDATE REJECTED

我的梦境 提交于 2019-12-02 06:40:40
问题 How to solve below mentioned error from google play store after apk rejected Your APK has been rejected for containing security vulnerabilities, which violates the Malicious Behavior policy SSL Error Handler 回答1: Look at the rejection message. It will point to the class that is at fault. If you have a WebViewClient, then make sure you implement onReceivedSslError() method. Here are more details. https://support.google.com/faqs/answer/7071387 来源: https://stackoverflow.com/questions/41236517

System Overlay Detector

♀尐吖头ヾ 提交于 2019-12-01 22:18:41
Is there a way to detect within my own app that a Screen Overlay is currently present? For example, I see in the settings that they detect it: I would like to know if there is a way to detect it myself within my own app. Android View documentation offers clear ways : To enable touch filtering, call setFilterTouchesWhenObscured(boolean) or set the android:filterTouchesWhenObscured layout attribute to true. When enabled, the framework will discard touches that are received whenever the view's window is obscured by another visible window. As a result, the view will not receive touches whenever a

Caused by: java.security.NoSuchProviderException: no such provider: Crypto - Android N [duplicate]

孤人 提交于 2019-12-01 21:35:24
This question already has an answer here: SecureRandom provider “Crypto” unavailable in Android N for deterministially generating a key 3 answers Seems like "Crypto" provider has been removed in Android N. My application crashing because of NoSuchProviderException. If I change the provider and Algorithm then it will affect user who are all using the app currently. Any one have a idea? KeyGenerator kGen = KeyGenerator.getInstance(KEY_GENERATOR_ALGORITHM); SecureRandom sr = SecureRandom.getInstance(STR_SHA1PRNG, **CRYPTO**); sr.setSeed(seed); kGen.init(128, sr); SecretKey sKey = kGen.generateKey

FCM Security Alert

对着背影说爱祢 提交于 2019-12-01 14:45:33
Security alert Your app contains exposed Google Cloud Platform (GCP) API keys. Please see this Google Help Center article for details. I have an android application uploaded in google play store which uses Firebase for App Cloud Messaging in android. I have recently got an alert from play console that Security alert : Your app contains exposed Google Cloud Platform (GCP) API keys. Please see this Google Help Center article for details. Could you please tell anyone to resolve this issue. Thanks in advance. Hi this warning would come because the google cloud platform api key you are using in

FCM Security Alert

落花浮王杯 提交于 2019-12-01 13:09:02
问题 Security alert Your app contains exposed Google Cloud Platform (GCP) API keys. Please see this Google Help Center article for details. I have an android application uploaded in google play store which uses Firebase for App Cloud Messaging in android. I have recently got an alert from play console that Security alert : Your app contains exposed Google Cloud Platform (GCP) API keys. Please see this Google Help Center article for details. Could you please tell anyone to resolve this issue.