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

    Fields inherited from class pygar.identity_authority.KeyStoreAccess

    currentEntity, keystoreJavaType
  • 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KeyStoreAccessDemo0

      public KeyStoreAccessDemo0​(java.lang.String entityName, java.lang.String javaKeystoreType, java.lang.String keystorePath, java.lang.String keystoreToken)
  • Method Details

    • getKeyStore

      public java.security.KeyStore getKeyStore​(KeyStoreType kst) throws java.lang.Exception
      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 class KeyStoreAccess
      Parameters:
      kst - The type of the keystore desired
      Returns:
      the KeyStore
      Throws:
      java.lang.Exception