How To Access REST Web-service Deployed In My Instance?

42 views
Skip to first unread message

Peter Cheung

unread,
Jun 22, 2020, 6:17:17 AM6/22/20
to Google App Engine
I have a REST end-point (POST) in the application (written in Java) that was deployed successfully. I am able to access and get successful response when the service is running locally. However, the connection was refused when I tried accessing the same end-point (with SoapUI using HTTPS). I wonder if there's step that I miss setting up(such as, authorization). Thanks.

Olu

unread,
Jun 22, 2020, 9:45:08 AM6/22/20
to Google App Engine
Can you write out the exact Connection error and error code that you got? I wonder if your application is set up to listen appropriately on Port 8080.

I understand Requests passed to your application on App Engine through the Nginx Proxy would fail if your application stopped listening to Nginx on port 8080[1], or your application is not properly setup to handle requests [2]. 

The App Engine front end requires that your application code is listening on 8080[3].

Peter Cheung

unread,
Jun 22, 2020, 12:11:19 PM6/22/20
to google-a...@googlegroups.com
I set the server port in 'applicationl.yml' to be 8080, that was I assumed to be (couldn't find the message in log the port that the service was listening to).


I changed to access the standard HTTPS port 443 in the REST request, then I got the 401 eror:
  • Mon Jun 22 11:54:19 EDT 2020:DEBUG:Receiving response: HTTP/1.1 401
  • Mon Jun 22 11:54:19 EDT 2020:DEBUG:Connection can be kept alive indefinitely
  • Mon Jun 22 11:54:19 EDT 2020:DEBUG:Target requested authentication
  • Mon Jun 22 11:54:19 EDT 2020:WARN:Authentication error: Unable to respond to any of these challenges: {} 

I wonder if someone could provide the info of what authorization credential is needed to be provided in the REST request please? Thanks.

Virus-free. www.avast.com

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/c58bea2d-650b-4b83-b1f9-48918fb7e077o%40googlegroups.com.

George V. (Google Cloud Platform Support)

unread,
Jun 23, 2020, 6:18:33 AM6/23/20
to Google App Engine
Please keep in mind that authentication and authorization is two different things. Authentication is  "Authorization refers to the process of determining what permissions an authenticated client has for a specific resource." 

That being said authentication identifies who you are, and authorization determines what you can do. Here you may find multiple authentication methods suited for different use cases. 
From what I understand the most suited for your case is "Authentication between services". Let us know if that was helpful.
Reply all
Reply to author
Forward
0 new messages