Class KESQLStore<V extends KERecord>

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.Store<V>, Map<edu.uiuc.ncsa.security.core.Identifier,​V>, KEStore<V>

    public class KESQLStore<V extends KERecord>
    extends edu.uiuc.ncsa.security.storage.sql.SQLStore<V>
    implements KEStore<V>
    • Field Summary

      • Fields inherited from class edu.uiuc.ncsa.security.storage.sql.SQLStore

        converter, identifiableProvider
      • Fields inherited from interface edu.uiuc.ncsa.security.core.Store

        VERSION_TAG
    • Constructor Summary

      Constructors 
      Constructor Description
      KESQLStore()  
      KESQLStore​(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, edu.uiuc.ncsa.security.storage.sql.internals.Table table, javax.inject.Provider<V> identifiableProvider, edu.uiuc.ncsa.security.storage.data.MapConverter<V> converter)  
    • Constructor Detail

      • KESQLStore

        public KESQLStore​(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool,
                          edu.uiuc.ncsa.security.storage.sql.internals.Table table,
                          javax.inject.Provider<V> identifiableProvider,
                          edu.uiuc.ncsa.security.storage.data.MapConverter<V> converter)
      • KESQLStore

        public KESQLStore()
    • Method Detail

      • getXMLConverter

        public KEConverter<V> getXMLConverter()
        Specified by:
        getXMLConverter in interface edu.uiuc.ncsa.security.core.Store<V extends KERecord>
        Overrides:
        getXMLConverter in class edu.uiuc.ncsa.security.storage.sql.SQLStore<V extends KERecord>
      • getCreationTSField

        public String getCreationTSField()
        Specified by:
        getCreationTSField in class edu.uiuc.ncsa.security.storage.sql.SQLStore<V extends KERecord>
      • getByKID

        public KERecord getByKID​(String kid)
        Description copied from interface: KEStore
        For a given key id (kid) find an return. Key ids are unique in the database. This may be null if there is no such KERecord.
        Specified by:
        getByKID in interface KEStore<V extends KERecord>
        Returns:
      • isValidDate

        protected boolean isValidDate​(Date date)
        Used for setting the date in JWKs. If the date exists and is valid, then return true Valid means that the long value is positive.
        Parameters:
        date -
        Returns:
      • getCurrentKeys

        public edu.uiuc.ncsa.security.util.jwk.JSONWebKeys getCurrentKeys​(VirtualIssuer vi)
        Description copied from interface: KEStore
        Gets the currently active keys for a given virtual issuer. Note that the virtual issuer for the server is OA2SE#SERVER_VI_ID. A current key is defined as having not expired and being valid.
        Specified by:
        getCurrentKeys in interface KEStore<V extends KERecord>
        Returns:
      • getCurrentKeys

        public edu.uiuc.ncsa.security.util.jwk.JSONWebKeys getCurrentKeys()
        Description copied from interface: KEStore
        Get all currently active keys.
        Specified by:
        getCurrentKeys in interface KEStore<V extends KERecord>
        Returns:
      • getByVID

        protected Map getByVID​(boolean keysOnly)
        Identical to #getByVID(VirtualIssuer, boolean) but for all virtual issuers..
        Parameters:
        keysOnly -
        Returns:
      • getByVID

        protected Map getByVID​(VirtualIssuer vi,
                               boolean validKeysOnly,
                               boolean keysOnly)
        Return the current keys for the given virtual issuer. If keysOnly is true, then return a JSONWebKeys object. Otherwise, return a map of KERecords.
        Parameters:
        vi -
        keysOnly -
        Returns:
      • getByVI

        public edu.uiuc.ncsa.security.core.util.IdentifiableMap<KERecord> getByVI​(VirtualIssuer vi)
        Description copied from interface: KEStore
        Return valid Key Records for a given virtual issuer. This means that they have no expired and are valid. The identifier is the ID of the KERecord.
        Specified by:
        getByVI in interface KEStore<V extends KERecord>
        Returns: