-
Hi, The question is: is it possible to achieve this type of configuration (distributed VirtualHSM and EJBCA) in the Community Edition or can i only do this in the EE? If i can do it in this version, what should i do? are there any drivers for softhsm that i need to install? here i attach the docker-compose.yml that i use (before pointing to the tokens folder) |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 26 replies
-
I would use a volume mount, as you also need to mount the SoftHSM instance files with the actual keys in them, and probably want to share those between different containers? The DPoD example uses mounts, while the Fortanix one uses file system overlay. Have you pulled the latest EJBCA container so it is updated? |
Beta Was this translation helpful? Give feedback.
-
I started the container with: I got the same issue as you. By enabling debug logging on the container I could see that EJBCA gets a response from softhsm, CKR_TOKEN_NOT_RECOGNIZED. This is a message from SoftHSM, meaning that it can't read the "token". |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
It is not just me that is experiencing issues, I'm asking some colleagues to help me with this configuration and they have the same problems... |
Beta Was this translation helpful? Give feedback.
-
Ok, could you at least have a look at this zip to see what is going on? because I have no other option, i have tried every single possibility. |
Beta Was this translation helpful? Give feedback.
-
I have just configured the SoftHSM container as you suggested, but it still does not work along with the image
I am afraid I have not understood well, you mean that I should create a custom image of EJBCA and install the SoftHSM not only in a separate container, but ALSO inside the EJBCA container? Is that right? Another question that may or may not be related. @svenska-primekey here you say:
What do you mean by PKCS#11 driver? What should I install inside my EJBCA container? |
Beta Was this translation helpful? Give feedback.
-
Thanks guys for all your support, I have really appreciated that. Anyways there is another little doubt now, whenever I create a new slot at runtime: |
Beta Was this translation helpful? Give feedback.
-
Hello @svenska-primekey @aleloco09 @primetomas , |
Beta Was this translation helpful? Give feedback.
-
@primetomas I have this problem when i wanna create a crypto token with Pkcs11 on ejbca interface . 2025-01-09 16:41:02,363+0000 ERROR [com.keyfactor.util.keys.token.pkcs11.SunP11SlotListWrapper] (default task-10) Method sun.security.pkcs11.wrapper.PKCS11.CK_C_INITIALIZE_ARGS.getInstance was not accessible, this may be due to a change in the underlying library.: java.lang.IllegalAccessException: class com.keyfactor.util.keys.token.pkcs11.SunP11SlotListWrapper cannot access class sun.security.pkcs11.wrapper.PKCS11 (in module jdk.crypto.cryptoki) because module jdk.crypto.cryptoki does not export sun.security.pkcs11.wrapper to unnamed module @7c10ea75 |
Beta Was this translation helpful? Give feedback.
-
@svenska-primekey @primetomas Hello, |
Beta Was this translation helpful? Give feedback.
Thanks guys for all your support, I have really appreciated that.
Thanks to your prompts, I have actually managed to run SoftHSM and EJBCA in 2 separated containers.
Bashing on the EJBCA container, I have
ldd
onlibsofthsm2.so
and there was a dependency problem:libcrypto.so.10
was missing.To overcome this, on the Dockerfile suggested by Sven that lib should be copied as well from the builder:
COPY --from=builder --chown=10001:0 /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.10
Anyways there is another little doubt now, whenever I create a new slot at runtime:
softhsm2-util --init-token --free --label RootCA --so-pin foo123 --pin foo123
In order to see it from the webapp, I need to r…