Skip to content

Commit 035683c

Browse files
authored
upd 0.31.1 (#40)
* upd 0.31.1 * upd tests
1 parent 88786b0 commit 035683c

File tree

10 files changed

+93
-89
lines changed

10 files changed

+93
-89
lines changed

.github/workflows/ci.yaml

+15-18
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
2727

2828
- name: Set up Java for publishing to Maven Central Repository
29-
uses: actions/setup-java@v3
29+
uses: actions/setup-java@v4
3030
with:
3131
java-version: 17
3232
distribution: temurin
@@ -38,43 +38,45 @@ jobs:
3838
run: brew tap aserto-dev/tap && brew install aserto-dev/tap/topaz && topaz install
3939

4040
- name: Run all tests
41-
run: mvn clean test -Pintegration
41+
run: mvn --no-transfer-progress clean test -Pintegration
4242
release:
4343
runs-on: ubuntu-latest
4444
needs: build
4545
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
4646
name: Release to maven central
4747
steps:
4848
- name: Read Configuration
49-
uses: hashicorp/vault-action@v2.5.0
49+
uses: hashicorp/vault-action@v3
5050
id: vault
5151
with:
5252
url: ${{ env.VAULT_ADDR }}
5353
token: ${{ secrets.VAULT_TOKEN }}
5454
secrets: |
5555
kv/data/MavenCentral "USERNAME" | MAVEN_USERNAME;
56-
kv/data/MavenCentral "PASSWORD" | MAVEN_PASSWORD;
56+
kv/data/MavenCentral "PASSWORD" | MAVEN_CENTRAL_TOKEN;
5757
kv/data/MavenCentral "GPG_PASSPHRASE" | MAVEN_GPG_PASSPHRASE;
58-
kv/data/MavenCentral "PRIVATE_GPG_KEY" | GPG_PRIVATE_KEY;
58+
kv/data/MavenCentral "PRIVATE_GPG_KEY" | MAVEN_GPG_PRIVATE_KEY;
59+
kv/data/MavenCentral "TOKEN_USERNAME" | TOKEN_USERNAME;
60+
kv/data/MavenCentral "TOKEN_PASSWORD" | TOKEN_PASSWORD;
5961
6062
- name: Set up Java for publishing to Maven Central Repository
61-
uses: actions/setup-java@v3
63+
uses: actions/setup-java@v4
6264
with:
6365
java-version: 17
6466
distribution: temurin
6567
server-id: ossrh
66-
server-username: MAVEN_USERNAME
67-
server-password: MAVEN_PASSWORD
68-
gpg-private-key: ${{ env.GPG_PRIVATE_KEY }}
68+
server-username: TOKEN_USERNAME
69+
server-password: TOKEN_PASSWORD
70+
gpg-private-key: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
6971
gpg-passphrase: MAVEN_GPG_PASSPHRASE
7072

7173
- name: Checkout
72-
uses: actions/checkout@v3
74+
uses: actions/checkout@v4
7375
with:
7476
fetch-depth: 0
7577

7678
- name: build artifact
77-
run: mvn clean package
79+
run: mvn --no-transfer-progress clean package
7880

7981
- name: Create release
8082
uses: ncipollo/release-action@v1
@@ -84,9 +86,4 @@ jobs:
8486
token: ${{ secrets.GITHUB_TOKEN }}
8587

8688
- name: Publish to the Maven Central Repository
87-
run: |
88-
mvn \
89-
--no-transfer-progress \
90-
--batch-mode \
91-
-Pci-cd \
92-
deploy
89+
run: mvn --no-transfer-progress --batch-mode -Pci-cd deploy

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2023 Aserto Inc.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Java library for Aserto services
55

66
> **Warning**
77
>
8-
> **0.21.0** is the latest version published to maven central. Versions starting with 1.0.z have been removed from maven central and are no longer available for download.
8+
> **0.31.1** is the latest version published to maven central. Versions starting with 1.0.z have been removed from maven central and are no longer available for download.
99
1010
### Build
1111
`mvn clean install`

examples/authz-example/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.example</groupId>
88
<artifactId>authz-example</artifactId>
9-
<version>1.0.0</version>
9+
<version>1.0.0-SNAPSHOT</version>
1010

1111
<properties>
1212
<maven.compiler.source>19</maven.compiler.source>
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.aserto</groupId>
2020
<artifactId>aserto-java</artifactId>
21-
<version>0.21.00</version>
21+
<version>0.31.1</version>
2222
</dependency>
2323
</dependencies>
2424

@@ -27,7 +27,7 @@
2727
<plugin>
2828
<groupId>org.apache.maven.plugins</groupId>
2929
<artifactId>maven-shade-plugin</artifactId>
30-
<version>3.4.1</version>
30+
<version>3.6.0</version>
3131
<configuration>
3232
<createDependencyReducedPom>false</createDependencyReducedPom>
3333
</configuration>

examples/directory-example/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.example</groupId>
88
<artifactId>directory-example</artifactId>
9-
<version>0.0.1</version>
9+
<version>1.0.0-SNAPSHOT</version>
1010

1111
<properties>
1212
<maven.compiler.source>17</maven.compiler.source>
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.aserto</groupId>
2020
<artifactId>aserto-java</artifactId>
21-
<version>0.21.00</version>
21+
<version>0.31.1</version>
2222
</dependency>
2323
</dependencies>
2424

@@ -27,7 +27,7 @@
2727
<plugin>
2828
<groupId>org.apache.maven.plugins</groupId>
2929
<artifactId>maven-shade-plugin</artifactId>
30-
<version>3.4.1</version>
30+
<version>3.6.0</version>
3131
<configuration>
3232
<createDependencyReducedPom>false</createDependencyReducedPom>
3333
</configuration>

pom.xml

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.aserto</groupId>
88
<artifactId>aserto-java</artifactId>
9-
<version>0.31.0</version>
9+
<version>0.31.1</version>
1010

1111
<name>${project.groupId}:${project.artifactId}</name>
1212
<description>Java SDK to interact with aserto services</description>
@@ -41,34 +41,34 @@
4141
<maven.compiler.target>17</maven.compiler.target>
4242
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4343

44-
<grpc.version>1.60.1</grpc.version>
45-
<log4j.version>2.22.0</log4j.version>
44+
<grpc.version>1.64.0</grpc.version>
45+
<log4j.version>2.23.1</log4j.version>
4646
<exclude-tests>IntegrationTest</exclude-tests>
4747
</properties>
4848

4949
<dependencies>
5050
<dependency>
5151
<groupId>com.aserto</groupId>
5252
<artifactId>java-authorizer</artifactId>
53-
<version>0.20.8</version>
53+
<version>0.20.11</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>com.aserto</groupId>
5757
<artifactId>java-directory</artifactId>
58-
<version>0.31.0</version>
58+
<version>0.31.2</version>
5959
</dependency>
6060

6161
<!-- Used for unit testing -->
6262
<dependency>
6363
<groupId>org.junit.jupiter</groupId>
6464
<artifactId>junit-jupiter-engine</artifactId>
65-
<version>5.10.1</version>
65+
<version>5.10.2</version>
6666
<scope>test</scope>
6767
</dependency>
6868
<dependency>
6969
<groupId>org.assertj</groupId>
7070
<artifactId>assertj-core</artifactId>
71-
<version>3.24.2</version>
71+
<version>3.26.0</version>
7272
<scope>test</scope>
7373
</dependency>
7474
<dependency>
@@ -115,7 +115,7 @@
115115
<plugin>
116116
<groupId>org.apache.maven.plugins</groupId>
117117
<artifactId>maven-gpg-plugin</artifactId>
118-
<version>3.1.0</version>
118+
<version>3.2.4</version>
119119
<executions>
120120
<execution>
121121
<id>sign-artifacts</id>
@@ -146,7 +146,7 @@
146146
<plugin>
147147
<groupId>org.apache.maven.plugins</groupId>
148148
<artifactId>maven-source-plugin</artifactId>
149-
<version>3.3.0</version>
149+
<version>3.3.1</version>
150150
<executions>
151151
<execution>
152152
<id>attach-sources</id>
@@ -159,7 +159,7 @@
159159
<plugin>
160160
<groupId>org.apache.maven.plugins</groupId>
161161
<artifactId>maven-javadoc-plugin</artifactId>
162-
<version>3.6.3</version>
162+
<version>3.7.0</version>
163163
<executions>
164164
<execution>
165165
<id>attach-javadocs</id>
@@ -174,7 +174,7 @@
174174
<plugin>
175175
<groupId>org.sonatype.plugins</groupId>
176176
<artifactId>nexus-staging-maven-plugin</artifactId>
177-
<version>1.6.13</version>
177+
<version>1.7.0</version>
178178
<extensions>true</extensions>
179179
<configuration>
180180
<serverId>ossrh</serverId>

src/test/java/AuthzClientIntegrationTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.junit.jupiter.api.Tag;
77
import org.junit.jupiter.api.Test;
88
import org.junit.jupiter.api.extension.ExtendWith;
9-
import utils.IntegrationTestsExtenion;
9+
import utils.IntegrationTestsExtension;
1010

1111
import javax.net.ssl.SSLException;
1212
import java.io.IOException;
@@ -16,7 +16,7 @@
1616
import static org.junit.jupiter.api.Assertions.assertThrows;
1717

1818
@Tag("IntegrationTest")
19-
@ExtendWith({IntegrationTestsExtenion.class})
19+
@ExtendWith({IntegrationTestsExtension.class})
2020
class AuthzClientIntegrationTest {
2121
@Test
2222
void testBuildAuthzClient() throws IOException {
@@ -25,7 +25,7 @@ void testBuildAuthzClient() throws IOException {
2525
.withHost("localhost")
2626
.withPort(8282)
2727
.withInsecure(false)
28-
.withCACertPath(System.getProperty("user.home") + "/.config/topaz/certs/grpc-ca.crt")
28+
.withCACertPath(System.getProperty("user.home") + "/.local/share/topaz/certs/grpc-ca.crt")
2929
.build();
3030

3131
AuthzClient authzClient = new AuthzClient(channel);

src/test/java/DirectoryClientTest.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import io.grpc.StatusRuntimeException;
1919
import org.junit.jupiter.api.*;
2020
import org.junit.jupiter.api.extension.ExtendWith;
21-
import utils.IntegrationTestsExtenion;
21+
import utils.IntegrationTestsExtension;
2222

2323
import javax.net.ssl.SSLException;
2424

@@ -29,7 +29,7 @@
2929
import static org.junit.jupiter.api.Assertions.*;
3030

3131
@Tag("IntegrationTest")
32-
@ExtendWith({IntegrationTestsExtenion.class})
32+
@ExtendWith({IntegrationTestsExtension.class})
3333
class DirectoryClientTest {
3434
private static DirectoryClient directoryClient;
3535
private static ManagedChannel channel;
@@ -138,7 +138,7 @@ void testGetUserWithNoRelations() throws UninitilizedClientException {
138138
// Assert
139139
assertThat(getObjectResponse.getResult())
140140
.usingRecursiveComparison()
141-
.comparingOnlyFields("objectType_", "objectId_")
141+
.comparingOnlyFields("type_", "id_")
142142
.isEqualTo(managerObject);
143143
assertEquals(0, getObjectResponse.getRelationsList().size());
144144
}
@@ -156,7 +156,7 @@ void testGetUserWithRelations() throws UninitilizedClientException {
156156
// Assert
157157
assertThat(getObjectResponse.getResult())
158158
.usingRecursiveComparison()
159-
.comparingOnlyFields("objectType_", "objectId_")
159+
.comparingOnlyFields("type_", "id_")
160160
.isEqualTo(managerObject);
161161
assertThat(getObjectResponse.getRelationsList())
162162
.usingRecursiveFieldByFieldElementComparatorOnFields("objectId_", "objectType_", "relation_", "subjectId_", "subjectType_")
@@ -311,7 +311,7 @@ void testGetGraph() {
311311

312312
// Assert
313313
assertThat(getGraphResponse.getResultsList())
314-
.usingRecursiveFieldByFieldElementComparatorOnFields("objectId_", "objectType_", "relation_", "subjectId_", "subjectType_")
314+
.usingRecursiveFieldByFieldElementComparatorOnFields("objectType_", "objectId_")
315315
.containsExactlyInAnyOrderElementsOf(objectDependencyList);
316316
}
317317

@@ -430,9 +430,8 @@ void importDataTest() throws InterruptedException, UninitilizedClientException {
430430
// Assert
431431
GetObjectsResponse getObjectsResponse = directoryClient.getObjects("user");
432432
assertThat(getObjectsResponse.getResultsList())
433-
.usingRecursiveFieldByFieldElementComparatorOnFields("objectId_", "objectType_", "relation_", "subjectId_", "subjectType_")
433+
.usingRecursiveFieldByFieldElementComparatorOnFields("type_", "id_")
434434
.containsAll(users);
435-
436435
}
437436

438437
@Test

src/test/java/utils/IntegrationTestsExtenion.java renamed to src/test/java/utils/IntegrationTestsExtension.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import static org.junit.jupiter.api.extension.ExtensionContext.Namespace.GLOBAL;
1010

11-
public class IntegrationTestsExtenion implements BeforeAllCallback, ExtensionContext.Store.CloseableResource {
11+
public class IntegrationTestsExtension implements BeforeAllCallback, ExtensionContext.Store.CloseableResource {
1212

1313
private static boolean started = false;
1414
private static Topaz topaz;

0 commit comments

Comments
 (0)