Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:cloudfoundry/uaa into ap/session…
Browse files Browse the repository at this point in the history
…-reset-filter-refactor

# By Markus Strehle (70) and others
# Via GitHub (33) and Markus Strehle (3)
* 'develop' of github.com:cloudfoundry/uaa: (269 commits)
  Bump github.com/onsi/gomega from 1.13.0 to 1.14.0 in /k8s (#1599)
  cleanup code from sonar findings and add additional tests
  cleanup code from sonar findings and add additional tests
  More test parameters for UaaUrlUtils.findMatchingRedirectUri() tests
  fix: Open Redirect Security Issue via some UAA endpoints, including logout.do
  BigInteger encoding fixed (#1579)
  Set startStopTimeout to be configurable (#1594)
  switch to StaleUrlCache
  origin sync
  Bump jasmine-core from 3.7.1 to 3.8.0 in /uaa (#1598)
  Bump jasmine from 3.7.0 to 3.8.0 in /uaa (#1597)
  Bump dependency (#1596)
  Performance optimation: Prevent expensive duplicate key exception and use upsert instead (#1562)
  Refactor: query minimal user information everywhere authorities not needed (#1322)
  Allow to use Account Chooser without Idp Discovery (#1550)
  Bump k8s.io/client-go from 0.21.0 to 0.21.2 in /k8s (#1586)
  Bump commons-io from 2.7 to 2.10.0 (#1582)
  Update dependencies.gradle
  update
  Create dependencies.gradle
  ...

# Conflicts:
#	server/src/main/java/org/cloudfoundry/identity/uaa/authentication/SessionResetFilter.java
  • Loading branch information
strehle committed Jul 8, 2021
2 parents 504e9cc + 53b0574 commit 56fde5f
Show file tree
Hide file tree
Showing 222 changed files with 4,285 additions and 2,321 deletions.
37 changes: 28 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ If this works you are in business:
$ git clone git://github.com/cloudfoundry/uaa.git
$ cd uaa
$ ./gradlew run


The apps all work together with the apps running on the same port
(8080) as [`/uaa`](http://localhost:8080/uaa), [`/app`](http://localhost:8080/app) and [`/api`](http://localhost:8080/api).

Expand Down Expand Up @@ -110,15 +110,15 @@ requesting system information:
}
}

For complex requests it is more convenient to interact with UAA using
For complex requests it is more convenient to interact with UAA using
`uaac`, the [UAA Command Line Client](https://github.com/cloudfoundry/cf-uaac).

## Integration tests

You can run the integration tests with docker

$ run-integration-tests.sh <dbtype>

will create a docker container running uaa + ldap + database whereby integration tests are run against.

### Using Gradle to test with postgresql or mysql
Expand All @@ -128,7 +128,26 @@ The default uaa unit tests (./gradlew test integrationTest) use hsqldb.
To run the unit tests with docker:

$ run-unit-tests.sh <dbtype>


### To run a single test

Start by finding out which gradle project your test belongs to.
You can find all project by running

$ ./gradlew projects

Then you can run

$ ./gradlew :<project name>:test --tests <TestClass>.<MethodName>

or to run all tests in a Class

$ ./gradlew :<project name>:test --tests <TestClass>

You might want to use the full gradle command found at the bottom of
the `scripts/unit-tests.sh` script by prepending the project name to
the `test` command and adding the `--tests` option.

### Building war file

$ ./gradlew :clean :assemble -Pversion=${UAA_VERSION}
Expand All @@ -139,9 +158,9 @@ There are actually several projects here, the main `uaa` server application, a c

1. `uaa` a WAR project for easy deployment

2. `server` a JAR project containing the implementation of UAA's REST API (including [SCIM](http://www.simplecloud.info/)) and UI
2. `server` a JAR project containing the implementation of UAA's REST API (including [SCIM](http://www.simplecloud.info/)) and UI

3. `model` a JAR project used by both the client library and server
3. `model` a JAR project used by both the client library and server

4. `api` (sample) is an OAuth2 resource service which returns a mock list of deployed apps

Expand Down Expand Up @@ -192,6 +211,6 @@ Here are some ways for you to get involved in the community:
want to contribute code this way, please reference an existing issue
if there is one as well covering the specific issue you are
addressing. Always submit pull requests to the "develop" branch.
We strictly adhere to test driven development. We kindly ask that
We strictly adhere to test driven development. We kindly ask that
pull requests are accompanied with test cases that would be failing
if ran separately from the pull request.
if ran separately from the pull request.
27 changes: 12 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ buildscript {

repositories {
mavenCentral()
jcenter()
maven {
url("https://repo.spring.io/plugins-release")
}
}

dependencies {
classpath(libraries.cargoGradlePlugin)
classpath(libraries.shadowGradlePlugin)
classpath(libraries.prodepsGradlePlugin)
classpath(libraries.asciidoctorGradlePlugin)
classpath(libraries.springDependencyMangementGradlePlugin)
Expand All @@ -32,7 +32,6 @@ apply(plugin: "com.bmuschko.cargo")
allprojects {
apply(plugin: "propdeps")
apply(plugin: "propdeps-maven")
apply(plugin: "propdeps-idea")
apply(plugin: "io.spring.dependency-management")

dependencyManagement {
Expand All @@ -55,17 +54,6 @@ allprojects {

subprojects {
apply(plugin: "java")
apply(plugin: "checkstyle")

tasks.withType(Checkstyle) {
reports {
xml.enabled(true)
html.enabled(true)
if (project.hasProperty("checkstyleFail")) {
maxWarnings = 0
}
}
}

configurations.all {
exclude(group: "org.hamcrest", module: "hamcrest-all")
Expand Down Expand Up @@ -161,6 +149,10 @@ cargo {
containerId = "tomcat9x"
port = applicationPort

if (JavaVersion.current() < JavaVersion.VERSION_11) {
throw new GradleException("This build must be run with Java version [ " + JavaVersion.VERSION_11 + " ] or greater. Your Java version is [ " + JavaVersion.current() + " ]")
}

deployable {
file = file("samples/api/build/libs/cloudfoundry-identity-api-" + version + ".war")
context = "api"
Expand All @@ -178,7 +170,7 @@ cargo {

local {
configHomeDir = file(Paths.get(System.getProperty("java.io.tmpdir") + "/uaa-${applicationPort}"))
startStopTimeout = 540000
startStopTimeout = Integer.parseInt(System.getProperty("startStopTimeout", "540000"))
rmiPort = applicationPort + 10

jvmArgs = ""
Expand All @@ -188,6 +180,11 @@ cargo {
if (System.getProperty("spring.profiles.active", "").split(',').contains("debug")) {
jvmArgs = String.format("%s -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", jvmArgs)
}
else if (Boolean.valueOf(System.getProperty("xdebug"))) {
jvmArgs = String.format("%s -Xdebug " +
"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 " +
"-Xnoagent -Djava.compiler=NONE", jvmArgs)
}

outputFile = file("uaa/build/reports/tests/uaa-server.log")
configFile {
Expand All @@ -208,7 +205,7 @@ cargo {
}

installer {
installUrl = "https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/" + versions.tomcatVersion + "/tomcat-" + versions.tomcatVersion + ".tar.gz"
installUrl = "https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/" + versions.tomcatCargoVersion + "/tomcat-" + versions.tomcatCargoVersion + ".tar.gz"
downloadDir = file("$buildDir/download")
extractDir = file("$buildDir/extract")
}
Expand Down
1 change: 0 additions & 1 deletion config/checkstyle/checkstyle.xml

This file was deleted.

0 comments on commit 56fde5f

Please sign in to comment.