aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src
diff options
context:
space:
mode:
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java17
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTest.java3
2 files changed, 9 insertions, 11 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java
index af260528..f060a4cf 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateIdentityLinkTask.java
@@ -101,6 +101,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
@Autowired
EaafKeyStoreFactory keyStoreFactory;
+ private static final String EID_STATUS = "urn:eidgvat:eid.status.eidas";
Pair<KeyStore, Provider> ks;
/*
@@ -230,27 +231,24 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
}
if (eidMode.equals("new")) {
-
String keyAlias = pendingReq.getServiceProviderConfiguration().getConfigurationValue(
MsEidasNodeConstants.PROP_CONFIG_SP_AUTHBLOCK_FRIENDLYNAME, "");
-
String keyPw = pendingReq.getServiceProviderConfiguration()
.getConfigurationValue(MsEidasNodeConstants.PROP_CONFIG_SP_AUTHBLOCK_PW, "");
+ // get verschlüsselte Stammzahl
String vsz = szrClient.getEncryptedStammzahl(personInfo);
// build Keystore
String pk64 = getPkFromKeystore(keyAlias, keyPw);
+ // get eIDAS bind
+ String signedEidasBind = szrClient.getBcBind(vsz, pk64, EID_STATUS);
- String signedEidasBind = szrClient.getBcBind(vsz, pk64, "urn:eidgvat:eid.status.eidas");
- //TODO eidStatus as config?
-
- //build AuthBlock JWS
+ // build AuthBlock (JWS)
ObjectMapper mapper = new ObjectMapper();
String jwsPayload = mapper.writeValueAsString(pendingReq.getUniqueTransactionIdentifier());
-
String jwsSignature = JoseUtils
.createSignature(ks, keyAlias, keyPw.toCharArray(), jwsPayload, false, keyAlias);
@@ -277,9 +275,8 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
.getBasicConfigurationBoolean(Constants.CONIG_PROPS_EIDAS_SZRCLIENT_DEBUG_USESRZFORBPKGENERATION, true)) {
bpk = szrClient
.getBpk(personInfo, pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier(),
- basicConfig
- .getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_VKZ, "no VKZ defined"))
- .get(0);
+ basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_VKZ,
+ "no VKZ defined")).get(0);
} else {
log.debug("Calculating bPK from baseId ... ");
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTest.java
index c957e20c..d6bce8eb 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTest.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTest.java
@@ -143,7 +143,8 @@ public class SzrClientTest {
when(szrMock.getBPKFromStammzahlEncrypted(anyList()))
.thenReturn(Arrays.asList(result1));
-// szrMock.getStammzahlEncrypted() TODO ???
+ String stammzahlEncrypted = szrMock.getStammzahlEncrypted(new PersonInfoType(), false);
+
}
@Test