Skip to content

Commit

Permalink
fix: v3 RC1 fixes (#3790)
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Pablo Hernán Carle <[email protected]>
Signed-off-by: Andrea Tabone <[email protected]>
Co-authored-by: Pablo Hernán Carle <[email protected]>
Co-authored-by: Andrea Tabone <[email protected]>
  • Loading branch information
3 people authored Sep 24, 2024
1 parent dff86b4 commit 749b6ad
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 7 deletions.
8 changes: 7 additions & 1 deletion api-catalog-ui/frontend/src/actions/user-actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@ function login(credentials) {
if (credentials.newPassword) {
showUpdatePassSuccess = true;
}
const dashBoardPath = '/dashboard';
dispatch(success(token, showUpdatePassSuccess));
history.push('/dashboard');
if (history.location.pathname !== dashBoardPath) {
history.replace(dashBoardPath);
window.location.reload();
} else {
history.push(dashBoardPath);
}
},
(error) => {
if (error.messageNumber === 'ZWEAT413E') {
Expand Down
6 changes: 3 additions & 3 deletions api-catalog-ui/frontend/src/actions/user-actions.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ describe('>>> User actions tests', () => {

userService.login = jest.fn().mockResolvedValue('token');

const pushSpy = jest.spyOn(history, 'push');
const replaceSpy = jest.spyOn(history, 'replace');

await userActions.login(credentials)(dispatch);

expect(dispatch.mock.calls[0][0]).toStrictEqual(expectedAction);

expect(pushSpy).toHaveBeenCalledWith('/dashboard');
expect(replaceSpy).toHaveBeenCalledWith('/dashboard');

pushSpy.mockRestore();
replaceSpy.mockRestore();
});

it('should logout', async () => {
Expand Down
2 changes: 1 addition & 1 deletion api-catalog-ui/frontend/src/components/App/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function App({ history }) {
exact
path={dashboardPath}
render={(props, state) => (
<BigShield>
<BigShield history={history}>
<AsyncDashboardContainer {...props} {...state} />
</BigShield>
)}
Expand Down
1 change: 1 addition & 0 deletions caching-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ spring:
output.ansi.enabled: always
main:
allow-circular-references: true
banner-mode: ${apiml.banner:"off"}

springdoc:
pathsToMatch: /api/v1/**
Expand Down
1 change: 1 addition & 0 deletions config/docker/caching-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiml:
service:
discoveryServiceUrls: https://discovery-service:10011/eureka/
hostname: caching-service
banner: console

server:
ssl:
Expand Down
1 change: 1 addition & 0 deletions config/local/caching-service-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ caching:
apiml:
service:
port: 10022
banner: console
spring:
profiles:
include: dev
2 changes: 2 additions & 0 deletions config/local/caching-service.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
apiml:
banner: console
jgroups:
bind:
port: 7098
Expand Down
1 change: 1 addition & 0 deletions config/local/gateway-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ apiml:
forwardClientCertEnabled: true
hostname: localhost
port: 10010
banner: console
eureka:
client:
serviceUrl:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"org.zowe.apiml.product.web",
"org.zowe.apiml.product.gateway",
"org.zowe.apiml.product.version",
"org.zowe.apiml.product.logging",
"org.zowe.apiml.security"
},
exclude = {ReactiveOAuth2ClientAutoConfiguration.class, GatewayReactiveOAuth2AutoConfiguration.class}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public MessageService messageService() {
messageService.loadMessages("/utility-log-messages.yml");
messageService.loadMessages("/common-log-messages.yml");
messageService.loadMessages("/gateway-log-messages.yml");
messageService.loadMessages("/security-common-log-messages.yml");
return messageService;
}

Expand Down
8 changes: 8 additions & 0 deletions gateway-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ spring:
registration:
okta:
redirectUri: "{baseUrl}/gateway/{action}/oauth2/code/{registrationId}"
main:
banner-mode: ${apiml.banner:"off"}

springdoc:
api-docs:
Expand Down Expand Up @@ -127,13 +129,19 @@ logging:
level:
ROOT: INFO
com.netflix: WARN
com.netflix.discovery: ERROR
com.netflix.config: ERROR
com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient: OFF
com.netflix.discovery.DiscoveryClient: OFF
org.springframework.cloud.gateway.filter: WARN
org.springframework.cloud.gateway.route: WARN
org.springframework.context.support: WARN
org.springframework.beans: WARN
org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: ERROR
reactor.netty.http.client: INFO
reactor.netty.http.client.HttpClientConnect: OFF
io.netty.util.internal.MacAddressUtil: ERROR # Can print WARN not finding usable MAC Address
io.netty.resolver.dns: WARN
javax.net.ssl: ERROR
org.apache.tomcat.util.net.SSLUtilBase: ERROR

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void givenValidZoweTokenWithLtpa() throws UnrecoverableKeyException, Certificate
}

@Test
void givenValidAccessToken() {
void givenValidPersonalAccessToken() {
String serviceId = "gateway";
String pat = personalAccessToken(Collections.singleton(serviceId));

Expand Down
2 changes: 1 addition & 1 deletion zowe-cli-id-federation-plugin/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
registry=https://zowe.jfrog.io/artifactory/api/npm/npm-org/
registry=https://registry.npmjs.org/
@zowe:registry=https://zowe.jfrog.io/zowe/api/npm/npm-release/

0 comments on commit 749b6ad

Please sign in to comment.