Skip to content

Commit 8fa909c

Browse files
committed
Upgrade uaa to version 75.18.0 [KETI-2404]
2 parents c130ae3 + 58602f5 commit 8fa909c

File tree

109 files changed

+1152
-483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1152
-483
lines changed

.github/workflows/gradle.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Java CI with Gradle
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
9+
# Run job on CF landscape, e.g. ubuntu 1804 and bellsoft java 11
10+
jobs:
11+
uaa_standalone_test:
12+
runs-on: ubuntu-18.04
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-java@v2
16+
with:
17+
distribution: 'liberica'
18+
java-version: '11'
19+
cache: 'gradle'
20+
- run: ./gradlew --no-daemon -Dspring.profiles.active=default,hsqldb -DfailOnPassedAfterRetry=false --no-daemon test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Security OAuth that can do the heavy lifting if your client is Java.
6666
* Technical forum: [cf-dev mailing list](https://lists.cloudfoundry.org)
6767
* Docs: [docs/](/docs)
6868
* API Documentation: http://docs.cloudfoundry.org/api/uaa/
69-
* Specification: [The Oauth 2 Authorization Framework](http://tools.ietf.org/html/rfc6749)
69+
* Specification: [The OpenID Connect Core Framework](https://openid.net/specs/openid-connect-core-1_0.html) including [the Oauth 2 Authorization Framework](http://tools.ietf.org/html/rfc6749)
7070
* LDAP: [UAA LDAP Integration](/docs/UAA-LDAP.md)
7171

7272
## Quick Start

build.gradle

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ buildscript {
99
repositories {
1010
mavenCentral()
1111
jcenter()
12+
maven {
13+
url("https://plugins.gradle.org/m2/")
14+
}
1215
maven {
1316
url("https://repo.spring.io/plugins-release")
1417
}
@@ -20,6 +23,7 @@ buildscript {
2023
classpath(libraries.asciidoctorGradlePlugin)
2124
classpath(libraries.springDependencyMangementGradlePlugin)
2225
classpath(libraries.springBootGradlePlugin)
26+
classpath(libraries.testRetryPlugin)
2327
}
2428

2529
allprojects {
@@ -42,6 +46,7 @@ allprojects {
4246
apply(plugin: "propdeps")
4347
apply(plugin: "propdeps-maven")
4448
apply(plugin: "io.spring.dependency-management")
49+
apply(plugin: "org.gradle.test-retry")
4550

4651
dependencyManagement {
4752
imports {
@@ -119,6 +124,12 @@ subprojects {
119124
useJUnitPlatform()
120125
jvmArgs += ["-Xmx1024m", "-XX:+StartAttachListener", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/var/log/uaa-tests.hprof"]
121126

127+
retry {
128+
failOnPassedAfterRetry = Boolean.parseBoolean(System.getProperty("failOnPassedAfterRetry", "true"));
129+
maxFailures = Integer.parseInt(System.getProperty("maxFailures", "3"))
130+
maxRetries = Integer.parseInt(System.getProperty("maxRetries", "1"))
131+
}
132+
122133
testLogging {
123134
events("skipped", "failed", "passed")
124135
exceptionFormat("full")
@@ -205,7 +216,7 @@ cargo {
205216

206217
jvmArgs = ""
207218
jvmArgs = String.format("%s -DCLOUDFOUNDRY_CONFIG_PATH=%s", jvmArgs, file("scripts/cargo").getAbsolutePath())
208-
jvmArgs = String.format("%s -Dlog4j.configurationFile=%s", jvmArgs, file("scripts/cargo/log4j2.properties").getAbsolutePath())
219+
jvmArgs = String.format("%s -Dlogging.config=%s", jvmArgs, file("scripts/cargo/log4j2.properties").getAbsolutePath())
209220
jvmArgs = String.format("%s -Dstatsd.enabled=true", jvmArgs)
210221
if (System.getProperty("spring.profiles.active", "").split(',').contains("debug")) {
211222
jvmArgs = String.format("%s -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", jvmArgs)
@@ -228,6 +239,7 @@ cargo {
228239
property("metrics.perRequestMetrics", System.getProperty("metrics.perRequestMetrics", "true"))
229240
property("smtp.host", "localhost")
230241
property("smtp.port", 2525)
242+
property("java.security.egd", "file:/dev/./urandom")
231243
}
232244

233245
containerProperties {

ci/image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-bellsoft-amd64
1414
ENV PATH "${JAVA_HOME}/bin:${PATH}"
1515
RUN JAVA_MAJOR_VERSION="11" \
1616
&& JDK_METADATA="jdk-metadata.json" \
17-
&& curl -sLo "${JDK_METADATA}" "https://api.bell-sw.com/v1/liberica/releases?version-modifier=latest&os=linux&release-type=lts&bitness=64&package-type=tar.gz&bundle-type=jdk&arch=x86" \
17+
&& curl -sLo "${JDK_METADATA}" "https://api.bell-sw.com/v1/liberica/releases?version-modifier=latest&os=linux&release-type=lts&bitness=64&package-type=tar.gz&bundle-type=jdk&arch=x86&version-feature=${JAVA_MAJOR_VERSION}" \
1818
&& JDK_VERSION="$(jq -r ".[] | select(.featureVersion | contains("${JAVA_MAJOR_VERSION}")).version" "${JDK_METADATA}")" \
1919
&& JDK_ARCHIVE_URL="$(jq -r ".[] | select(.featureVersion | contains("${JAVA_MAJOR_VERSION}")).downloadUrl" "${JDK_METADATA}")" \
2020
&& JDK_ARCHIVE="$(basename "${JDK_ARCHIVE_URL}")" \

dependencies.gradle

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ ext['log4j2.version'] = '2.17.1' // this pinning can be removed when we bump to
1111
// Versions shared between multiple dependencies
1212
versions.aspectJVersion = "1.9.4"
1313
versions.apacheDsVersion = "2.0.0.AM26"
14-
versions.bouncyCastleVersion = "1.69"
14+
versions.bouncyCastleVersion = "1.70"
1515
versions.hamcrestVersion = "2.2"
16-
versions.springBootVersion = "2.4.13"
16+
versions.springBootVersion = "2.6.6"
1717
versions.springSecurityJwtVersion = "1.1.1.RELEASE"
1818
versions.springSecurityOAuthVersion = "2.5.1.RELEASE"
1919
versions.springSecuritySamlVersion = "1.0.10.RELEASE"
20-
versions.springVersion = "5.3.10"
21-
versions.tomcatCargoVersion = "9.0.53"
22-
versions.guavaVersion = "30.1.1-jre"
20+
versions.springVersion = "5.3.18"
21+
versions.tomcatCargoVersion = "9.0.60"
22+
versions.guavaVersion = "31.1-jre"
2323

2424
// Dependencies (some rely on shared versions, some are shared between projects)
25-
libraries.apacheCommonsRngCore = "org.apache.commons:commons-rng-core:1.3"
26-
libraries.apacheCommonsRngSimple = "org.apache.commons:commons-rng-simple:1.3"
25+
libraries.apacheCommonsRngCore = "org.apache.commons:commons-rng-core:1.4"
26+
libraries.apacheCommonsRngSimple = "org.apache.commons:commons-rng-simple:1.4"
2727
libraries.apacheCommonsText = "org.apache.commons:commons-text:1.9"
2828
libraries.apacheDsProtocolLdap = "org.apache.directory.server:apacheds-protocol-ldap:${versions.apacheDsVersion}"
2929
libraries.apacheLdapApi = "org.apache.directory.api:api-ldap-model:1.0.3"
@@ -34,9 +34,9 @@ libraries.bouncyCastlePkix = "org.bouncycastle:bcpkix-jdk15on:${versions.bouncyC
3434
libraries.bouncyCastleProv = "org.bouncycastle:bcprov-jdk15on:${versions.bouncyCastleVersion}"
3535
libraries.commonsIo = "commons-io:commons-io:2.11.0"
3636
libraries.dumbster = "dumbster:dumbster:1.6"
37-
libraries.eclipseJgit = "org.eclipse.jgit:org.eclipse.jgit:5.8.0.202006091008-r"
37+
libraries.eclipseJgit = "org.eclipse.jgit:org.eclipse.jgit:6.1.0.202203080745-r"
3838
libraries.flywayCore = "org.flywaydb:flyway-core"
39-
libraries.greenmail = "com.icegreen:greenmail:1.5.11"
39+
libraries.greenmail = "com.icegreen:greenmail:1.6.7"
4040
libraries.googleAuth = "com.warrenstrange:googleauth:1.5.0"
4141
libraries.guava = "com.google.guava:guava:${versions.guavaVersion}"
4242
libraries.guavaTestLib = "com.google.guava:guava-testlib:${versions.guavaVersion}"
@@ -102,20 +102,25 @@ libraries.springWebMvc = "org.springframework:spring-webmvc"
102102
libraries.statsdClient = "com.timgroup:java-statsd-client:3.1.0"
103103
libraries.thymeleafDialect = "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect"
104104
libraries.thymeleafExtrasSpringSecurity5 = "org.thymeleaf.extras:thymeleaf-extras-springsecurity5"
105+
libraries.thymeLeaf = "org.thymeleaf:thymeleaf"
105106
libraries.thymeleafSpring5 = "org.thymeleaf:thymeleaf-spring5"
106107
libraries.tomcatElApi = "org.apache.tomcat.embed:tomcat-embed-el"
107108
libraries.tomcatEmbed = "org.apache.tomcat.embed:tomcat-embed-core"
108109
libraries.tomcatJasperEl = "org.apache.tomcat.embed:tomcat-embed-jasper"
109110
libraries.tomcatJdbc = "org.apache.tomcat:tomcat-jdbc"
110111
libraries.unboundIdLdapSdk = "com.unboundid:unboundid-ldapsdk"
111-
libraries.unboundIdScimSdk = "com.unboundid.product.scim:scim-sdk:1.8.25"
112+
libraries.unboundIdScimSdk = "com.unboundid.product.scim:scim-sdk:1.8.26"
112113
libraries.velocity = "org.apache.velocity:velocity-engine-core:2.3"
114+
libraries.xerces = "xerces:xercesImpl:2.12.2"
113115
libraries.zxing = "com.google.zxing:javase:3.4.1"
114-
libraries.nimbusJwt = "com.nimbusds:nimbus-jose-jwt"
116+
libraries.nimbusJwt = "com.nimbusds:nimbus-jose-jwt:8.23"
117+
libraries.xmlSecurity = "org.apache.santuario:xmlsec:2.3.0"
118+
libraries.orgJson = "org.json:json:20220320"
115119

116120
// gradle plugins
121+
libraries.testRetryPlugin = "org.gradle:test-retry-gradle-plugin:1.3.1"
117122
libraries.asciidoctorGradlePlugin = "org.asciidoctor:asciidoctor-gradle-plugin:1.6.1"
118-
libraries.cargoGradlePlugin = "com.bmuschko:gradle-cargo-plugin:2.7.1"
123+
libraries.cargoGradlePlugin = "com.bmuschko:gradle-cargo-plugin:2.8.0"
119124
libraries.prodepsGradlePlugin = "io.spring.gradle:propdeps-plugin:0.0.10.RELEASE"
120125
libraries.springBootGradlePlugin = "org.springframework.boot:spring-boot-gradle-plugin:${versions.springBootVersion}"
121126
libraries.springDependencyMangementGradlePlugin = "io.spring.gradle:dependency-management-plugin"

gradle/wrapper/gradle-wrapper.jar

3.92 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS='"-Xmx64m"'
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"
@@ -66,6 +82,7 @@ esac
6682

6783
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6884

85+
6986
# Determine the Java command to use to start the JVM.
7087
if [ -n "$JAVA_HOME" ] ; then
7188
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -109,10 +126,11 @@ if $darwin; then
109126
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110127
fi
111128

112-
# For Cygwin, switch paths to Windows format before running java
113-
if $cygwin ; then
129+
# For Cygwin or MSYS, switch paths to Windows format before running java
130+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
114131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
116134
JAVACMD=`cygpath --unix "$JAVACMD"`
117135

118136
# We build the pattern for arguments to be converted via cygpath
@@ -138,19 +156,19 @@ if $cygwin ; then
138156
else
139157
eval `echo args$i`="\"$arg\""
140158
fi
141-
i=$((i+1))
159+
i=`expr $i + 1`
142160
done
143161
case $i in
144-
(0) set -- ;;
145-
(1) set -- "$args0" ;;
146-
(2) set -- "$args0" "$args1" ;;
147-
(3) set -- "$args0" "$args1" "$args2" ;;
148-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154172
esac
155173
fi
156174

@@ -159,14 +177,9 @@ save () {
159177
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160178
echo " "
161179
}
162-
APP_ARGS=$(save "$@")
180+
APP_ARGS=`save "$@"`
163181

164182
# Collect all arguments for the java command, following the shell quoting and substitution rules
165183
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166184

167-
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168-
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169-
cd "$(dirname "$0")"
170-
fi
171-
172185
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
1329
set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
1635
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS="-Xmx64m"
36+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1837

1938
@rem Find java.exe
2039
if defined JAVA_HOME goto findJavaFromJavaHome
2140

2241
set JAVA_EXE=java.exe
2342
%JAVA_EXE% -version >NUL 2>&1
24-
if "%ERRORLEVEL%" == "0" goto init
43+
if "%ERRORLEVEL%" == "0" goto execute
2544

2645
echo.
2746
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -35,7 +54,7 @@ goto fail
3554
set JAVA_HOME=%JAVA_HOME:"=%
3655
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
3756

38-
if exist "%JAVA_EXE%" goto init
57+
if exist "%JAVA_EXE%" goto execute
3958

4059
echo.
4160
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,28 +64,14 @@ echo location of your Java installation.
4564

4665
goto fail
4766

48-
:init
49-
@rem Get command-line arguments, handling Windows variants
50-
51-
if not "%OS%" == "Windows_NT" goto win9xME_args
52-
53-
:win9xME_args
54-
@rem Slurp the command line arguments.
55-
set CMD_LINE_ARGS=
56-
set _SKIP=2
57-
58-
:win9xME_args_slurp
59-
if "x%~1" == "x" goto execute
60-
61-
set CMD_LINE_ARGS=%*
62-
6367
:execute
6468
@rem Setup the command line
6569

6670
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
6771

72+
6873
@rem Execute Gradle
69-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
7075

7176
:end
7277
@rem End local scope for the variables with windows NT shell

k8s/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ format:
2121
gofmt -l -s -w ${GOFILES}
2222

2323
template_test:
24+
go version
2425
go test -count=1 ./test/...
2526

2627
test: format template_test

0 commit comments

Comments
 (0)