2

I would like to set up a JDBC connection for an app in Google App maker without storing the username/password in the script.

I thought of doing this by storing this information in a spreadsheet that only I have access to. In this case, the developer would have to be used as the execution identity.

But I would actually like the app to run as the user so that I can use the user id to set access permissions/customize what is displayed, editable, etc.

So in summary I would like the app to run as the user but the JDBC connection to be established through my credentials, which should not be shared with anyone.

Is it possible to run different scripts within the same app as different execution identities? If not, what might be a solution to this?

TheMaster
  • 45,448
  • 6
  • 62
  • 85
Z Rizvi
  • 31
  • 2
  • Store it in scriptProperties – TheMaster May 20 '19 at 20:29
  • Well, you can't access a spreadsheet as a user if it's locked down to the dev only, unless you give all users read access to the spreadsheet, which is less secure than just storing this information in your script. You're figuring unless a user has access to the dev account they will not see server scripts anyway. As far as different execution identities go you might want to take a look at whether service accounts fulfill that need. – Markus Malessa May 20 '19 at 21:13
  • Well, why can't you store in a settings table? Since this is jdbc, it will be a server side script. Every invocation, you read the key 'db.url' which will include the IP address and username/password. Granted it will be unencrypted but that should not be a big problem. If you are worried about user reading from client side, append a "_" at the end of function. For extra fun, you can throw up an error message if client side ever tries to read it using a onafterload event.. – work monitored May 30 '19 at 17:48

0 Answers0