Skip to content

Commit

Permalink
chore: Upgrade v1 dependencies (#3529)
Browse files Browse the repository at this point in the history
* upgrade dependencies

Signed-off-by: at670475 <[email protected]>

* fix

Signed-off-by: at670475 <[email protected]>

* upgrade dependencies

Signed-off-by: at670475 <[email protected]>

* upgrade dependencies

Signed-off-by: at670475 <[email protected]>

* upgrade dependency

Signed-off-by: at670475 <[email protected]>

* upgrade deps

Signed-off-by: at670475 <[email protected]>

* upgrade Bouncy Castle

Signed-off-by: Pavel Jares <[email protected]>

* fix NPM

Signed-off-by: Pavel Jares <[email protected]>

---------

Signed-off-by: at670475 <[email protected]>
Signed-off-by: Pavel Jares <[email protected]>
Co-authored-by: Pavel Jares <[email protected]>
  • Loading branch information
taban03 and pj892031 authored May 6, 2024
1 parent 5c12125 commit a208515
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 145 deletions.
94 changes: 47 additions & 47 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1044,50 +1044,50 @@ jobs:
- uses: ./.github/actions/teardown

PublishResults:
needs: [CITests,CITestsWithInfinispan,CITestsZosmfRsu2012,CITestsWithRedis,CITestsInternalPort]
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- uses: ./.github/actions/setup
with:
jdkVersion: 11

- uses: actions/download-artifact@v3
with:
name: ContainerCITests-${{ env.JOB_ID }}
path: containercitests
- uses: actions/download-artifact@v3
with:
name: CITestsWithInfinispan-${{ env.JOB_ID }}
path: citestswithinfinispan
- uses: actions/download-artifact@v3
with:
name: ContainerCITestsZosmfRsu2012-${{ env.JOB_ID }}
path: containercitestszosmfrsu2012
- uses: actions/download-artifact@v3
with:
name: ContainerCITestsWithRedis-${{ env.JOB_ID }}
path: containercitestswithredis
- uses: actions/download-artifact@v3
with:
name: ContainerCITestsInternalPort-${{ env.JOB_ID }}
path: containercitestsinternalport
- name: Code coverage and publish results
run: >
./gradlew --info coverage sonarqube -Dresults="containercitests/results,citestswithinfinispan/results,containercitestszosmfrsu2012/results,containercitestswithredis/results,containercitestsinternalport/results"
-Psonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_TOKEN
-Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: ./.github/actions/teardown
# PublishResults:
# needs: [CITests,CITestsWithInfinispan,CITestsZosmfRsu2012,CITestsWithRedis,CITestsInternalPort]
# runs-on: ubuntu-latest
# timeout-minutes: 15
#
# steps:
# - uses: actions/checkout@v3
# with:
# ref: ${{ github.head_ref }}
#
# - uses: ./.github/actions/setup
# with:
# jdkVersion: 11
#
# - uses: actions/download-artifact@v3
# with:
# name: ContainerCITests-${{ env.JOB_ID }}
# path: containercitests
# - uses: actions/download-artifact@v3
# with:
# name: CITestsWithInfinispan-${{ env.JOB_ID }}
# path: citestswithinfinispan
# - uses: actions/download-artifact@v3
# with:
# name: ContainerCITestsZosmfRsu2012-${{ env.JOB_ID }}
# path: containercitestszosmfrsu2012
# - uses: actions/download-artifact@v3
# with:
# name: ContainerCITestsWithRedis-${{ env.JOB_ID }}
# path: containercitestswithredis
# - uses: actions/download-artifact@v3
# with:
# name: ContainerCITestsInternalPort-${{ env.JOB_ID }}
# path: containercitestsinternalport
# - name: Code coverage and publish results
# run: >
# ./gradlew --info coverage sonarqube -Dresults="containercitests/results,citestswithinfinispan/results,containercitestszosmfrsu2012/results,containercitestswithredis/results,containercitestsinternalport/results"
# -Psonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_TOKEN
# -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD
# env:
# ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
# ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# - uses: ./.github/actions/teardown
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Object getThis() {
}

public boolean hasSafResourceAccess(String resourceClass, String resourceName, String accessLevel) {
return safResourceAccessVerifying.hasSafResourceAccess(authentication, resourceClass, resourceName, accessLevel);
return safResourceAccessVerifying.hasSafResourceAccess(getAuthentication(), resourceClass, resourceName, accessLevel);
}

public boolean hasSafServiceResourceAccess(String resourceNameSuffix, String accessLevel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
}

public void populateRequestWithCertificate(HttpServletRequest request, byte[] rawCertificate) throws CertificateException {
byte[] encodedCert = Base64.encodeBase64(rawCertificate);
String s = new String(encodedCert);
s = "-----BEGIN CERTIFICATE-----\n" + s + "\n-----END CERTIFICATE-----";
StringBuilder sb = new StringBuilder();
sb.append("-----BEGIN CERTIFICATE-----\n");
sb.append(Base64.encodeBase64String(rawCertificate));
sb.append("\n-----END CERTIFICATE-----");
X509Certificate certificate = (X509Certificate) CertificateFactory
.getInstance("X509")
.generateCertificate(new ByteArrayInputStream(s.getBytes()));
.generateCertificate(new ByteArrayInputStream(sb.toString().getBytes()));
X509Certificate[] certificates = new X509Certificate[1];
certificates[0] = certificate;
request.setAttribute("javax.servlet.request.X509Certificate", certificates);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.nimbusds.jose.jwk.JWK;
import com.nimbusds.jose.jwk.JWKSet;
import lombok.RequiredArgsConstructor;
import net.minidev.json.JSONObject;
import org.bouncycastle.util.io.pem.PemObject;
import org.bouncycastle.util.io.pem.PemWriter;
import org.springframework.http.HttpStatus;
Expand All @@ -34,6 +33,7 @@
import java.security.PublicKey;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;

import static org.apache.http.HttpStatus.*;
Expand Down Expand Up @@ -99,7 +99,7 @@ public void distributeInvalidate(HttpServletRequest request, HttpServletResponse
@GetMapping(path = ALL_PUBLIC_KEYS_PATH)
@ResponseBody
@HystrixCommand
public JSONObject getAllPublicKeys() {
public Map<String, Object> getAllPublicKeys() {
final List<JWK> keys = new LinkedList<>(zosmfService.getPublicKeys().getKeys());
Optional<JWK> key = jwtSecurity.getJwkPublicKey();
key.ifPresent(keys::add);
Expand All @@ -114,7 +114,7 @@ public JSONObject getAllPublicKeys() {
@GetMapping(path = CURRENT_PUBLIC_KEYS_PATH)
@ResponseBody
@HystrixCommand
public JSONObject getCurrentPublicKeys() {
public Map<String, Object> getCurrentPublicKeys() {
final List<JWK> keys = new LinkedList<>(zosmfService.getPublicKeys().getKeys());

if (keys.isEmpty()) {
Expand Down
52 changes: 26 additions & 26 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ ext {
springCloudVersion = '2.2.10.RELEASE'
springCloudCommonsVersion = '2.2.9.RELEASE'
springCloudLoadBalancerVersion = '2.2.9.RELEASE'
springCloudVersion3 = '3.1.7'
springSecurityVersion = '5.7.11'
springCloudVersion3 = '3.1.8'
springSecurityVersion = '5.8.12'
springFrameworkVersion = '5.3.34'
springRetryVersion = '1.2.5.RELEASE'
springWebTestClientVersion = '4.4.0'

attlsVersion = '1.21.3'
awaitilityVersion = '3.0.0'
awsSdkVersion = '1.12.686'
bouncyCastleVersion = '1.76'
awsSdkVersion = '1.12.710'
bouncyCastleVersion = '1.78.1'
bootstrapVersion = '4.3.1'
commonsCodecVersion = '1.15'
commonsLang3Version = '3.12.0'
commonsTextVersion = '1.10.0'
commonsIoVersion = '2.11.0'
commonsCodecVersion = '1.17.0'
commonsLang3Version = '3.14.0'
commonsTextVersion = '1.12.0'
commonsIoVersion = '2.16.1'
ehCacheVersion = '3.10.8'
eurekaVersion = '1.10.18'
gradleGitPropertiesVersion = '2.2.4' // Used in classpath dependencies
gradleNodeVersion = '3.0.1' // Used in classpath dependencies
gsonVersion = '2.9.1'
guavaVersion = '32.1.2-jre'
gsonVersion = '2.10.1'
guavaVersion = '33.1.0-jre'
hamcrestVersion = '1.3'
httpClientVersion = '4.5.14'
httpCoreVersion = '4.4.16'
infinispanVersion = '13.0.21.Final'
infinispanVersion = '13.0.22.Final'
istackVersion = '3.0.12'
jacksonCoreVersion = '2.15.1'
jacksonDatabindVersion = '2.15.2'
jacksonDataformatYamlVersion = '2.15.2'
janinoVersion = "3.1.10"
jacksonCoreVersion = '2.17.0'
jacksonDatabindVersion = '2.16.2'
jacksonDataformatYamlVersion = '2.16.2'
janinoVersion = "3.1.12"
javaxAnnotationVersion = '1.3.2'
javaxInjectVersion = '1'
javaxServletApiVersion = '4.0.1'
Expand All @@ -43,21 +43,21 @@ ext {
jjwtVersion = '0.11.5'
jjwtFullVersion = '0.9.1'
jsonPathVersion = '2.7.0'
jsonSmartVersion = '2.4.11'
jsonSmartVersion = '2.5.1'
jsonUnitVersion = '1.25.1'
jsonVersion = '20230227'
jsonVersion = '20240205'
jsoupVersion = '1.8.3'
jsr305Version = '3.0.2'
junitJupiterVersion = '5.9.2'
junitPlatformVersion = '1.9.2'
jqueryVersion = '3.6.4'
lettuceVersion = '6.0.6.RELEASE'
lettuceVersion = '6.3.2.RELEASE'
logbackVersion = '1.2.13'
lombokVersion = '1.18.28'
lombokVersion = '1.18.32'
mockitoCoreVersion = '4.9.0'
netflixServoVersion = '0.13.2'
nettyVersion = '4.1.108.Final'
nimbusJoseJwtVersion = '8.21.1'
nettyVersion = '4.1.109.Final'
nimbusJoseJwtVersion = '9.37.3'
openApiDiffVersion = '2.0.1'
reactorTestVersion = '3.5.0'
restAssuredVersion = '4.4.0'
Expand All @@ -67,13 +67,13 @@ ext {
springFoxVersion = '2.9.2'
springDocVersion = '1.6.15'
spring4Version = '4.3.30.RELEASE' // Used within PJE in tests
swagger3CoreVersion = '2.2.11'
swagger3ParserVersion = '2.1.15'
swaggerCoreVersion = '1.6.11'
swagger3CoreVersion = '2.2.21'
swagger3ParserVersion = '2.1.22'
swaggerCoreVersion = '1.6.14'
thymeleafVersion = '3.1.2.RELEASE'
tomcatVersion = '9.0.87'
tomcatVersion = '9.0.88'
velocityVersion = '2.3'
woodstoxVersion = '6.5.1'
woodstoxVersion = '6.6.2'
xstreamVersion = '1.4.20'

libraries = [
Expand Down
Loading

0 comments on commit a208515

Please sign in to comment.