Get identity information from environment variables when they are available.

Change-Id: Ia1c64f059fddb7f5eeb2664ee171038e78ac1845
Remove another direct metadata fetch.

Change-Id: I2c989103d7f17e6657dafc9e3263a0854c1b03f5