1

just wanted to know if it is a good practice for app development where in build variants can access same set of server environment. For example, with a production build I can access development, staging, and production server just by changing configuration from hidden settings or by appending environment pefix on login screen.

What kind of attacks are possible and what are the factors which supports developers to not to follow such practices. I think it's a big security risk where in internal employee or smart hackers can use such setting to attack secure databases.

If this is a Security risk then how should be organise build variants and their mapping with server environments. For example, develop build should point to develop web servers and test build should point to testing servers and so on.

Further how I can make good use of playstore alpha, beta and prod channels. Should builds released to alpha channel point to production. Or they should point to different environments.

Ashwani Kumar
  • 834
  • 3
  • 16
  • 30

2 Answers2

0

how should be organise build variants and their mapping with server environments. For example, develop build should point to develop web servers and test build should point to testing servers and so on.

I suppose, that theanswer is build variants and gradle config adding url to BuildConfig file from Gradle

  • I am doing this mapping in my gradle file. What I wanted to ask is build release to beta channel should point to production environment or should point to testing environment. Do google provide any guidelines or best practices for such scenarios? – Ashwani Kumar Oct 10 '17 at 04:37
  • I know only crashlytics. If i'm correct understand you http://try.crashlytics.com/beta/ – Mykhailo Voloshyn Oct 10 '17 at 10:16
0

I went into this question lately, and I think build flavours answer it properly because you can create one per environment (see Multi-flavour variants examples): https://androiddevsimplified.wordpress.com/2016/04/06/gradle-power-android-product-flavours-and-configuration/

Louis GRIGNON
  • 699
  • 6
  • 17