Closed tedsecretsource closed 1 year ago
Thanks. I update the source with GOOGLE_ACCOUNT_SERVICE_KEY. I must fix two others bugs, and i will publish a new version.
if "GOOGLE_ACCOUNT_SERVICE_KEY" in os.environ:
return service_account.Credentials.from_service_account_info(
json.loads(os.environ['GOOGLE_ACCOUNT_SERVICE_KEY']),
scopes=scopes
)
elif api_file:
@tedsecretsource I just published a new version v0.0.306 with the variable GOOGLE_ACCOUNT_KEY with the body of Google files.
This is a feature request to use a service account key that is defined in an environment variable. This is not a request to use the path to the service account key but to have the actual key in the environment.
Storing credentials on the filesystem can be problematic from a security perspective and for services like Heroku's Container stack, the credentials would have to be part of the repository in order to make it into a deployed production environment. This is because filesystems on the Container stack are "ephemeral".
I've worked around LangChain's GoogleDriveLoader file restriction with the following class override. Maybe it can help you?
I suspect the change would have to be made somewhere near here
Thanks. I'm looking forward to trying this out but not being able to store the whole key in the environment is a showstopper for me.
Ted