-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
List of storage objects #41
Comments
I will check this point. |
Yes, I understand that. With all these platform-specific references, it's really not easy to keep track. |
This feature is not solvable: Unfortunately, this REST API is not available for using the Firebase token ID. When I try the Rest API with Firebase token retrieved from the Firebase Auth, I get "unauthenticated error" 401. This REST API would require a Google Auth 2.0 Token (That is different from the Firebase token ID). To get such a token, we would need admin credentials from a service account to your Firebase project. You should never deploy this admin credentials within a client application. Of course, you could build this way a service application for your internal use. This application is out of scope for FB4D because it is too dangerous that somebody delivers the admin credentials within a client application to their customers. Unfortunately, my explanations in the introduction of the wiki to the Storage (https://github.com/SchneiderInfosystems/FB4D/wiki/Getting-Started-with-FB4D#first-steps-with-the-storage) are still valid. I have written now a change request to the Firebase support but I'm skeptical. I'm uncomfortable to have no better solution. |
All right. Thank you very much for the detailed explanations. |
I will check this approach. Thank you |
My problem is that this REST API does not work for Firebase user tokens. See my question here: https://stackoverflow.com/questions/73584914/how-do-i-get-access-to-google-cloud-storage-services-with-a-firebase-user
This approach only works for me if I set the permission on the storage bucket for allUser in the Cloud Console (not in the Firebase Console). But this makes the bucket publicly readable. I don't think this is a solution. |
For me, this works :
|
You can use custom claims to write a rule that only super admin users can list the storage, or you can ask in the rules if the user is [email protected] for example and allow in this case to list the bucket. Also, the allow list rule is there : https://firebase.google.com/docs/storage/security/core-syntax. |
Have you manually set the permission on the storage bucket for allUser? Then my understanding is that the Storage Rules are bypassed. Can you check this point? How you can check custom claims in the rules? |
In my case, I have written a rule to allow to an email super user ( [email protected] ) to be able to list files. Example : But in a future, I want to set custom claims for this super admin users ( via Admin SDK ), for example, if I set a custom claim like : superadmin = true, in the storage rules I can use it : allow list: if request.auth.token.superadmin == true; |
I got some answers from the google cloud community staff to my question relating Cloud Storage API usage with Firebase Auth: https://www.googlecloudcommunity.com/gc/Security/How-do-I-get-access-to-Google-Cloud-Storage-services-with-a/td-p/462542 I would like to try the Javascript solution and analyse the network communication. Unfortunately, I’m currently completely overloaded with the work on Vision ML Interface showing at the next EKON in Düsseldorf, Germany. |
I miss the possibility to retrieve a list of files in a specific storage folder.
An addition to the storage library for this would be fabulous.
The corresponding API function exists (https://cloud.google.com/storage/docs/json_api/v1/objects/list?hl=en).
The text was updated successfully, but these errors were encountered: