-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCS config for ActiveStorage requires presence of file gcs.keyfile #31586
Comments
You can provide a Hash of keyfile data: gcs:
service: GCS
credentials:
type: "service_account"
project_id: ""
private_key_id: ""
private_key: ""
client_email: ""
client_id: ""
auth_uri: "https://accounts.google.com/o/oauth2/auth"
token_uri: "https://accounts.google.com/o/oauth2/token"
auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs"
client_x509_cert_url: ""
project: ""
bucket: "" |
|
I agree that the default permissions required for activestorage on GCS seem weird. |
@hot-cheese I just hit the same problem. It appears to be due to the design of google-cloud-ruby client and not activestorage - googleapis/google-cloud-ruby#1588 (comment) |
It seems that the underlying library has committed an option to skip the need for list_bucket permissions:
|
Steps to reproduce
File
storage.yml
contains example configurations for S3 and GCS:To configure S3 you just need to fill values in yaml and you can do it conveniently via
Rails.application.credentials
. GCS configuration is more troublesome as it requires a path to file inkeyfile
and this file needs to be uploaded without the usage of VCS. It creates a problem in services like Heroku, where all files come only from VCS.Expected behaviour
That would be great if there was a key for the value of
gcs.keyfile
, for examplekeyfile_json
instead ofkeyfile
which requires path ofgcs.keyfile
.System configuration
Rails version: 5.2.0.beta2
Ruby version: 2.4.2
The text was updated successfully, but these errors were encountered: