Connecting webapp to user's BigQuery project - google-app-engine

I have made a webapp using streamlit framework that can connect to BigQuery project of a user to fetch the required table and perform certain operations on it and result the output. Rightnow, we are getting the link to the authentication code on the command line. Since we are now planing to deploy the app on the google app engine, is there any way to authenticate a user some other way (other than getting authentication link on CLI since it wouldn't be possible after deployment on app engine).

Related

Create a aws Amplify app from source code

I have done one of the tutorial for aws amplify (the todo app). When it was done I had no more need for it so I deleted the application from the cloud.
Then one though hit me. If I have the source code locally (or hypothetically in git) for my amplify application, can't I somehow recreate the app in the cloud again from the source? if I understood it completely it is supposed to be infrastructure-as-code.
Currently, Amplify CLI doesn't support this.
Amplify is not an Infrastructure as Code.
From the AWS Documentation:
AWS Amplify is a set of tools and services that can be used together or on their own, to help front-end web and mobile developers build scalable full stack applications, powered by AWS. With Amplify, you can configure app backends and connect your app in minutes, deploy static web apps in a few clicks, and easily manage app content outside the AWS console.
Even if it's not supported, apparently there is some way to add services to the newly created Amplify from the existing Amplify backend.
https://github.com/aws-amplify/amplify-cli/issues/3505#issuecomment-597897873

Azure Communication Service - unable to run the quickstart app in Azure App Service

I'm currently working on setting up a ReactJs app and deploying it into Azure App Service. I followed the instructions provided in the below github url
https://github.com/Azure-Samples/communication-services-web-calling-tutorial
It's working fine locally. However, when I deploy it into Azure App Service (https://webcallingappnode.azurewebsites.net/), it fails with a 404 error as shown below.
in the github url, under Code Structure section, as shown below it says it uses a simple local server for token provisioning.
./webpack.config.js: Project bundler. Has a simple local server for
user token provisioning.
Does it mean it doesn't work after deployment to Production? If not, then how do I get it work?
As of right now, the sample you're using requires a backend service that is implemented to only work locally. You will need to implement the method to fetch a token.

Do I need to enable App Engine Admin API for deployment?

On GCP, I run Cloud Build from one project and deploy code to App Engine in another project. It looks like the project where build runs from needs to have App Engine Admin API enabled. Is it a real request or I missed the real configurations?
App Engine Admin API is required as it is used for any App Engine-related management operations
Also, based on the link above:
The Admin API provides you with:
An integration point for your development and build tools.
Tighter control around deploying new versions, including the ability to automate traffic
migration between two versions or traffic splitting across one or more versions.
The ability to programmatically manage applications across multiple Google Cloud projects.
So yes, if you plan on deploying code to App Engine using Cloud Build, you need GAE Admin API enabled.

How credential and google cloud storage work?

I am just starting to develop GAE web application. I am trying to get a list of bucket of google cloud storage. I found some code from web site.
there are 3 ways on the web what I found.
using Google storage API
https://code.google.com/p/google-api-java-client/source/browse/storage-serviceaccount-appengine-sample/src/main/java/com/google/api/client/sample/storage/appengine/serviceaccount/StorageSample.java?repo=samples&r=f0c6982b3cde8629511346641bfe4bb5eb28d73f
using Json liblary
but thsi sample needs to configure domain verification for bucket.
using python
our exisiting application is developped by gae for Java. I do not think thie python way can include in Java application.
then I would like to fix No1 way.
It show credential error. Buckets are authorized to everyone (All Authenticated Users )for now. I think I need to understand how the credential works. I have read the google developer page about 0Auth2. I could find a sample of bigquery. if you have a sample or good web sites about credential and google cloud storage, it will be great helpful.
the errors;
Error: com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential.(Ljava/util/Collection;)V
what i did at API console:
creating client id (web application, service account, installed application each)
creating Simple API Access ( new server key , new browser key)
what I did at local machine;
Set ACL with gsutil
my developing environment
eclipse 3.6 helios ( Japanese language pack)
gae java for eclipse
gae 1.8.0
java 1.6.31
google storage API
google client library
others(tomcat,maven)
windows 7 English with Japanese language pack
Your first attempt (number 1) is the best way to focus on getting this to work. The code sample Marc provided uses the built-in App Engine App Identity module to securely identify the App Engine app to other Google APIs: https://developers.google.com/appengine/docs/java/appidentity/#Asserting_Identity_to_Google_APIs
However, there are 2 gotchas to check:
The App Identity module will not work using the local devserver. When running locally there is no way for the local server to securely identity itself to Google production APIs - so you should either look at using a service account with a downloadable key for local testing, or, easiest option (and what I'd recommend for now), is to deploy into a production App Engine environment to test.
Make sure the App Engine service account email address is added to the access control list for the Google Cloud Storage bucket that you are trying to access. Get this email address by looking under the Admin Console (for your App Engine app) -> Application Settings:
Service Account Name:
xxxxxxx#appspot.gserviceaccount.com
To add this to a Google Cloud Storage access control list, either add it to the project team for the project that owns the Google Cloud Storage bucket, or, if you're not using the default access control settings, add it directly to an ACL:
https://developers.google.com/storage/docs/accesscontrol
Service accounts with downloadable key - use this for local testing if you can't test in a production App Engine environment:
https://developers.google.com/accounts/docs/OAuth2ServiceAccount

Project created from App Engine Console comes with less features compared with project created from Cloud Console

When I create a new Application from App Engine Console https://appengine.google.com/,
the application also appears on Cloud Console https://cloud.google.com/console#c=l
However, clicking into the project shows that only these features are included:
App Engine
BigQuery
Cloud Datastore
Compared with Project created directly from Cloud Console:
App Engine
Compute Engine
Cloud Storage
BigQuery
APIs
Cloud Datastore
Cloud SQL
That leads to problem that App Engine project is missing access to many features and there seems no obvious way to add them back later.
Any idea what's wrong here?
1,This only implies that when you create an application from app engine console, it directly creates 3 types of projects: app engine app, datastore instance and big query(i think you need to enable the api first) with the same project id. This does not mean you cannot use the other features. It only means you need to separately enable them and give project ids.
2, If you create a project from cloud console, then it will automatically create projects under all the 7 different categories with the same project ID
Finally I found how to do this:
Go to https://appengine.google.com/
Open your app
Open Administration / Application Settings
Click the button in the "Cloud Integration" section

Resources