fix: Fix URLs for onboarding when AT-TLS is enabled #4169
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
This PR fixes the configuration of URLs (ie. Swagger) in AT-TLS mode. It is necessary to understand that the API Catalog uses the same URL as the service provides. It means the service should decide if the Swagger URL is http or https based on the existence of a TTLS outbound rule from the Gateway to the service.
This PR modifies the configuration to define ATTLS enabled for client (outbound rules) and server (inbound rules) in parallel to respect
zowe.yaml
configuration.There are multiple issues:
type 1:
api-layer/api-catalog-services/src/main/resources/application.yml
Lines 163 to 167 in d1b6972
The configuration of the URL is based on server configuration, which is not true because the protocol should be changed based on an outbound rule. Usually, both sides are configured together, so it is more complicated to find it.
type 2:
There is no way to configure the protocol at all. The AT-TLS profile does not override it:
https://github.com/zowe/api-layer/blob/d1b697258ccd7bf6aa65523984b8a95dcddee16c/gateway-service/src/main/resources/application.yml#L29-34
https://github.com/zowe/api-layer/blob/d1b697258ccd7bf6aa65523984b8a95dcddee16c/gateway-service/src/main/resources/application.yml#L191-206
Linked to # (issue)
Part of the # (epic)
Type of change
Please delete options that are not relevant.
Checklist:
For more details about how should the code look like read the Contributing guideline