Skip to content

Commit 9c37667

Browse files
author
Olesja Aarma
committed
Merge branch 'RM-4611_mid_support' into 'master'
RM-4611: MID support See merge request cdoc2/cdoc2-shares-server!17
2 parents 0cf8c06 + 83e9b8c commit 9c37667

File tree

4 files changed

+25
-32
lines changed

4 files changed

+25
-32
lines changed

server-db/build-image.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ LIQUIBASE_IMAGE_NAME=cdoc2-shares-server-liquibase
1111
# version shows what version of shares-server is used in pair with liquibase image
1212
# Docker version should be same as shares-server-version although server-db pom version might be different
1313
docker build -t ${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/${LIQUIBASE_IMAGE_NAME}:${SHARES_SERVER_VERSION} ../server-db/src/main/resources/db
14+
docker tag ${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/${LIQUIBASE_IMAGE_NAME}:${SHARES_SERVER_VERSION} ${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/${LIQUIBASE_IMAGE_NAME}:latest

shares-server/pom.xml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<groupId>ee.cyber.cdoc2</groupId>
1313
<artifactId>cdoc2-shares-server</artifactId>
14-
<version>0.3.0-SNAPSHOT</version>
14+
<version>0.4.0-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<name>cdoc2-shares-server</name>
@@ -64,27 +64,19 @@
6464
<version>SID-1.6.1-SNAPSHOT</version>
6565
<scope>test</scope>
6666
</dependency>
67-
<!-- nimbus-jose-jwt JWK.parseFromPEMEncodedObjects() fails run-time with ClassNotFound for
68-
org/bouncycastle/openssl/jcajce/JcaPEMKeyConverter . Fix it -->
69-
<dependency>
70-
<groupId>org.bouncycastle</groupId>
71-
<artifactId>bcpkix-jdk18on</artifactId>
72-
<version>1.78</version>
73-
<scope>test</scope>
74-
</dependency>
75-
</dependencies>
76-
</profile>
77-
78-
<profile>
79-
<id>excludePkcs11AndSlowTests</id>
80-
<properties>
81-
<tests>!(pkcs11 | slow)</tests>
82-
</properties>
83-
</profile>
84-
85-
<profile>
86-
<id>github_ci_fork</id>
87-
<!-- for forks use base maven repo "open-eid/cdoc2-java-ref-impl" -->
67+
</dependencies>
68+
</profile>
69+
70+
<profile>
71+
<id>excludePkcs11AndSlowTests</id>
72+
<properties>
73+
<tests>!(pkcs11 | slow)</tests>
74+
</properties>
75+
</profile>
76+
77+
<profile>
78+
<id>github_ci_fork</id>
79+
<!-- for forks use base maven repo "open-eid/cdoc2-java-ref-impl" -->
8880
<activation>
8981
<property>
9082
<!-- defined by maven.yml for forks only -->
@@ -195,7 +187,7 @@
195187
<dependency>
196188
<groupId>ee.cyber.cdoc2</groupId>
197189
<artifactId>cdoc2-auth-token</artifactId>
198-
<version>0.2.0-SNAPSHOT</version>
190+
<version>0.3.2-SNAPSHOT</version>
199191
</dependency>
200192

201193
<dependency>

shares-server/src/test/java/ee/cyber/cdoc2/server/TestData.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
import java.security.KeyStore;
99
import java.security.cert.X509Certificate;
1010
import java.util.Properties;
11+
import java.util.Set;
1112

13+
import com.nimbusds.jose.JWSAlgorithm;
1214
import com.nimbusds.jose.JWSSigner;
1315
import com.nimbusds.jose.crypto.RSASSASigner;
1416
import com.nimbusds.jose.jwk.JWK;
@@ -172,22 +174,21 @@ public static String generateTestAuthTicket(String eid, String serverUrl, String
172174

173175
JWK jwk = JWK.parseFromPEMEncodedObjects(TEST_RSAKEY);
174176
RSAKey privateKey = jwk.toRSAKey();
175-
// RSAKey rsaPublicJWK = new RSAKey.Builder(privateKey.toRSAPublicKey())
176-
// .keyID(etsi.toString())
177-
// .build();
178177

179-
JWSSigner jwsSigner = new RSASSASigner(privateKey);
178+
JWSSigner jwsSigner = new RSASSASigner(privateKey) {
179+
// Smart-ID JWSSigner supports only RS256
180+
@Override
181+
public Set<JWSAlgorithm> supportedJWSAlgorithms() {
182+
return Set.of(JWSAlgorithm.RS256);
183+
}
184+
};
180185

181186
AuthTokenCreator token = AuthTokenCreator.builder()
182187
.withEtsiIdentifier(etsi) // "iss" field etsi/PNOEE-30303039914
183188
.withShareAccessData(new ShareAccessData(
184189
serverUrl,
185190
shareId,
186191
nonce))
187-
// .withShareAccessData(new ShareAccessData(
188-
// "https://cdoc-ccs.smit.ee:443/key-shares/",
189-
// "5BAE4603-C33C-4425-B301-125F2ACF9B1E",
190-
// "9d23660840b427f405009d970d269770417bc769"))
191192
.build();
192193

193194

shares-server/src/test/java/ee/cyber/cdoc2/server/api/KeyShareApiAuthenticationTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,4 @@ void shouldAuthenticateAndGetKeyShare() {
165165
assertArrayEquals(SHARE, resp.getBody().getShare());
166166
}
167167

168-
169168
}

0 commit comments

Comments
 (0)