Set multiple in-memory keystores to handle different pModes #158
Replies: 1 comment 10 replies
-
So for sending it is pretty straighforward - you just place the right The "problem" I can see here is, that neither Peppol nor BPC use "PMode" in the intended way, due to the dynamic participant handling, Therefore I assume problem is similiar to #117 and the proposed solution in #121. So if you implement you own However, while thinking about this - you need to make sure your solution is thread-safe, so that the conext PMode is e.g. stored in a ThreadLocal or so |
Beta Was this translation helpful? Give feedback.
-
Hi,
We are going to handle multiple pModes in our as4 server project. i.e. BPC and Peppol. Looks we need two
AS4CryptoFactoryInMemoryKeyStore
objects due to it accepts only one key alias-password pair.In our custom
AS4Servlet
we haveAS4XServletHandler.setCryptoFactorySupplier(() -> cf)
.I am thinking if this
Supplier.get()
function would have a pMode parameter that injected for each document received likeAS4XServletHandler.setCryptoFactorySupplier((pMode) -> if(pMode == "BPC") cfBPC else cfPeppol)
.Is my requirement is still achievable in a different way that I couldn't figured out yet, or needs to be implemented in phase4?
Beta Was this translation helpful? Give feedback.
All reactions