Skip to content

Commit eca774b

Browse files
committed
Fixes #140
1 parent 575a88b commit eca774b

File tree

3 files changed

+29
-25
lines changed

3 files changed

+29
-25
lines changed

pom.xml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<parent>
1111
<groupId>org.springframework.boot</groupId>
1212
<artifactId>spring-boot-starter-parent</artifactId>
13-
<version>3.4.5</version>
13+
<version>3.5.4</version>
1414
</parent>
1515
<properties>
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -40,7 +40,7 @@
4040
<dependency>
4141
<groupId>org.flywaydb</groupId>
4242
<artifactId>flyway-core</artifactId>
43-
<version>11.8.0</version>
43+
<version>11.11.2</version>
4444
</dependency>
4545
<dependency>
4646
<groupId>jakarta.validation</groupId>
@@ -50,7 +50,7 @@
5050
<dependency>
5151
<groupId>org.flywaydb</groupId>
5252
<artifactId>flyway-mysql</artifactId>
53-
<version>11.8.0</version>
53+
<version>11.11.2</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>org.springframework.boot</groupId>
@@ -59,7 +59,7 @@
5959
<dependency>
6060
<groupId>org.springframework.security</groupId>
6161
<artifactId>spring-security-oauth2-client</artifactId>
62-
<version>6.4.5</version>
62+
<version>6.5.1</version>
6363
</dependency>
6464
<dependency>
6565
<groupId>org.springframework.boot</groupId>
@@ -79,12 +79,12 @@
7979
<dependency>
8080
<groupId>org.mariadb.jdbc</groupId>
8181
<artifactId>mariadb-java-client</artifactId>
82-
<version>3.5.3</version>
82+
<version>3.5.5</version>
8383
</dependency>
8484
<dependency>
8585
<groupId>org.apache.httpcomponents.client5</groupId>
8686
<artifactId>httpclient5</artifactId>
87-
<version>5.4.3</version>
87+
<version>5.5</version>
8888
</dependency>
8989
<dependency>
9090
<groupId>org.yaml</groupId>
@@ -99,32 +99,27 @@
9999
<dependency>
100100
<groupId>commons-io</groupId>
101101
<artifactId>commons-io</artifactId>
102-
<version>2.18.0</version>
103-
</dependency>
104-
<dependency>
105-
<groupId>joda-time</groupId>
106-
<artifactId>joda-time</artifactId>
107-
<version>2.13.0</version>
102+
<version>2.20.0</version>
108103
</dependency>
109104
<dependency>
110105
<groupId>com.fasterxml.jackson.datatype</groupId>
111106
<artifactId>jackson-datatype-hibernate6</artifactId>
112-
<version>2.19.0</version>
107+
<version>2.19.2</version>
113108
</dependency>
114109
<dependency>
115110
<groupId>com.fasterxml.jackson.datatype</groupId>
116111
<artifactId>jackson-datatype-jdk8</artifactId>
117-
<version>2.19.0</version>
112+
<version>2.19.2</version>
118113
</dependency>
119114
<dependency>
120115
<groupId>com.fasterxml.jackson.datatype</groupId>
121116
<artifactId>jackson-datatype-jsr310</artifactId>
122-
<version>2.19.0</version>
117+
<version>2.19.2</version>
123118
</dependency>
124119
<dependency>
125120
<groupId>io.rest-assured</groupId>
126121
<artifactId>json-path</artifactId>
127-
<version>5.5.1</version>
122+
<version>5.5.6</version>
128123
</dependency>
129124
<dependency>
130125
<groupId>org.springframework.boot</groupId>
@@ -134,25 +129,25 @@
134129
<dependency>
135130
<groupId>io.rest-assured</groupId>
136131
<artifactId>rest-assured</artifactId>
137-
<version>5.5.1</version>
132+
<version>5.5.6</version>
138133
<scope>test</scope>
139134
</dependency>
140135
<dependency>
141136
<groupId>io.rest-assured</groupId>
142137
<artifactId>xml-path</artifactId>
143-
<version>5.5.1</version>
138+
<version>5.5.6</version>
144139
<scope>test</scope>
145140
</dependency>
146141
<dependency>
147142
<groupId>org.wiremock</groupId>
148143
<artifactId>wiremock-standalone</artifactId>
149-
<version>3.13.0</version>
144+
<version>3.13.1</version>
150145
<scope>test</scope>
151146
</dependency>
152147
<dependency>
153148
<groupId>org.junit.vintage</groupId>
154149
<artifactId>junit-vintage-engine</artifactId>
155-
<version>5.11.4</version>
150+
<version>5.12.2</version>
156151
<scope>test</scope>
157152
</dependency>
158153
</dependencies>
@@ -161,12 +156,12 @@
161156
<plugin>
162157
<groupId>org.springframework.boot</groupId>
163158
<artifactId>spring-boot-maven-plugin</artifactId>
164-
<version>3.4.3</version>
159+
<version>3.5.3</version>
165160
</plugin>
166161
<plugin>
167162
<groupId>io.github.git-commit-id</groupId>
168163
<artifactId>git-commit-id-maven-plugin</artifactId>
169-
<version>9.0.1</version>
164+
<version>9.0.2</version>
170165
</plugin>
171166
<plugin>
172167
<groupId>org.apache.maven.plugins</groupId>
@@ -179,7 +174,7 @@
179174
<plugin>
180175
<groupId>org.jacoco</groupId>
181176
<artifactId>jacoco-maven-plugin</artifactId>
182-
<version>0.8.12</version>
177+
<version>0.8.13</version>
183178
<executions>
184179
<execution>
185180
<goals>
@@ -198,7 +193,7 @@
198193
<plugin>
199194
<groupId>org.apache.maven.plugins</groupId>
200195
<artifactId>maven-enforcer-plugin</artifactId>
201-
<version>3.5.0</version>
196+
<version>3.6.1</version>
202197
<executions>
203198
<execution>
204199
<id>enforce-versions</id>

src/main/java/aa/aggregators/institution/SAMLMapping.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class SAMLMapping {
2424
mapping.put("urn:mace:surf.nl:attribute-def:eckid", "eckid");
2525
mapping.put("urn:schac:attribute-def:schacDateOfBirth", "date_of_birth");
2626
mapping.put("urn:mace:dir:attribute-def:preferredLanguage", "preferred_language");
27+
mapping.put("urn:mace:dir:attribute-def:uid", "uids");
2728
}
2829

2930
public Optional<String> convertSAMLAttributeName(String samlAttributeName) {

src/test/java/aa/aggregators/institution/InstitutionAttributeAggregatorTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.springframework.test.context.junit4.SpringRunner;
2020

2121
import java.nio.charset.Charset;
22+
import java.util.Comparator;
2223
import java.util.List;
2324
import java.util.Map;
2425
import java.util.UUID;
@@ -57,6 +58,7 @@ public void aggregate() {
5758
),
5859
Map.of(EDU_PERSON_PRINCIPAL_NAME, List.of(new ArpValue("*", "institution")),
5960
EMAIL, List.of(new ArpValue("*", "nope")),
61+
UID, List.of(new ArpValue("*", "institution")),
6062
"urn:schac:attribute-def:schacDateOfBirth", List.of(new ArpValue("*", "institution")),
6163
"unknown-saml-attribute", List.of(new ArpValue("*", "institution"))));
6264

@@ -76,11 +78,17 @@ public void aggregate() {
7678
.post("/aa/api/internal/attribute/aggregation")
7779
.as(new TypeRef<>() {
7880
});
79-
assertEquals(1, userAttributes.size());
81+
assertEquals(2, userAttributes.size());
82+
userAttributes.sort(Comparator.comparing(UserAttribute::getName));
8083
UserAttribute userAttribute = userAttributes.getFirst();
8184
assertEquals(EDU_PERSON_PRINCIPAL_NAME, userAttribute.getName());
8285
assertEquals(1, userAttribute.getValues().size());
8386
assertEquals("[email protected]", userAttribute.getValues().getFirst());
87+
88+
userAttribute = userAttributes.get(1);
89+
assertEquals(UID, userAttribute.getName());
90+
assertEquals(1, userAttribute.getValues().size());
91+
assertEquals("jdoe123", userAttribute.getValues().getFirst());
8492
}
8593

8694
@SneakyThrows

0 commit comments

Comments
 (0)