Comments (10)
Seems like we can use the Firebase CLI to do this. So either a post-script thing or writing our own ComponentResource
to do subprocess it out to the CLI
from cdp-backend.
This is now possible with the Pulumi 3.0 Google Native Provider:
https://www.pulumi.com/docs/reference/pkg/google-native/firebaserules/v1/ruleset/
I attempted it but it is finicky and tricky to get right / I may have been doing something incorrectly. Going to hold off until needed for research queries.
from cdp-backend.
Firestore public read rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read: if request.auth == null;
}
}
}
Firebase storage public read rules:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read;
}
}
}
from cdp-backend.
Looks like the process for this will be:
- create the rulesets with: https://www.pulumi.com/docs/reference/pkg/google-native/firebaserules/v1/ruleset/
- use the rulesets in https://www.pulumi.com/docs/reference/pkg/google-native/firebaserules/v1/release/
It seems they may have updated the docs but it seems a bit more doable considering we can dump the text contents to a File object.
from cdp-backend.
Got it working! 🎉
I ditched trying to get Pulumi ruleset working and went with a simple node script
from cdp-backend.
Alright. I thought I had it working but when doing thorough testing, I saw that was failing to initialize the Firestore Security Rules.
Everything runs through just fine, all resources are technically created but Firestore Security Rules aren't being applied. They will only apply after visiting the Firestore Security Rules Web UI and then rerunning the set-public-read script. In some cases, I get an "entity does not exist" error.
I opened a ticket with Firebase Support so hopefully I will hear back soon.
from cdp-backend.
Was attempting to pull transcript files from bucket but ran into permissions error, apparently true public read isn't set on the bucket unless you have a bucket iam policy set:
# Set full public read on bucket
self.storage_public_read = storage.BucketIamPolicy(
f"{self.gcp_project_id}-storage-public-read",
bucket=self.firestore_app.default_bucket,
bindings=[
storage.BucketIamPolicyBindingsItemArgs(
role="roles/storage.objectViewer",
members=["allUsers"],
),
],
opts=pulumi.ResourceOptions(parent=self.firestore_app),
)
from cdp-backend.
Tracking with Firebase support and pulumi/pulumi-google-native#196
from cdp-backend.
Also needs a CORS rule: https://firebase.google.com/docs/storage/web/download-files#download_data_via_url
from cdp-backend.
Parts of this (specifically the CORS) may be able to be completed with a Dynamic Provider: https://www.pulumi.com/blog/dynamic-providers/
from cdp-backend.
Related Issues (20)
- Add params to event gather pipeline to allow long-runnable and log errors / skipped events
- Investigate / fix m3u8 processing...
- Google Speech-to-Text SR Model raises a confusing attr error instead of a defined error when Google runs into an issue
- Parse closed caption files for Oakland better HOT 13
- Hackathon Cleanup: Audio/Video Clipping
- Accept timestamps and only process a subset of a video as an event HOT 13
- Allow ability to flag Events as "try to scrape again next time" and do so on the next CRON run
- Filter out bad caption files
- Issue with deploy-infra action on 3.2.4 due to missing ffmpeg HOT 1
- Issue with deploy-infra action on 3.2.5 due to missing webvtt HOT 2
- Allow meeting minutes to be processed like a transcript
- Re-enable m3u8 and vimeo file utils resource copy tests HOT 1
- Duplicate Persons in cdp-seattle instance HOT 7
- Docker Images
- Break up Event Gather Pipeline HOT 1
- Cannot store and transcribe multiple videos that are clipped via the video_start_time and video_end_time event params
- Reduce complexity of event gather pipeline HOT 4
- MP4 Videos Unnecessarily Encoded During Trim HOT 3
- Inefficient usage of requests.get for very large videos causes event gather to fail
- deploy-infra - problem when Firestore database created in deprecated Datastore Mode HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdp-backend.