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

Use gateway client attls status in eureka object to determine http vs… #583

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

1000TurquoisePogs
Copy link
Member

This PR builds upon #580 by altering the eureka object's status of https/http true/false dependent upon the status of the gateway's client attls setting.

This is because, client attls alters whether you must send a request as 'http' or 'https' in order to avoid double-tls, or no-tls situations.
In this PR, the app-server reports itself as 'http' if the gateway has client tls enabled, so that when the gateway contacts the app-server, it will HTTPS, as desired.

This logic does not consider the state of the app-server's server ATTLS setting, because whether server ATTLS is enabled or disabled, the app-server should always be HTTPS.

…send eureka message with compatible http/https information

Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
@1000TurquoisePogs 1000TurquoisePogs force-pushed the v3/use-client-attls-status-in-eureka branch from 4706d8a to 45a8953 Compare January 13, 2025 14:24
@pull-request-size pull-request-size bot added size/S and removed size/M labels Jan 13, 2025
lib/apiml.js Outdated
const clientGatewayAttls = process.env['ZWE_components_gateway_zowe_network_client_tls_attls'] == 'true';
const clientAttls = clientGlobalAttls || clientGatewayAttls;
this.isGatewayClientAttls = false;
if ((clientGlobalAttls !== false) && (clientLocalAttls !== false) && (!clientAttls)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see the clientLocalAttls definition is it a typo and should be clientGatewayAttls?
In that case i do not quite understand this condition, i believe it will never pass as clientGlobalAttls and clientGatewayAttls both are defined booleans. if both are true then clientAttls will always be true.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, this was a mistake of me copying over from the util.js function.
it's not going to have the same logic.

Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
@1000TurquoisePogs 1000TurquoisePogs merged commit b5af35b into v3.x/staging Jan 14, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants