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

[GEOS-11202] Respect proxy base URL when building CAS service URL. #7571

Merged
merged 1 commit into from May 14, 2024

Conversation

mbosecke
Copy link

@mbosecke mbosecke commented Apr 23, 2024

GEOS-11202 Powered by Pull Request Badge

The service URL built by the CAS extension now respects the proxy base URL (both the system property and the config value). I accomplished this by running the URL through ResponseUtils.buildUrl to ensure it ultimately goes through ProxifyingURLManger.

Furthermore, it also preserves the end-user's path and query parameters. This is to ensure that by the time the user is redirect back to the application from CAS, they will land on the original page they were trying to hit.

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

@mprins mprins added backport 2.24.x Instructs the bot to create a 2.24.x backport PR on merge backport 2.25.x labels Apr 24, 2024
@mprins
Copy link
Member

mprins commented Apr 27, 2024

please run mvn spotless:apply to fix formatting

Run the URL through ResponseUtils.buildUrl to ensure it ultimately goes through ProxifyingURLManger.
@mbosecke
Copy link
Author

I've now run mvn spotless:apply but squashed all my commits into one single one (hope that's okay).

@petersmythe petersmythe reopened this May 14, 2024
@petersmythe
Copy link
Contributor

Closing, reopening to trigger checks again

@aaime
Copy link
Member

aaime commented May 14, 2024

The PR was merged with many failing builds:

image

Now, the failure is due to API changes that are unrelated:

Error: 6,180 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project gs-main: Compilation failure
Error: 6,180 [ERROR] /home/runner/work/geoserver/geoserver/src/main/src/test/java/org/geoserver/test/http/MockHttpClient.java:[26,8] org.geoserver.test.http.MockHttpClient is not abstract and does not override abstract method setExtraParams(java.util.Map<java.lang.String,java.lang.String>) in org.geotools.http.HTTPClient

Still, this failure might be masking some other problem. Next time please rebase onto main and have the checks run once more.

@petersmythe
Copy link
Contributor

I don't understand, sorry. Minutes ago, there were only 10 (or 9?) checks, and they had all passed (after reopening the issue). I don't know why it shows 10/19 checks passed now.

@aaime
Copy link
Member

aaime commented May 14, 2024

You're right, it's odd... it's as if it merged two subsequent runs in one report...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.24.x Instructs the bot to create a 2.24.x backport PR on merge backport 2.25.x
Projects
None yet
4 participants