Hi Pedro, an example JSON key file would look similar to the following one:
{ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs ", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": ..., "client_id": ..., "client_x509_cert_url": ..., "private_key": ..., "private_key_id": ..., "project_id": ..., "token_uri": "https://oauth2.googleapis.com/token", "type": "service_account" } If it doesn't work maybe double check if the service account actually has enough credentials to access the bucket? You might also want to check the Google specific code for COG, it's just a couple of classes, might give you a hint about the necessary credentials: https://github.com/geosolutions-it/imageio-ext/tree/master/plugin/cog/cog-rangereader-gs/src/main/java/it/geosolutions/imageioimpl/plugins/cog Cheers Andrea On Sat, Nov 5, 2022 at 8:19 PM Briones Garcia, Pedro <p...@tragsa.es> wrote: > Hi everyone. > > > > Could someone tell me what credentials do I need to provide GeoServer to > draw correctly an image mosaic whose granules are stored in a *Google > Cloud Storage (GCS) private bucket, *and how to store them? > > > > I have created without problems an image mosaic whose granules (GeoTIFF > COG files) are stored in a public Google Cloud Store bucket, modifying > LOCATION field in SHAPEFILE index file with the remote URLs of COG files > (https://...). But when it comes to a *private bucket*, I can create the > mosaic but it renders black, as if GeoServer doesn’t know how to reach the > files or wich credentials to use. > > > > I have tried, unsuccessfully, creating a system environment variable as > stated in > https://docs.geoserver.org/latest/en/user/community/cog/cog.html?highlight=store#google-cloud-storage-configuration, > given the path to a JSON service account > <https://cloud.google.com/iam/docs/creating-managing-service-account-keys> > file created in Google Cloud Storage. I am no sure if my JSON service > account file is the same “key-file“ documentation refers to. > > > > I too have tried adding user/password to mosaic.properties and > indexer.properties files, unsuccessfully too, althoug documentatios says > that it is no possible in the case of Google Cloud: > > · CogUser=xxx > > · CogPassword=yyy > > > > How to Tell GeoServer the credentials to access a GCS private bucket? What > type of credentials (it seem that user/password doesn’t work) do I need to > provide GeoServer and how (where to put he credentials, wich file to > edit…)? Any example of key file? > > > > Thanks in advance. > > > > Un saludo. > > [image: > https://www.tragsa.es/SiteCollectionImages/Relaciones%20Institucionales%20(Prensa)/FIRMA%20OUTLOOK/45_anios_tragsatec.png] > > *Briones Garcia, Pedro * > JGAP Sist Inform Geográfica > S.Información Geográfica / G.Sist.Inf. Geografica > > Grupo Tragsa - SEPI > > > > Calle Julián Camarillo 6B - 28037 Madrid > Tel.: 913226489 - 88216 - Fax: 913226005 > p...@tragsa.es > *www.tragsa.es * <https://www.tragsa.es/> > > > > > *AVISO LEGAL * <https://www.tragsa.es/es/Paginas/aviso-legal-correo.aspx> > > > *POLITICA DE PRIVACIDAD, de conformidad con el Reglamento UE 2016/679 y la > Ley Orgánica 3/2018 * > <https://www.tragsa.es/es/Paginas/politica-privacidad-correo.aspx> > > > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to > this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://bit.ly/gs-services-us for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions Group phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 https://www.geosolutionsgroup.com/ http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users