avatar image
Former Member

How to read a PrivateKey from Keystore within a LoginModule


i am trying to get a PrivateKey from TicketKeystore within a LoginModule for the Portal.

The following peace of code:

InitialContext ctx = new InitialContext(env);
KeystoreManager m_manager = (KeystoreManager) ctx.lookup("keystore");
KeyStore store = m_manager.getKeystore("TicketKeystore");
PrivateKey privateKey = (PrivateKey) store.getKey("SAPLogonTicketKeypair", "xyz".toCharArray());

, is working well in Portal Component Context if the current user is Administrator.

Within a LoginModule the current user is Guest so the line store.getKey("SAPLogonTicketKeypair", "xyz".toCharArray()); returns null.

Does anybody know how to make it work within the LoginModule context?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers

Skip to Content