Package pygar.demo0P
Class KeyStoreAccessDemo0
java.lang.Object
pygar.identity_authority.KeyStoreAccess
pygar.demo0P.KeyStoreAccessDemo0
public class KeyStoreAccessDemo0 extends KeyStoreAccess
The KeyStoreAccessDemo0 class implements the KeyStoreAccess abstract class in
a manner sufficient for the demonstration. However, there are issues. It
assumes the special directory structure used in the demonstration. Also, note
that it must be initialized with the name of the current application: that
is,the alias of the current user in the keystore. Finally, it needs a
password which is passed upon initialization. It does not provide a method to
securely obtain this password.
Finally, the Java JRE does not appear to implement keystores for SecretKeys, therefore, we cannot get the session keystore option to work. For now, we need a workaround in another class until this issue is resolved.
This package is also used in Demo1 versions.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description KeyStoreAccessDemo0(java.lang.String entityName, java.lang.String javaKeystoreType, java.lang.String keystorePath, java.lang.String keystoreToken)
-
Method Summary
Modifier and Type Method Description java.security.KeyStore
getKeyStore(KeyStoreType kst)
Return the KeyStore for the entity that is running the current application.
-
Constructor Details
-
KeyStoreAccessDemo0
public KeyStoreAccessDemo0(java.lang.String entityName, java.lang.String javaKeystoreType, java.lang.String keystorePath, java.lang.String keystoreToken)
-
-
Method Details
-
getKeyStore
Return the KeyStore for the entity that is running the current application. Note: the option for a session keystore doesn't work because the underlying JCA method doesn't work in any fashion that I've discovered. That may be a limitation of the JKS keystore. We should test JCEKS.- Specified by:
getKeyStore
in classKeyStoreAccess
- Parameters:
kst
- The type of the keystore desired- Returns:
- the KeyStore
- Throws:
java.lang.Exception
-