FISH-8054 Upgrade the OpenID Security Connector to 3.2 #6558
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The PR upgrades the Security Connector to expand the functionality of the OIDC Connector by enabling proxy configuration. This addition is crucial for scenarios where the application interacts with an OpenID Connect provider through a reverse proxy, offering more flexibility in handling requests.
Testing
Testing Performed
Install NGINX:
Download NGINX for Windows: Visit the NGINX website (nginx news ) and download the Windows version of NGINX.
Install NGINX: Follow the installation instructions provided with the downloaded package to install NGINX on your Windows machine. During the installation, choose the installation directory. For example, C:\nginx.
Edit NGINX configuration file: Locate the NGINX configuration file (
nginx.conf
) in the NGINX installation directory (typically found within aconf
directory). Edit the file using a text editor like Notepad or any other code editor.Update hostname & port: Locate the
http {
block within thenginx.conf
file and proceed to modify the NGINX port specified underserver → listen
. Additionally, within thelocation /
block, include the following key-value pairs prefixed withproxy_
. Specifically, useproxy_pass
to designate the host and port of the Payara instance.Create OIDC application:
Here, I am utilizing the following Google authentication definition, which has been registered in Google Cloud. Please note that the client secret is masked for security purposes:
In this configuration, the Proxy port is set to
8986
, while the Payara Server port remains the default8080
. Both theredirectURI
defined in the Google Cloud and within theGoogleAuthenticationDefinition
annotation are identical.To utilize this setup, please download the entire application from the following link: Download Application. Make necessary modifications to the configuration by adding your credentials.
Test Scenarios:
Here are several possible scenarios:
Existing Scenario:
Scenario 1:
redirectURI
employs the${baseURL}
placeholder, which defaults to${baseURL}/Callback
whenredirectURI
is not explicitly defined. Proxy definition is also absent.Outcome: The generated
redirectURI
should include the request's host and port. The registered Authorized Redirect URI in Google Cloud must contain a URL with the Payara Instance's host and port.Scenario 2:
redirectURI
is explicitly defined with the Payara Instance's host and port, while Proxy definition is not present.Outcome: The registered Authorized Redirect URI in Google Cloud must contain a URL with the Payara Instance's host and port.
New Scenarios with Proxy:
Scenario 3:
redirectURI
employs the${baseURL}
placeholder, defaulting to${baseURL}/Callback
whenredirectURI
is not explicitly defined. Proxy definition is included.Outcome: The generated
redirectURI
should include the proxy's host and port. The registered Authorized Redirect URI in Google Cloud must contain a URL with the proxy's host and port.Scenario 4:
redirectURI
is explicitly defined with the Payara Instance's host and port, and Proxy definition is also present.Outcome: The registered Authorized Redirect URI in Google Cloud must contain a URL with the Payara Instance's host and port.
Scenario 5:
redirectURI
is explicitly defined with the Proxy's host and port, and Proxy definition is included.Outcome: The registered Authorized Redirect URI in Google Cloud must contain a URL with the proxy's host and port."
Related PRs
payara/ecosystem-security-connectors#278
Documentation
payara/Payara-Documentation#390