Skip to content

Commit

Permalink
feat: support midPoint v4.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
wadahiro committed Oct 9, 2024
1 parent 2846eec commit c781c04
Show file tree
Hide file tree
Showing 33 changed files with 229 additions and 85 deletions.
49 changes: 46 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,28 @@
</distributionManagement>

<properties>
<version.midpoint>4.8</version.midpoint>
<version.midpoint>4.8.4</version.midpoint>
<version.grpc-java>1.55.1</version.grpc-java>
<version.protoc>3.22.3</version.protoc>
<!--
The version of Spring Boot that midpoint depends on must match the major version of Spring Boot that grpc-spring-boot-starter depends on.
https://github.com/Evolveum/midpoint/blob/support-4.8/pom.xml
https://central.sonatype.com/artifact/io.github.lognet/grpc-spring-boot-starter/4.5.10
https://central.sonatype.com/artifact/io.github.lognet/grpc-spring-boot-starter/5.1.5
-->
<version.grpc-spring-boot-starter>5.1.2</version.grpc-spring-boot-starter>
<version.grpc-spring-boot-starter>5.1.5</version.grpc-spring-boot-starter>

<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!--
See the versions of Spring Boot 3.3.2
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/3.3.2/spring-boot-dependencies-3.3.2.pom
-->
<logback.version>1.5.6</logback.version>
<jackson.version>2.17.2</jackson.version>
<snakeyaml.version>2.2</snakeyaml.version>

<junit.jupiter.version>5.8.1</junit.jupiter.version>

<github.global.server>github</github.global.server>
Expand Down Expand Up @@ -151,6 +160,40 @@
<version>${version.grpc-java}</version>
</dependency>

<!--
For integration test
-->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
26 changes: 26 additions & 0 deletions self-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,32 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestAddClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestAddObjectClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestBasicAuthClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestCheckNonceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestDeleteObjectClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestGenerateValueClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestGetAssignmentClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestGetSelfClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestGetUserByNameClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestGetUserClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestLookupTableClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestModifyObjectClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestModifyProfileClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestModifyUserClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestRecomputeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestRunPrivilegedClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestSearchObjectsClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestSearchOrgChildClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestSearchOrgClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestSearchRoleClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestSearchServiceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
2 changes: 1 addition & 1 deletion self-services/src/test/java/TestSearchUserClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) throws UnsupportedEncodingException {

SelfServiceResourceGrpc.SelfServiceResourceBlockingStub stub = SelfServiceResourceGrpc.newBlockingStub(channel);

String token = Base64.getEncoder().encodeToString("Administrator:5ecr3t".getBytes("UTF-8"));
String token = Base64.getEncoder().encodeToString("Administrator:Test5ecr3t".getBytes("UTF-8"));

Metadata headers = new Metadata();
headers.put(Constant.AuthorizationMetadataKey, "Basic " + token);
Expand Down
Loading

0 comments on commit c781c04

Please sign in to comment.