Skip to content
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

Problem with App Engine Java with new HTTP Connector - It's return status 403. "Error: !Secure" #251

Closed
suttiwat opened this issue Jul 18, 2024 · 7 comments
Assignees

Comments

@suttiwat
Copy link

suttiwat commented Jul 18, 2024

Refer to "Google App Engine Java new performant HTTP connector" document. https://github.com/GoogleCloudPlatform/appengine-java-standard/blob/main/httpconnector.md

So I decide to test with my app. After I add this below properties into appengine-web.xml

property name="appengine.use.httpconnector" value="true"

and then re-deploy the service. Perform testing by HTTP GET on the browser, it's return status 403. And display the message: Error: !Secure" on the browser.

So I have revert it by change the value from 'true' to 'false' and re-deploy everything work as usual.

My environement is below ...
Runtime: java17
Using app-engine-apis: true
on F4 instance, automatic scaling.

Anybody has this kind of issue like me?

@ludoch ludoch self-assigned this Jul 18, 2024
@ludoch
Copy link
Collaborator

ludoch commented Jul 18, 2024

Thanks for the report, looking!

@ludoch
Copy link
Collaborator

ludoch commented Jul 18, 2024

While we investigate, there is another setting you can try that will help us:
By default Java17 still uses jetty9.4. There is another flag to move to Jetty12:
Please add

<system-properties>
        <property name="appengine.use.EE8" value="true"/>
 </system-properties>

That will keep javax.servlet.* APIs, but move to Jetty12. Since the code path is a bit different, it would be nice to see if you see the same issue.

@suttiwat
Copy link
Author

Thank Ludoch, As I checked from https://cloud.google.com/appengine/docs/standard/java-gen2/upgrade-java-runtime As I see from the "Java runtime compatibility" table , I don't see Java 17 with Jetty 12 is listed in the table.

Screenshot 2024-07-18 at 19 52 15

The question is, If I add properties "appengine.use.EE8" and set it to true on Java 17. Is it supported configuration in Production environment? I'm worry, because it's not list in the table. I need to run my server app on supported production environment without any risk. So please make sure on this. I've no plan to update to Java 21 yet.

I will be feel good and safe if that table included Java 17 and Jetty 12 on the list. :)

@ludoch
Copy link
Collaborator

ludoch commented Jul 18, 2024

Ack!

@suttiwat
Copy link
Author

suttiwat commented Jul 19, 2024

Hi Ludoch , After I added property "appengine.use.EE8" (jetty 12) to my test service. Now it's running as expected with new HTTP connector. No return 403 as I seen right now.

So Refer to my previous comment above, If I use "appengine.use.EE8" with Java 17 , it's in supported production environment right? No side effect or any risk? So that I will apply this to my production environment next.

Waiting for your confirmation.

Thanks Ludoch

lachlan-roberts added a commit that referenced this issue Jul 19, 2024
…etty9.4 runtimes

Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
@ludoch
Copy link
Collaborator

ludoch commented Jul 19, 2024

The last PR should do the fix for Jetty94 path (default in Java17).
For EE8 on Java17, the intent is to make it public, pending some extra internal probers we need to put in place. You should not see app behavior differences or they would be very similar to EE8 and Java21, as the EE8 code base is identical for both JDKs.

@ludoch ludoch closed this as completed Jul 19, 2024
@ludoch
Copy link
Collaborator

ludoch commented Jul 26, 2024

The fix is now propagating to production environment (currently 65%, eta before end of the weekend)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants