0
I have an application that connects to BigQuery using multiple creds from .json file. Being that this app will eventually reside on Pivotal Cloud Foundry and will need to be set as User Provided Environment Variable I have used base64 encryption to encode the contents of the .json file into a base64 key.
The idea is I can then use the key as the value of the environment variable so I can pull in all BigQuery API connection info from .json file into one environment variable - using base64 key, instead of having many key=value pair variables to accomplish this.
Note: The base64 key has 3,165 characters - including new line characters.
For reference a short snippet of base64 key is:
nROdXlnWnVmb1k0UnVqTFJlcjgrckZJRlpZdVxuYUFsMklsWk9MUjd3cmRzL0RDZytYdGJGYUp4MzlRaWZHaEp6b2hyblNvbUpyY3ExL2d4aVFYYlplUUtCZ0hja1xua0hqL1M0Wkk0d0dWTzJreEN4QzduYnB1STVQRTRWczRHMjE0RkpldnhPR1hDQ3phOFB5bGJPbm5KUFdZZUJoT1xuV3IwMzduazd5eXpja0p6cE\
p0R0hlNkZLNFJNcHFIRHBmU0pMOE80T2YwWi9UYUZ3ZTM4bE9XbWc1Q2NLUC9XUVxuUjhYdlgzS25UZXRQUWxVeXJwK1BNVHNNdG4yVnBad1hMZDNJTExKYkFvR0JBS1FaODdVbEE1S0kwV3JqVnRic1xuaXJ6UkdDaGhVWE90SXVDT09zWlQyOXNpeFVoQmZka1JzTFpCcnB6VkVWektXeGhBY05lRERRbTJkVzBta09\
1elxuTkNVUlBpbGZYT0pLRkdNQ2lOdkIyZW5OMDVBK2ExdVdOWFFkclQzRG10OG5MS3FFYnp6VTNheXIweWVsc0tKeVxuNE9BVExMK3M5M29oRFV6WEhRZlVtbnNMXG4tLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tXG4iLAogICJjbGllbnRfZW1haWwiOiAidG1wLWFkLWxvY2tvdXRAaW8xLWRhdGFsYWtlLXZpZXdz\
I know this can be set on macOS as system variable (I've seen it and application makes connections and works correctly) but I am not able to do this on Windows 10.
I'm aware of the max length constraint for system variables on Windows but haven't came across a solution to be able to set this using "GOOGLE_JSON_B64" as environment variable name and then the 3,165 key as the environment variable value.
Does anyone have a workaround?
Any insight would be greatly appreciated.
base64 is not encryption... the key you just partially shared should not be used again. – Attie – 2018-09-10T20:48:47.697