Skip to content

Commit 47641cd

Browse files
authored
Merge pull request #25 from imesh94/fix/revert-proxy-change
Revert changes done for introducing a gateway proxy to infosec endpoints
2 parents ef576f1 + c20855a commit 47641cd

File tree

16 files changed

+26
-596
lines changed

16 files changed

+26
-596
lines changed

components/org.wso2.openbanking.cds.gateway/src/main/java/org/wso2/openbanking/cds/gateway/handlers/InfoSecDataPublishingHandler.java

-188
This file was deleted.

components/org.wso2.openbanking.cds.gateway/src/main/java/org/wso2/openbanking/cds/gateway/utils/GatewayConstants.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@ private GatewayConstants() {
9191
public static final String WELL_KNOWN_API = "WellKnownAPI";
9292
public static final String PAR_API = "PARAPI";
9393

94-
public static final String TOKEN_ENDPOINT = "/token";
95-
public static final String AUTHORIZE_ENDPOINT = "/authorize";
96-
public static final String JWKS_ENDPOINT = "/jwks";
97-
public static final String USERINFO_ENDPOINT = "/userinfo";
98-
public static final String REVOKE_ENDPOINT = "/revoke";
99-
public static final String INTROSPECTION_ENDPOINT = "/token/introspect";
100-
public static final String PAR_ENDPOINT = "/par";
101-
public static final String WELL_KNOWN_ENDPOINT = "/.well-known/openid-configuration";
94+
public static final String TOKEN_ENDPOINT = "/oauth2/token";
95+
public static final String AUTHORIZE_ENDPOINT = "/oauth2/authorize";
96+
public static final String JWKS_ENDPOINT = "/oauth2/jwks";
97+
public static final String USERINFO_ENDPOINT = "/oauth2/userinfo";
98+
public static final String REVOKE_ENDPOINT = "/oauth2/revoke";
99+
public static final String INTROSPECTION_ENDPOINT = "/oauth2/introspect";
100+
public static final String PAR_ENDPOINT = "/api/openbanking/push-authorization/par";
101+
public static final String WELL_KNOWN_ENDPOINT = "/oauth2/token/.well-known/openid-configuration";
102102
public static final String REGISTER_ENDPOINT = "/register";
103103
public static final String REGISTER_CLIENT_ID_ENDPOINT = "/register/{ClientId}";
104-
public static final String CDR_ARRANGEMENT_ENDPOINT = "/{cdrArrangementId}";
104+
public static final String CDR_ARRANGEMENT_ENDPOINT = "/arrangements/1.0.0";
105105
public static final String DISCOVERY_OUTAGES_ENDPOINT = "/discovery/outages";
106106
public static final String DISCOVERY_STATUS_ENDPOINT = "/discovery/status";
107107
public static final String PRODUCTS_ENDPOINT = "/banking/products";

components/org.wso2.openbanking.cds.gateway/src/test/java/org/wso2/openbanking/cds/gateway/handlers/InfoSecDataPublishingHandlerTest.java

-138
This file was deleted.

components/org.wso2.openbanking.cds.gateway/src/test/resources/testng.xml

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<class name="org.wso2.openbanking.cds.gateway.executors.core.CDSAPIRequestRouterTest"/>
2828
<class name="org.wso2.openbanking.cds.gateway.throttling.CDSThrottleDataPublisherImplTest"/>
2929
<class name="org.wso2.openbanking.cds.gateway.mediators.GatewayErrorMediatorTest"/>
30-
<class name="org.wso2.openbanking.cds.gateway.handlers.InfoSecDataPublishingHandlerTest"/>
3130
<class name="org.wso2.openbanking.cds.gateway.executors.reporting.CDSCommonDataReportingExecutorTest"/>
3231
<class name="org.wso2.openbanking.cds.gateway.executors.header.validation.CDSHeaderValidationExecutorTest"/>
3332
<class name="org.wso2.openbanking.cds.gateway.executors.jwt.authentication.JWTAuthenticationExecutorTest"/>

components/org.wso2.openbanking.cds.identity/src/main/java/org/wso2/openbanking/cds/identity/filter/InfoSecDataPublishingFilter.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,10 @@ public void destroy() {
263263
public boolean shouldPublishCurrentRequestData(ServletRequest request) {
264264

265265
// If the request is internal traffic, no need to publish data
266-
return expectedExternalTrafficHeaderValue.equalsIgnoreCase(
267-
((HttpServletRequest) request).getHeader(externalTrafficHeaderName));
266+
if (request instanceof HttpServletRequest) {
267+
return expectedExternalTrafficHeaderValue.equalsIgnoreCase(
268+
((HttpServletRequest) request).getHeader(externalTrafficHeaderName));
269+
}
270+
return false;
268271
}
269272
}

0 commit comments

Comments
 (0)