URLFetchService Migration

23 views
Skip to first unread message

Anthony Ananich

unread,
Nov 14, 2020, 5:32:07 PM11/14/20
to Google App Engine
Hi, All,

I wonder what is the right way to upgrade Java 8 code to Java 11 in case it is using the URL Fetch Java API?

Thanks,
Anthony Ananich

gonzalezwalter

unread,
Nov 15, 2020, 2:01:17 PM11/15/20
to Google App Engine
Hello, 

Unfortunately, URL Fetch is not supported by new runtimes such as Java 11 runtime. To authenticate requests between your applications you will need to implement other methods.

One way to implement authentication between service would be to use IAP (Identity Aware Proxy). Drawback of this approach is that you need to enable it for all App Engine modules in the project, so I would recommend splitting public and private services to use it. Then you could authenticate as default app engine service account from another app engine service using this code snippet.

Instead of enabling IAP you could validate the same Id tokens on the application using GoogleIdTokenVerifier

Reply all
Reply to author
Forward
0 new messages