Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to force Crypto engine to reload a Keystore?

 
Oscar Romero
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm facing a problem which I have to resolve as soon as possible, and any help would be really appreciated guys. I have a WS up and running and I need that everytime a public key is added or deleted from the Keystore, the clients which are validating against this server Keystore, can see the changes in it dynamically, without having to restart the server.

I'm yet to find any clue on the network. I'll keep searching though.

Thanks in advance, and sorry about bad english.
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. This article Configuring Keystore dynamically in WebServices using Metro sounds like it might be of help. Let me know how that works out The link uses Metro, but you can implement the same thing in Axis if that is what you are using. Best of luck!
 
Oscar Romero
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Srini!

I'll give it a look and see if I can get it to work. I'm using CXF by the way.

 
Oscar Romero
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I finally solved the problem.

We are using CXF + WSS4J, so all I had to do is create a custom in-interceptor that extends WSS4JInInterceptor and override the method loadSignatureCrypto.

Basically I got the KeyStore held by the Crypto object and realoded it with an input stream containing the KeyStore stored in the server. It works perfectly.
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very nice. Thank you for sharing the solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic