cred_env function

Create a new environmental credential object