-
Notifications
You must be signed in to change notification settings - Fork 26
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
Developer: add generative-ai-app-builder client REST api developer config - ideally in spring boot #562
Comments
Macbook pro 16 M1 running springsource tool suite 4.13.1 - JDK 17.0.5 Add stub endpoint to spring boot app Follow Setup a service account on the genai project, set the GOOGLE_APPLICATION_CREDENTIALS env variable ![]() First reauthenticate gcloud locally
https://cloud.google.com/sdk/auth_success
set quota project as i was using ADC https://cloud.google.com/docs/authentication/provide-credentials-adc
Create Service Accounthttps://cloud.google.com/iam/docs/service-accounts-create
Add roles to SA
Create Service Account Keyhttps://cloud.google.com/iam/docs/keys-create-delete#creating
Export key
Add service account impersonationhttps://cloud.google.com/docs/authentication/use-service-account-impersonation IAM is enabled on the project serviceAccountTokenCreator is on your user roles suspect I need to add to the SA list - my user - I do check access for user
check SA
|
Use ADC credentials via SAhttps://cloud.google.com/docs/authentication/client-libraries set maven add to pom.xml as usual
Run a GCP GCS example
|
Working ADC GCP for GCS example from above ![]() |
Adding alternate direct File classloader (no ENV variable) - requested by customer (tomcat war) - but this example is spring boot jar with embedded tomcat
https://cloud.google.com/bigquery/docs/authentication/service-account-file |
Revisit curl for bigquery Follow for bigquery dataset creation start
ADD service account impersonationhttps://cloud.google.com/docs/authentication/use-service-account-impersonation create service account ![]() impersonate at the ADC level for SDKs
![]() check before
impersonate at the cli level
Switch to curlget the token from the previous auth request
|
Query bucket list using service account impersonation for a CURL REST callhttps://cloud.google.com/storage/docs/listing-buckets#rest-list-buckets
|
updating for in-place ADC in eclipse via the resources section of the jar/war http://127.0.0.1:8080/nbi/swagger-ui.html#/application-service-controller/getGCPViaFileUsingGET
json file checked into
|
https://github.com/ObrienlabsDev/rest-client-java/tree/main
|
Google Cloud Functions - HTTPS endpoint
https://github.com/ObrienlabsDev/rest-client-java/tree/main
|
See https proxy ENV variables set for java apps in ObrienlabsDev/rest-client-java#1 (comment) |
https proxy settings must be at the war/jar classloader level to allow for AD authentication via System.setProperty() |
obrienlabs/magellan#26
see HttpClient in #645
https://github.com/ObrienlabsDev/rest-client-java/tree/main
Client request: generative-ai-app-bulder (Vertex AI search and conversation) REST API usage from containerized spring boot app
Review use of ADC with the client https://cloud.google.com/docs/authentication/provide-credentials-adc
ADC is used by https://github.com/cloud-quickstart/gcp-landing-zone/blob/main/gcp-landing-zone-deploy/src/main/java/zone/gcp/landing/Cli.java#L74
verify firewall as well - 443/8443 for https and https://www.gstatic.com/ipranges/goog.json for IPs
Require both local dev (STS eclipse) and containerized auth/configs/API(open API/swagger) setup
https://cloud.google.com/generative-ai-app-builder/docs/locations#specify_a_multi-region_for_your_data_store
see #559
The text was updated successfully, but these errors were encountered: