Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.8.0 #418

Merged
merged 43 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1290a0f
Bump maven-compiler-plugin version (3.10.1 → 3.11.0)
irotech Apr 18, 2023
6b5d12a
Bump animal-sniffer-maven-plugin version (1.21 → 1.23)
irotech Apr 18, 2023
ee2b5d9
Bump dependency-check-maven version (8.0.2 → 8.2.1)
irotech Apr 18, 2023
295ea25
Bump spring-boot-dependencies version (2.7.8 → 2.7.10)
irotech Apr 20, 2023
2569b58
Bump spring-boot-starter-parent version (2.7.1 → 2.7.10)
irotech Apr 20, 2023
390e282
NA: Drop dependency-check-maven fail build config
irotech Apr 20, 2023
6304eab
Bump maven-deploy-plugin version (3.0.0-M2 → 3.1.1)
irotech Apr 27, 2023
89a6449
Bump jacoco-maven-plugin version (0.8.8 → 0.8.10)
irotech Apr 27, 2023
e467c92
Bump maven-project-info-reports-plugin version (3.4.2 → 3.4.3)
irotech Apr 27, 2023
6160675
Bump maven-javadoc-plugin version (3.4.0 → 3.5.0)
irotech Apr 27, 2023
98d31a8
Bump maven-enforcer-plugin version (3.1.0 → 3.3.0)
irotech Apr 27, 2023
6cbd78c
Bump jackson version (2.14.2 → 2.15.0)
irotech Apr 27, 2023
019e0d7
Bump protobuf-java version (3.21.12 → 3.22.3)
irotech Apr 27, 2023
39ac65a
Bump slf4j version (2.0.6 → 2.0.7)
irotech Apr 27, 2023
fe83d28
SDK-2306: Migrate findbugs (3.0.5) → spotbugs (4.7.3)
irotech May 2, 2023
cd96dbd
Bump extra-enforcer-rules version (1.6.1 → 1.6.2)
irotech May 3, 2023
fb743bb
DEVELOPMENT: Set version to 3.8.0-SNAPSHOT
MrBurtyyy Jul 25, 2023
231c983
Bump protobuf-java version (3.22.3 → 3.22.4)
irotech Jul 25, 2023
3155849
Bump guava version (31.1-jre → 32.1.1-jre)
irotech Jul 25, 2023
917fce0
Bump maven-gpg-plugin version (3.0.1 → 3.1.0)
irotech Jul 25, 2023
1c6360d
Bump dependency-check-maven version (8.2.1 → 8.3.1)
irotech Jul 25, 2023
82d578a
Bump jackson version (2.15.0 → 2.15.2)
irotech Jul 25, 2023
cc6b6e8
Merge pull request #414 from getyoti/version_bumps
irotech Jul 26, 2023
4f28dd5
SDK-2231: Add Maven profile to set java release build version for JDK 9+
irotech Mar 7, 2023
b07c43c
SDK-2231: Add Digital Identity Client
irotech Mar 7, 2023
64ddcda
SDK-2231: Add Digital Identity Session creation representation layer
irotech Feb 27, 2023
ca7b48c
SDK-2231: Add Digital Identity Session creation service
irotech Mar 7, 2023
d887552
SDK-2249: Add Digital Identity Session QR code creation service
irotech Feb 28, 2023
bc72c96
SDK-2249: Reduce verbosity in path factory
irotech Mar 7, 2023
3cccf12
SDK-2256: Add Digital Identity Session QR code retrieval service
irotech Mar 1, 2023
2d68c99
SDK-2248: Add Digital Identity Session retrieval service
irotech Mar 9, 2023
fc514b2
SDK-2262: Add Digital Identity Session Receipt retrieval service
irotech Mar 9, 2023
8d59320
SDK-2262: Update spotbugs config
irotech May 3, 2023
cc02d84
SDK-2230: Add example for share v2
irotech Jul 26, 2023
3fb892b
Bump spring-boot-dependencies version (2.7.10 → 2.7.16)
irotech Oct 5, 2023
037241b
Bump spring-boot-starter-parent version (2.7.10 → 2.7.16)
irotech Oct 5, 2023
bf8b10c
Bump slf4j version (2.0.7 → 2.0.9)
irotech Oct 5, 2023
0cbf0f2
Bump protobuf-java version (3.22.4 → 3.24.4)
irotech Oct 5, 2023
febc54b
Bump commons.lang3 version (3.12.0 → 3.13.0)
irotech Oct 5, 2023
ca3c533
Bump dependency-check-maven version (8.3.1 → 8.4.0)
irotech Oct 5, 2023
84977a4
Bump extra-enforcer-rules version (1.6.2 → 1.7.0)
irotech Oct 5, 2023
e1034b8
Merge pull request #413 from getyoti/SDK-2230
irotech Oct 6, 2023
7416cb9
Release-3.8.0: Set version for release
irotech Oct 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ If you are using Maven, you need to add the following dependency:
<dependency>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-api</artifactId>
<version>3.7.0</version>
<version>3.8.0</version>
</dependency>
```

If you are using Gradle, here is the dependency to add:

`compile group: 'com.yoti', name: 'yoti-sdk-api', version: '3.7.0'`
`compile group: 'com.yoti', name: 'yoti-sdk-api', version: '3.8.0'`

You will find all classes packaged under `com.yoti.api`

Expand Down
6 changes: 4 additions & 2 deletions examples/doc-scan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.1</version>
<version>2.7.16</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>com.yoti.docscan.demo</groupId>
<artifactId>doc-scan-demo</artifactId>
<version>1.0.0</version>
Expand Down Expand Up @@ -51,7 +53,7 @@
<dependency>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-api</artifactId>
<version>3.7.0</version>
<version>3.8.0</version>
</dependency>
</dependencies>

Expand Down
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk</artifactId>
<packaging>pom</packaging>
<version>3.7.0</version>
<version>3.8.0</version>
<name>Yoti SDK</name>
<description>Java SDK for simple integration with the Yoti platform</description>
<url>https://github.com/getyoti/yoti-java-sdk</url>
Expand All @@ -21,8 +21,9 @@

<properties>
<!-- plugin versions -->
<maven-deploy-plugin.version>3.0.0-M2</maven-deploy-plugin.version>
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
<properties-maven-plugin.version>1.1.0</properties-maven-plugin.version>
<spotbugs-maven-plugin.version>4.7.3.4</spotbugs-maven-plugin.version>
</properties>

<build>
Expand Down Expand Up @@ -56,6 +57,11 @@
</executions>
</plugin>

<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs-maven-plugin.version}</version>
</plugin>
</plugins>
</build>

Expand Down
94 changes: 0 additions & 94 deletions yoti-sdk-api/findbugs-rules.xml

This file was deleted.

10 changes: 5 additions & 5 deletions yoti-sdk-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-parent</artifactId>
<version>3.7.0</version>
<version>3.8.0</version>
<relativePath>../yoti-sdk-parent</relativePath>
</parent>

Expand Down Expand Up @@ -82,10 +82,6 @@
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
Expand Down Expand Up @@ -115,6 +111,10 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
53 changes: 53 additions & 0 deletions yoti-sdk-api/spotbugs/exclude-filter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>

<FindBugsFilter>

<!-- These patterns became completely broken after 4.3 - ignored them -->
<!-- See https://github.com/spotbugs/spotbugs/issues/1797 -->
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>

<!-- Exclude generated classes from protobuf -->
<Match>
<Package name="com.yoti.api.client.spi.remote.proto"/>
</Match>

<!-- The IV comes from a trusted source -->
<Match>
<Class name="com.yoti.api.client.spi.remote.call.identity.ReceiptItemKey$Builder"/>
<Bug pattern="STATIC_IV"/>
</Match>

<!-- Legacy exclusions -->
<Match>
<Bug pattern="CRLF_INJECTION_LOGS"/>
</Match>

<Match>
<Class name="com.yoti.api.client.spi.remote.call.SignedRequest"/>
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
</Match>

<Match>
<Class name="com.yoti.api.client.spi.remote.call.SignedRequestBuilder"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>

<Match>
<Class name="com.yoti.api.client.spi.remote.EncryptedDataReader"/>
<Bug pattern="CIPHER_INTEGRITY"/>
</Match>

<Match>
<Or>
<Class name="com.yoti.api.client.UrlKeyPairSource"/>
<Class name="com.yoti.api.client.spi.remote.call.UrlConnector"/>
</Or>
<Bug pattern="URLCONNECTION_SSRF_FD"/>
</Match>

<Match>
<Class name="com.yoti.api.client.docs.DocScanService"/>
<Bug pattern="IMPROPER_UNICODE"/>
</Match>

</FindBugsFilter>
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package com.yoti.api.client;

import java.io.IOException;
import java.security.KeyPair;
import java.security.Security;

import com.yoti.api.client.identity.ShareSession;
import com.yoti.api.client.identity.ShareSessionQrCode;
import com.yoti.api.client.identity.ShareSessionRequest;
import com.yoti.api.client.spi.remote.KeyStreamVisitor;
import com.yoti.api.client.spi.remote.call.identity.DigitalIdentityException;
import com.yoti.api.client.spi.remote.call.identity.DigitalIdentityService;
import com.yoti.api.client.spi.remote.call.identity.Receipt;
import com.yoti.validation.Validation;

import org.bouncycastle.jce.provider.BouncyCastleProvider;

public class DigitalIdentityClient {

static {
Security.addProvider(new BouncyCastleProvider());
}

private final String sdkId;
private final KeyPair keyPair;
private final DigitalIdentityService identityService;

DigitalIdentityClient(String sdkId, KeyPairSource keyPair, DigitalIdentityService identityService) {
Validation.notNullOrEmpty(sdkId, "SDK ID");
Validation.notNull(keyPair, "Application Key Pair");

this.sdkId = sdkId;
this.keyPair = loadKeyPair(keyPair);
this.identityService = identityService;
}

public ShareSession createShareSession(ShareSessionRequest request) throws DigitalIdentityException {
return identityService.createShareSession(sdkId, keyPair, request);
}

public ShareSession fetchShareSession(String sessionId) throws DigitalIdentityException {
return identityService.fetchShareSession(sdkId, keyPair, sessionId);
}

public ShareSessionQrCode createShareQrCode(String sessionId) throws DigitalIdentityException {
return identityService.createShareQrCode(sdkId, keyPair, sessionId);
}

public ShareSessionQrCode fetchShareQrCode(String qrCodeId) throws DigitalIdentityException {
return identityService.fetchShareQrCode(sdkId, keyPair, qrCodeId);
}

public Receipt fetchShareReceipt(String receiptId) throws DigitalIdentityException {
return identityService.fetchShareReceipt(sdkId, keyPair, receiptId);
}

private KeyPair loadKeyPair(KeyPairSource keyPairSource) throws InitialisationException {
try {
return keyPairSource.getFromStream(new KeyStreamVisitor());
} catch (IOException ex) {
throw new InitialisationException("Cannot load Key Pair", ex);
}
}

public static Builder builder() {
return new Builder();
}

public static class Builder {

private String sdkId;
private KeyPairSource keyPairSource;

private Builder() { }

public Builder withClientSdkId(String sdkId) {
Validation.notNullOrEmpty(sdkId, "SDK ID");

this.sdkId = sdkId;
return this;
}

public Builder withKeyPairSource(KeyPairSource keyPairSource) {
Validation.notNull(keyPairSource, "Key Pair Source");

this.keyPairSource = keyPairSource;
return this;
}

public DigitalIdentityClient build() {
return new DigitalIdentityClient(sdkId, keyPairSource, DigitalIdentityService.newInstance());
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ public InitialisationException(String message) {
public InitialisationException(String message, Throwable cause) {
super(message, cause);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public interface KeyPairSource {
*/
KeyPair getFromStream(StreamVisitor streamVisitor) throws IOException, InitialisationException;

public static interface StreamVisitor {
interface StreamVisitor {
KeyPair accept(InputStream stream) throws IOException, InitialisationException;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ public ShareUrlResult createShareUrl(DynamicScenario dynamicScenario) throws Dyn

private KeyPair loadKeyPair(KeyPairSource kpSource) throws InitialisationException {
try {
LOG.debug("Loading key pair from '{}'", kpSource);
return kpSource.getFromStream(new KeyStreamVisitor());
} catch (IOException e) {
throw new InitialisationException("Cannot load key pair", e);
Expand Down
Loading
Loading