Skip to content

Commit 868d1b6

Browse files
committed
Merge branch 'releases/2.7.2'
2 parents 79188ac + 57fc1e6 commit 868d1b6

File tree

176 files changed

+5860
-2106
lines changed

Some content is hidden

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

176 files changed

+5860
-2106
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ coverage.ec
2727
.gradle
2828
build/
2929
/classes/
30-
common/src/main/resources/build.properties
31-
common/src/main/resources/git.properties
30+
payload/src/main/resources/build.properties
31+
payload/src/main/resources/git.properties
3232
bin
3333
phantomjsdriver.log
3434

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ addons:
6666
hosts:
6767
- testzone1.localhost
6868
- testzone2.localhost
69+
- testzone3.localhost
6970
artifacts:
7071
key:
7172
secure: yRJd/NtH3uwSCtHLiJKt+X3ZPb57euSZA+gMG4/HkOTdkB0NuZnZaYb0GjKaLRbTAelqottjqPf5LVJXebBvjIAVH5R9C6yC1ghRYBPtHR3AJaod8ZTSUs+mLijvvhwfksKId4aZaF/GgNfPgFnC4IPybh21vTcAfrX4qS9FmN4=

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The apps all work together with the apps running on the same port
3737
You can also build the app and push it to Cloud Foundry, e.g.
3838

3939
$ ./gradlew :cloudfoundry-identity-uaa:war
40-
$ cf push myuaa --no-start -m 512M -b https://github.com/cloudfoundry/java-buildpack#v2.4 -p uaa/build/libs/cloudfoundry-identity-uaa-2.3.2-SNAPSHOT.war
40+
$ cf push myuaa --no-start -m 512M -b https://github.com/cloudfoundry/java-buildpack#v3.3.1 -p uaa/build/libs/cloudfoundry-identity-uaa-2.3.2-SNAPSHOT.war
4141
$ cf set-env myuaa SPRING_PROFILES_ACTIVE default
4242
$ cf set-env myuaa UAA_URL http://myuaa.<domain>
4343
$ cf set-env myuaa LOGIN_URL http://myuaa.<domain>

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ project.gradle.taskGraph.whenReady { TaskExecutionGraph graph ->
308308

309309
apply plugin: 'coveralls'
310310

311+
Project identityPayload = subprojects.find { it.name.equals('cloudfoundry-identity-payload') }
311312
Project identityCommon = subprojects.find { it.name.equals('cloudfoundry-identity-common') }
312313
Project identityScim = subprojects.find { it.name.equals('cloudfoundry-identity-scim') }
313314
Project identityLogin = subprojects.find { it.name.equals('cloudfoundry-identity-login') }
@@ -316,6 +317,7 @@ Project identityUaa = subprojects.find { it.name.equals('cloudfoundry-identity-u
316317
cobertura {
317318
coverageFormats = ['xml', 'html']
318319
coverageSourceDirs = [
320+
identityPayload.sourceSets.main.java.srcDirs,
319321
identityCommon.sourceSets.main.java.srcDirs,
320322
identityScim.sourceSets.main.java.srcDirs,
321323
identityLogin.sourceSets.main.java.srcDirs,

client-lib/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Project identityPayload = parent.subprojects.find { it.name.equals('cloudfoundry-identity-payload') }
2+
3+
description = 'CloudFoundry Identity Common Jar'
4+
5+
dependencies {
6+
compile identityPayload
7+
}
8+
9+
processResources {
10+
//maven replaces project.artifactId in the log4j.properties file
11+
//https://www.pivotaltracker.com/story/show/74344574
12+
filter { line -> line.contains('${project.artifactId}') ? line.replace('${project.artifactId}','cloudfoundry-identity-common') : line }
13+
}

common/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
Project identityPayload = parent.subprojects.find { it.name.equals('cloudfoundry-identity-payload') }
2+
13
description = 'CloudFoundry Identity Common Jar'
24

35
dependencies {
6+
compile identityPayload
47
compile group: 'org.passay', name: 'passay', version:'1.0'
58
compile group: 'com.google.guava', name: 'guava', version: '18.0'
69
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version:parent.bcpkixVersion
@@ -70,7 +73,6 @@ dependencies {
7073
testCompile group: 'org.springframework.security', name: 'spring-security-test', version:parent.springSecurityVersion
7174
}
7275

73-
apply from: file('build_properties.gradle')
7476
processResources {
7577
//maven replaces project.artifactId in the log4j.properties file
7678
//https://www.pivotaltracker.com/story/show/74344574

common/src/main/java/org/cloudfoundry/identity/uaa/AbstractIdentityProviderDefinition.java

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414

1515
package org.cloudfoundry.identity.uaa;
1616

17+
import java.util.HashMap;
1718
import java.util.List;
19+
import java.util.Map;
1820

19-
public abstract class AbstractIdentityProviderDefinition {
21+
public class AbstractIdentityProviderDefinition {
2022
public static final String EMAIL_DOMAIN_ATTR = "emailDomain";
2123

2224
private List<String> emailDomain;
25+
private Map<String,Object> additionalConfiguration;
2326

2427
public List<String> getEmailDomain() {
2528
return emailDomain;
@@ -29,4 +32,37 @@ public AbstractIdentityProviderDefinition setEmailDomain(List<String> emailDomai
2932
this.emailDomain = emailDomain;
3033
return this;
3134
}
35+
36+
public Map<String, Object> getAdditionalConfiguration() {
37+
return additionalConfiguration;
38+
}
39+
40+
public AbstractIdentityProviderDefinition setAdditionalConfiguration(Map<String, Object> additionalConfiguration) {
41+
this.additionalConfiguration = additionalConfiguration;
42+
return this;
43+
}
44+
45+
public AbstractIdentityProviderDefinition addAdditionalConfiguration(String key, Object value) {
46+
if (additionalConfiguration==null) {
47+
additionalConfiguration = new HashMap<>();
48+
}
49+
additionalConfiguration.put(key, value);
50+
return this;
51+
}
52+
53+
@Override
54+
public boolean equals(Object o) {
55+
if (this == o) return true;
56+
if (o == null || getClass() != o.getClass()) return false;
57+
58+
AbstractIdentityProviderDefinition that = (AbstractIdentityProviderDefinition) o;
59+
60+
return !(emailDomain != null ? !emailDomain.equals(that.emailDomain) : that.emailDomain != null);
61+
62+
}
63+
64+
@Override
65+
public int hashCode() {
66+
return emailDomain != null ? emailDomain.hashCode() : 0;
67+
}
3268
}

common/src/main/java/org/cloudfoundry/identity/uaa/ExternalIdentityProviderDefinition.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,26 @@ public Map<String, Object> getAttributeMappings() {
5959
public void addAttributeMapping(String key, Object value) {
6060
attributeMappings.put(key, value);
6161
}
62+
63+
@Override
64+
public boolean equals(Object o) {
65+
if (this == o) return true;
66+
if (o == null || getClass() != o.getClass()) return false;
67+
if (!super.equals(o)) return false;
68+
69+
ExternalIdentityProviderDefinition that = (ExternalIdentityProviderDefinition) o;
70+
71+
if (getExternalGroupsWhitelist() != null ? !getExternalGroupsWhitelist().equals(that.getExternalGroupsWhitelist()) : that.getExternalGroupsWhitelist() != null)
72+
return false;
73+
return !(getAttributeMappings() != null ? !getAttributeMappings().equals(that.getAttributeMappings()) : that.getAttributeMappings() != null);
74+
75+
}
76+
77+
@Override
78+
public int hashCode() {
79+
int result = super.hashCode();
80+
result = 31 * result + (getExternalGroupsWhitelist() != null ? getExternalGroupsWhitelist().hashCode() : 0);
81+
result = 31 * result + (getAttributeMappings() != null ? getAttributeMappings().hashCode() : 0);
82+
return result;
83+
}
6284
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* *****************************************************************************
3+
* Cloud Foundry
4+
* Copyright (c) [2009-2015] Pivotal Software, Inc. All Rights Reserved.
5+
* This product is licensed to you under the Apache License, Version 2.0 (the "License").
6+
* You may not use this product except in compliance with the License.
7+
*
8+
* This product includes a number of subcomponents with
9+
* separate copyright notices and license terms. Your use of these
10+
* subcomponents is subject to the terms and conditions of the
11+
* subcomponent's license, as noted in the LICENSE file.
12+
* *****************************************************************************
13+
*/
14+
15+
package org.cloudfoundry.identity.uaa;
16+
17+
import java.util.Map;
18+
19+
public class KeystoneIdentityProviderDefinition extends ExternalIdentityProviderDefinition {
20+
21+
public KeystoneIdentityProviderDefinition() {
22+
this(null);
23+
}
24+
25+
public KeystoneIdentityProviderDefinition(Map<String, Object> configuration) {
26+
setAdditionalConfiguration(configuration);
27+
}
28+
29+
@Override
30+
public boolean equals(Object o) {
31+
if (this == o) return true;
32+
if (o == null || getClass() != o.getClass()) return false;
33+
if (!super.equals(o)) return false;
34+
return true;
35+
}
36+
37+
@Override
38+
public int hashCode() {
39+
return super.hashCode();
40+
}
41+
}

common/src/main/java/org/cloudfoundry/identity/uaa/authentication/Origin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class Origin {
2828
public static final String KEYSTONE = "keystone";
2929
public static final String SAML = "saml";
3030
public static final String NotANumber = "NaN";
31+
public static final String UNKNOWN = "unknown";
3132

3233
public static String getUserId(Authentication authentication) {
3334
String id;

0 commit comments

Comments
 (0)