Firestore security rules and environment variables - google-cloud-firestore

It is possible to define environment specific variables for Firestore Security rules? Just like it is possible for Firebase Cloud Functions.

No, it is not possible out of the box as of now (Jan 6th 2023). I had to write a custom webpack plugin for this purpose.

Related

What is the easiest way to fetch data dynamically from a cloud storage to a flutter app

I am looking for a way to fetch data to my flutter app which can be adjusted and modified dynamically after deploying the app. As an example, if I want to change the images of the carousel depending on promotions or launch new books to the digital library. I need an economic option to host the data in cloud storage and fetch it from there.
I have considered firebase as well as google drive, but have yet to find a good guide. being a beginner and having concerns about security I want some expert advice if possible.
*edit-
Seeing many a tutorial I assume there is no better way than linking file URLs from the
Cloud Storage. So to dynamically change those is it possible to refer the URLs to some excel sheet fields to obtain URLs. Those fields can certainly be adjusted then without any hard coding. but the question is how to refer to such a sheet file? *
I also want to segregate the users into paid and free users, I have successfully proceeded with the authentication with firebase but still don't understand(I do have some concepts but don't know where to do that) how to put them in groups and impose limitations on them about accessing the data. any guidance, links and helpful advice will be cordially appreciated.
According to what you are looking for, I highly recommend you to use Firebase Remote Config, which is a cloud tool that allows you to modify your app's functionality and appearance without forcing users to download an update. You define in-app default values that control the functionality and appearance of your app when you use Remote Config. Then, for all app users or for subsets of your user base, you may utilize the Firebase console or the Remote Config backend APIs to modify in-app default values.
Your program can control when updates are applied, and it can check for updates regularly and apply them with minimal performance impact.
Remote Config comes with a client library that takes care of essential functions like fetching parameter values and caching them while still allowing you to manage when new values are active and how they affect the user experience in your app.
Here is a tutorial that uses Flutter and Firebase Remote Config that could also help you.

How to read SAP Cloud Platform User-Provided Variables from a SAPUI5 app?

I was looking for a way to read the User-Provided Variables using JavaScript from a SAPUI5 app.
I've seen examples for node.js and Java, but those don't apply to a SAPUI5 app.
The node.js "version" requires a #sap/xsenv package that unfortunately I don't seem to be able to include in my app.
I'd like to read those variables from a SAPUI5 controller.
Has anyone done that before?
You need to write an action on your backend application.
And this action needs to read environment variables from directly app or via using CF API and must return that to you as response.
You should not read directly anything using CF credentials in a frontend application.

How to configure TYPO3 extension over a backend module?

I'm developing an extension for TYPO3 8.7 that queries an API for some data.
The frontend part works, although the API is called live at the moment.
Now I'd like to build a little backend module in which the integrator can at least manage the API credentials. Maybe also storage PIDs and other settings.
I guess storing data like these is usually done using TypoScript(?), but it would be nice to have a interface for storing settings of all kinds.
I rather guess I could create a database table and access it in the backend and frontend on a low level.
But before I do so I'd like to ensure that there is no other, designated way to do so. Maybe interact with the settings array somehow or whatnot.
I thought that storing configuration data would be a common usecase for backend modules. But I could not find any example for this.
Am I mislead about the usage of backend modules somehow?
TYPO3 Provides a Lot of Configuration Options.
in the Extension Manager
this allows you to set settings on a Systemwide Basis.
allows you to Set extension settings. using the ext_conf_template.txt this is easy for extension developers. and only accessible by admins. https://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/ConfigurationOptions/Index.html
Typoscrip Contants
this allows you to set configuration on a page basis, this is a great choice if you setup different settings on diffrent pages. or have a mutlipe sites in one TYPO3 Installation. there is an Interface "Constants Editor" in the Template Module which allows editors to set the settings of the constants.
Plugin / Flexform
the most common way an editor configures some settings. but they have to repeat them for every plugin.
Backend Modules
Backend modules are Designed for mor Complex task like manageing a News workflow. or giving inside-view into some process (status reports etc.) of cours they could be used to just store some simple settings. but its uncommen. and clutters the TYPO3 Backend Interface.
AdditionalConfiguration.php / ext_localconf.php this allows you to set very Low Level Configuration. if your configuration needs to be Availible only to Developer or needs to be Present in an Eary Bootstrapping Phase of TYPO3 this is a good choice
I your case, I would create a simple backend module and store the credentials in the Registry. This is easy to explain to the customer and you have the possibility to give access to that module to special user groups. By using the registry there's no need to create custom Tables.
Guide on how to create a backend module : https://docs.typo3.org/typo3cms/ExtbaseFluidBook/10-Outlook/2-Backend-modules.html
Guide on the Registry: https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/SystemRegistry/Index.html

can I add custom nested CloudFormation stack to AWS Amplify OR can I create a custom Lambda function/SQS with GraphQL/AppSync?

Spending more than a day I doubt the answer is Yes.
Want to double check though.
Creating Lambda functions is possible with REST APIs. But I need it with GraphQL. As I understand, currently creating Lambda function from CLI for GraphQl is not supported - right ?
In my app one party places an order => mutates DynamoDB table Orders => DynamoDB triggers a Lambda function that in turn mutates DynamoDB table Offers (changes offer's status). This change should notify subscribed parties.
I could do it in a separate Lambda function or in a Lambda function that serves as a Resolver. But either way I do not see a way of doing it using AWS Amplify.
Resolver Lambda function should also be manually added in console (providing Lambda ARN). Is there a way of adding it using CLI or config files or nesting a CloudFormation stack template ?
I know I can do all manually in console. But I need to find a way using AWS Amplify so that I have a parent and nested CloudFormation stack templates.
Possible workaround I see is:
setting up GraphQL API using AWS Amplify;
setting up rest of the serverless environment with AWS SAM or Serverless Framework;
have to manually connect (in console) Lambda and SQS with AppSync's DynamoDB.
Is my understanding correct? Is there a better way than this workaround ?
I am building my front end app in React. This AWS Amplify page shows how resources such as SQS can be created for iOS. Is there anything similar for React ?
Thank you

Google Cloud SQL : Change to second generation possible?

I have a working system using the Google App Engine including a Cloud SQL Database instance of the first generation. Is it possible to switch the database instance to the second generation?
Thanks!
On top of the previous answer, you can facilitate the Export/Import functions available by default to transfer the data.
Note that a lot of work is required to the code if you transfer to the second generation.
No, it is not possible to change the type of an existing instance, a new instance must be created.