Class TransactionStoreCommands

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.Logable, edu.uiuc.ncsa.security.util.cli.Commands, Serializable

    public class TransactionStoreCommands
    extends StoreCommands2

    Created by Jeff Gaynor
    on 11/16/20 at 3:16 PM

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class edu.uiuc.ncsa.security.storage.cli.StoreCommands

        edu.uiuc.ncsa.security.storage.cli.StoreCommands.RSRecord
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String GC_CHECK_FLAG  
      static String GC_FILE_FLAG  
      static String GC_IS_ALARMS_FLAG  
      static String GC_IS_LOCK_FLAG  
      static String GC_IS_LOCKED_FLAG  
      static String GC_IS_UNLOCK_FLAG  
      static String GC_RUN_FLAG  
      static String GC_SAFE_MODE_FLAG  
      static String GC_SIZE_FLAG  
      static String GC_TEST_FLAG  
      static String LS_AT_FLAG  
      static String LS_RT_FLAG  
      • Fields inherited from class edu.uiuc.ncsa.security.storage.cli.StoreCommands

        ALL_LIST_COMMAND, allEntries, DEFAULT_MAGIC_NUMBER, display_width, FILE_FLAG, FORCE_COPY_FLAG, KEY_SHORTHAND_PREFIX, LINE_LIST_COMMAND, NEXT_N_COMMAND, RANDOM_ID_FLAG, resultSets, RM_FORCE_FLAG, RS_CLEAR_KEY, RS_LIST_INFO_KEY, RS_REMOVE_KEY, RS_SHOW_KEY, SEARCH_AFTER_TS_FLAG, SEARCH_BEFORE_TS_FLAG, SEARCH_DATE_FLAG, SEARCH_DEBUG_FLAG, SEARCH_REGEX_FLAG, SEARCH_RESULT_SET_NAME, SEARCH_RETURNED_ATTRIBUTES_FLAG, SEARCH_SHORT_REGEX_FLAG, SEARCH_SIZE_FLAG, SHORT_UPDATE_FLAG, SIZE_ALL_FLAG, SIZE_VERSIONS_FLAG, sortable, UPDATE_FLAG, UPKEEP_FLAG_CFG, UPKEEP_FLAG_ENABLE, UPKEEP_FLAG_RUN, UPKEEP_FLAG_SHOW, UPKEEP_FLAG_TEST, VERBOSE_COMMAND
      • Fields inherited from class edu.uiuc.ncsa.security.util.cli.CommonCommands

        BATCH_FILE_LINE_CONTINUES, BATCH_FILE_MODE_FLAG, BATCH_MODE_FLAG, batchFile, CL_INPUT_FILE_FLAG, CL_OUTPUT_FILE_FLAG, DEFAULT_NULL_VALUE_PLACEHOLDER, defaultIndent, INDENT, logger, placeHolder
    • Constructor Summary

      Constructors 
      Constructor Description
      TransactionStoreCommands​(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger, edu.uiuc.ncsa.security.core.Store store)  
      TransactionStoreCommands​(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger, String defaultIndent, org.oa4mp.server.loader.oauth2.OA2SE oa2se)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bootstrap()  
      void claims​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      protected String format​(edu.uiuc.ncsa.security.core.Identifiable identifiable)  
      void gc_check​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
      Does a basic garbage collection check against the RefreshTokenRetentionPolicy.
      void gc_lock​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      void gc_run​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      void get_by_at​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      void get_by_proxy_id​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      protected edu.uiuc.ncsa.security.core.Identifier getIDbyAT​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
      note that this (and getIDByRT(InputLine) are a bit specific in that they look things up by the JTI of the token, so quite a bit of proessign has been done already to get to this point.
      protected edu.uiuc.ncsa.security.core.Identifier getIDByRT​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      String getName()  
      org.oa4mp.server.loader.oauth2.storage.tx.TXStore getTxStore()  
      void ls​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      void rm_by_client_id​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
      Removes all transactions and TX records for a given client
      void set_qdl_state​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      void show_qdl_state​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      protected void showExp​(String tokenName, long lifetime, boolean isValid, TokenImpl token, int width, String stile)  
      void stats​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
      Print stats about the number of outstanding transactions and exchange/refresh records.
      void tokens​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)  
      boolean update​(edu.uiuc.ncsa.security.core.Identifiable identifiable)  
      • Methods inherited from class edu.uiuc.ncsa.security.storage.cli.StoreCommands

        actualCreate, addEntry, addEntry, archive, archiveFormat, clear_id, clear_store, clearEntries, copy, create, create, create, createEntry, createNew, deserialize, doCopy, doRename, edit, escapeRegex, findItem, formatLongLine, fromXMLMap, get_id, getAndCheckKeyArg, getArgList, getEditorEntry, getID, getKeyArg, getKeyArg, getMapConverter, getPrompt, getResultSets, getSerializationKeys, getSortable, getStore, getStoreArchiver, getTempDir, hasEntries, hasId, hasID, hasKey, inputJSON, isMonitored, list_keys, listAll, loadAllEntries, loadQDLScript, longFormat, longFormat, longFormat, multiLineInput, multiLinePropertyInput, oldls, oldrm, oldUpdate, preCreation, print_help, printRS, removeEntries, removeEntry, rename, rm, rmCleanup, rs, search, serialize, serialize, set_id, setEnvironment, setID, setIDFromInputLine, setResultSets, setSortable, setStore, showArchiveHelp, showCommandLineSwitchesHelp, showCreateHelp, showDeserializeHelp, showEntries, showEntry, showKeyShorthandHelp, showListKeysHelp, showLSHelp, showLSHelp3, showResultSetHelp, showRMHelp, showSearchHelp, showSearchHelpExamples, showSerializeHelp, showSizeHelp, showUpdateHelp, showUpkeepHelp, size, supportsQDL, toXMLMap, update, update, updateSingleValue, updateSingleValue, upkeep
      • Methods inherited from class edu.uiuc.ncsa.security.util.cli.CommonCommands

        clear_env, clearEnvHelp, debug, echo, echoHelp, error, get_env, getBufferedReader, getDriver, getHelpUtil, getInput, getIOInterface, getPlaceHolder, getPropertyHelp, getValue, gracefulExit, indentWidth, info, isBatch, isBatchFile, isBatchMode, isDebugOn, isEmpty, isOk, isPrintOuput, isVerbose, logit, print_env, printEnvHelp, printGetEnvHelp, printReadEnvHelp, printSaveEnvHelp, printSetEnvHelp, read_env, readFile, readJSON, readline, readline, save_env, say, say, say2, sayi, sayii, sayv, set_env, set_output_on, set_verbose_on, setBatchFile, setBatchMode, setBufferedReader, setDebugOn, setDriver, setHelpUtil, setIOInterface, setOutputOnHelp, setPlaceHolder, setPrintOuput, setVerbose, setVerboseHelp, showHelp, version, versionHelp, warn
    • Field Detail

      • GC_SAFE_MODE_FLAG

        public static String GC_SAFE_MODE_FLAG
      • GC_TEST_FLAG

        public static String GC_TEST_FLAG
      • GC_SIZE_FLAG

        public static String GC_SIZE_FLAG
      • GC_FILE_FLAG

        public static String GC_FILE_FLAG
      • GC_CHECK_FLAG

        public static String GC_CHECK_FLAG
      • GC_RUN_FLAG

        public static String GC_RUN_FLAG
      • GC_IS_LOCKED_FLAG

        public static String GC_IS_LOCKED_FLAG
      • GC_IS_UNLOCK_FLAG

        public static String GC_IS_UNLOCK_FLAG
      • GC_IS_LOCK_FLAG

        public static String GC_IS_LOCK_FLAG
      • GC_IS_ALARMS_FLAG

        public static String GC_IS_ALARMS_FLAG
    • Constructor Detail

      • TransactionStoreCommands

        public TransactionStoreCommands​(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger,
                                        String defaultIndent,
                                        org.oa4mp.server.loader.oauth2.OA2SE oa2se)
                                 throws Throwable
        Throws:
        Throwable
      • TransactionStoreCommands

        public TransactionStoreCommands​(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger,
                                        edu.uiuc.ncsa.security.core.Store store)
                                 throws Throwable
        Throws:
        Throwable
    • Method Detail

      • getTxStore

        public org.oa4mp.server.loader.oauth2.storage.tx.TXStore getTxStore()
      • getName

        public String getName()
      • update

        public boolean update​(edu.uiuc.ncsa.security.core.Identifiable identifiable)
                       throws IOException
        Overrides:
        update in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
        Throws:
        IOException
      • format

        protected String format​(edu.uiuc.ncsa.security.core.Identifiable identifiable)
        Specified by:
        format in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
      • tokens

        public void tokens​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                    throws Exception
        Throws:
        Exception
      • showExp

        protected void showExp​(String tokenName,
                               long lifetime,
                               boolean isValid,
                               TokenImpl token,
                               int width,
                               String stile)
      • claims

        public void claims​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                    throws Exception
        Throws:
        Exception
      • getIDbyAT

        protected edu.uiuc.ncsa.security.core.Identifier getIDbyAT​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
        note that this (and getIDByRT(InputLine) are a bit specific in that they look things up by the JTI of the token, so quite a bit of proessign has been done already to get to this point.
        Parameters:
        inputLine -
        Returns:
      • getIDByRT

        protected edu.uiuc.ncsa.security.core.Identifier getIDByRT​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
      • ls

        public void ls​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
        Overrides:
        ls in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
      • set_qdl_state

        public void set_qdl_state​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                           throws Throwable
        Throws:
        Throwable
      • show_qdl_state

        public void show_qdl_state​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                            throws Exception
        Throws:
        Exception
      • get_by_at

        public void get_by_at​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                       throws Exception
        Throws:
        Exception
      • get_by_proxy_id

        public void get_by_proxy_id​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                             throws Exception
        Throws:
        Exception
      • gc_check

        public void gc_check​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                      throws Exception
        Does a basic garbage collection check against the RefreshTokenRetentionPolicy. This component does not have access to the full service environment so cannot quite reconstruct the exact call: It will assume safeGC mode is set to false.
        Parameters:
        inputLine -
        Throws:
        Exception
      • gc_run

        public void gc_run​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                    throws Exception
        Throws:
        Exception
      • gc_lock

        public void gc_lock​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                     throws Exception
        Throws:
        Exception
      • bootstrap

        public void bootstrap()
                       throws Throwable
        Specified by:
        bootstrap in interface edu.uiuc.ncsa.security.util.cli.Commands
        Overrides:
        bootstrap in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
        Throws:
        Throwable
      • rm_by_client_id

        public void rm_by_client_id​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                             throws Exception
        Removes all transactions and TX records for a given client
        Parameters:
        inputLine -
        Throws:
        Exception
      • stats

        public void stats​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                   throws Exception
        Print stats about the number of outstanding transactions and exchange/refresh records.
        Parameters:
        inputLine -
        Throws:
        Exception