Abstract:
An inventive method is presented for resource security in a database management system having a plurality of resources, the method comprising creating a macro and a corresponding data section definition (DSECT) defining security for each resource, assembling all of the DSECTs into a load module, processing the load module to obtain source code, and assembling the source code, such that changing the source code of one resource modifies the defined security of the resource and adding new source code to the source code adds a new resource having security to the plurality of resources. The processing step can comprise loading the load module, reading a DSECT having a total number of resources, and, for each resource of the total number of resources, reading a next DSECT, finding the defined security in the next DSECT, and obtaining the source code associated with the defined security.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates generally to database security, and more specifically to a system and method for resource security in a database management system. 
       BACKGROUND OF THE INVENTION 
       [0002]    A database management system (DBMS) is a suite of programs which typically manage large structured sets of data, offering ad hoc query facilities to many users. A DBMS is an extremely complex set of software programs that controls the organization, storage and retrieval of data (fields, records and files) in a database, as well as controlling the security and integrity of the database and its data. The DBMS accepts requests for data from one or more application programs and instructs the operating system to transfer the appropriate data. With a DBMS, information systems can be modified much more easily as the organization&#39;s information requirements change. For example, new categories of data can be added to the database without disrupting the existing system. 
         [0003]    A DBMS can employ a variety of data organizational techniques, including hierarchical, network, and relational structures, as well as inverted lists, and the DBMS&#39;s organization is not limited to only one approach. Hence, a DBMS can include navigational and/or relational (SQL) databases, as well as an Application Development System (ADS) which interfaces with user programs such as Cobol. Internet access can be provided to a DBMS using, for example, JDBC and ODBC standards. These systems can be run on a variety of operating systems, including z/OS, VSE and BS2000. Examples of DBMS applications include computerized library systems, flight reservation systems, computerized parts inventory systems, personnel systems, etc. 
         [0004]    Security is a primary concern in any DBMS. Data security prevents unauthorized users from viewing or updating the database. Users are allowed access to the entire database or subsets of the database, called subschemas, typically using passwords. The DBMS can further maintain the integrity of the database by not allowing more than one user to update the same record at the same time and/or by preventing the entry of duplicate records, that is, records with identical data or identical key fields. 
         [0005]    The various capabilities or resources, including a task, such as search, sort, compile, an activity, a program, a system program, sign on, and sign off, etc., contained in the DBMS must also be secured to maintain the integrity of the database. For example, in one well-known DBMS, security of these resources is controlled through a table load module that indicates what resources are secured, and, if a resource is secured, whether the security is provided internally or externally to the DBMS. Access to resources that are externally secured can be controlled by security systems such as ACF2, RACF or Top Secret. 
         [0006]    Controlling resources through a single table load module enhances security by placing resource security information in one secure location. However, a table load module is difficult to customize, update or amend. Source code, corresponding to the load module, must also be separately maintained, so that additions, deletions, and/or changes to resources, such as changing sign-on security from internal to external, can be made and the source can be re-assembled into an updated load module. Securely maintaining this source code is problematic; even if the code is placed in a secure location, it can be overwritten or inadvertently lost. Thus there is a need for a method for determining and amending a resource&#39;s security information in a load module when a change or addition to the resources is desired. 
       BRIEF SUMMARY OF THE INVENTION 
       [0007]    The present invention advantageously provides a method for determining the security information of a resource, and amending this information if necessary. The method for resource security in a database management system having one or more resources comprises creating a macro and a corresponding data section definition (DSECT) defining security for each resource, assembling all of the DSECTs into a load module, processing the load module to obtain source code, and assembling the source code, such that changing the source code of one resource modifies the defined security of the resource and adding new source code to the source code adds a new resource having security to the plurality of resources. The processing step can include loading the load module, reading a DSECT having a total number of resources, and, for each resource of the total number of resources, reading each parameter for each resource from a next DSECT, finding the defined security in the next DSECT, and obtaining the source code associated with the defined security. The source code assembly can comprise converting the source code to macros and corresponding DSECTs and assembling these DSECTs. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0008]    The invention is further described in the detailed description that follows, by reference to the noted drawings by way of non-limiting illustrative embodiments of the invention, in which like reference numerals represent similar parts throughout the drawings. As should be understood, however, the invention is not limited to the precise arrangements and instrumentalities shown. In the drawings: 
           [0009]      FIG. 1  is a flow diagram illustrating a method for creating a load module in accordance with the disclosure of the present invention; and 
           [0010]      FIG. 2  is a flow diagram illustrating a method for obtaining source code in accordance with the disclosure of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0011]    An inventive solution is presented to the need for a method for resource security in a DBMS. 
         [0012]    In an exemplary embodiment, a table load module, called RHDCSRTT, comprises security information for resources in a CA IDMS™ DBMS. The RHDCSRTT module is created by assembling a series of assembler macros, called #SECRTT macros, along with corresponding data section definitions. A #SECRTT macro with type INITIAL is the first macro assembled into the RHDCSRTT module, and a #SECRTT macro with type FINAL is the last macro in the module. The remaining macros have type ENTRY or OCCURRENCE. Each #SECRTT macro, other than those of type INITIAL and FINAL, corresponds to a specific resource and contains parameters to describe or define the specific resource, including how it should be secured, e.g., not secured, internally secured, or externally secured. Other parameters can be coded for each macro to provide more detailed information for execution time security checking. These parameters can include resource type, resource class name, and external name such as Activity, Application Name, Database Name, Data Definition Name, Environment, Resource External Name, Resource External Type, Schema, SSName, System, Version, etc. 
         [0013]      FIG. 1  illustrates the flow of the process for creating the table load module RHDCSRTT. In step S 1 , the #SECRTT macro with type INITIAL is created. This macro includes environmental parameters, system and user profile information or parameters, and default information including the total number of resources in the load module. In step S 2 , the macro is converted into a corresponding data section definition (DSECT) that will be assembled into the RHDCSRTT module. In one embodiment, the DSECT created from the #SECRTT macro with type INITIAL is called SECRTTHD, and the DSECT indicates that the header is INITIAL and the offset is 30. 
         [0014]    Next, #SECRTT macros for all resources are created. In step S 3 , the macro type is set, e.g., TYPE=ENTRY or TYPE=OCCURRENCE, along with the resource name and its parameters. In one embodiment, the #SECRTT macro is known as a security resource type table entry (SECRTTED). In step S 4 , a DSECT for the #SECRTT macro is created. The program checks for additional resources in step S 5 . If more resources exist (S 5 =YES), processing continues at step S 3 . Otherwise (S 5 =NO), in step S 6  the #SECRTT macro with type FINAL is created, along with its DSECT. In step S 7 , all of the DSECTs created from the #SECRTT macros are assembled into the RHDCSRTT module. 
         [0015]    The simplest description of the RHDCSRTT module is that the readable source, i.e. #SECRTT macros, is converted into a collection of hexadecimal strings with characters 0 through 9 then A through F in any combination. This basically describes the appearance of a load module such as RHDCSRTT. 
         [0016]    After its creation, the RHDCSRTT module can be read using its DSECTs. A DSECT can be thought of as a map that can be superimposed over the hexadecimal characters of the RHDCSRTT module to decipher the meaning of the characters. As discussed above, the DSECTs are generated into the RHDCSRTT load module from the #SECRTT source. Each DSECT is similar to a data record. 
         [0017]    When a resource needs to be added or changed, the program or routine of the present invention reads the RHDCSRTT module&#39;s strings of hexadecimal characters and converts them back to the series of #SECRTT macros from which they were generated. The regenerated source code can then be modified and re-assembled to recreate a new load module with the required changes. 
         [0018]      FIG. 2  illustrates the flow of the process for regenerating source code from the table load module RHDCSRTT. In step S 8 , the RHDCSRTT module is loaded. In step S 9 , the header or first DSECT in RHDCSRTT is read and the total number of resources defined in the RHDCSRTT module is retrieved. As discussed above, this first DSECT is SECRTTHD, which corresponds to #SECRTT TYPE=INITIAL. 
         [0019]    In step S 10 , the resource number is set to one (1). In step S 11 , the next DSECT, SECRTTED having TYPE=ENTRY or TYPE=OCCURRENCE (or OCCUR) is read. In step S 12 , the program checks each entry in the DSECT for the parameters available for the resource type of the DSECT, and each parameter that is found is stored in another DSECT created to hold the parameters and flags. The resource number is incremented by one in step S 13  and if the incremented resource number is less than the total number of resources (S 14 =YES), then processing continues at step S 11 . Otherwise (S 14 =NO), all of the DSECTs in the load module have been processed. The process concludes in step S 15 , when the #SECRTT with TYPE=FINAL is read. 
         [0020]    The regenerated source code obtained from the process can be modified to add new resources and/or to change the security parameter(s) of one or more existing resources. This modified source code can then be re-assembled to recreate a new load module reflecting the desired changes. The (re-)assembly can be performed as described and shown in  FIG. 1 . 
         [0021]    In one embodiment, the inventive routine to process the load module is embedded in a CA IDMS™ module, e.g. in the #LOOK macro from which IDMSLOOK and RHDCLOOK are assembled. The routine loads the RHDCSRTT module simply by coding the syntax LOOK RHDCSRTT online in IDM S™ from enter next task code, or in batch by specifying in the SYSIPT DD RHDCSRTT. 
         [0022]    The following pseudo-code illustrates an embodiment of the present invention. 
         [0023]    Load the RHDCSRTT load module. 
         [0024]    Read the header SECRTTHD DSECT noting what parameters were coded for the #SECRTT TYPE=INITIAL statement. This statement corresponds to the SECRTTHD DSECT. This DSECT stores additional information such as the number of occurrences of SECRTTED DSECT for each #SECRTT TYPE=ENTRY or #SECRTT TYPE=OCCUR statement. The SECRTTHD DSECT is immediately followed by a series of SECRTTED DSECT&#39;s. 
         [0025]    Store the parameters coded on #SECRTT TYPE=INITIAL from SECRTTHD to the SRTDSECT DSECT which is working storage for the routine. 
         [0026]    Write “#SECRTT TYPE=INITIAL” 
         [0027]    IF “ENVNAME=” was coded write a “,” after “#SECRTT TYPE=INITIAL” followed by an “X” in column 72 and write “ENVNAME=” on the next line of output. 
         [0028]    IF “SGNRETN=” was coded write “,” followed by “X” in column 72.
       Write “SGNRETN=” parameter on the following line.       
 
         [0030]    IF “SYSPROF=” was coded write “,” followed by an “X” in column 72.
       Write “SYSPROF=” parameter on the following line.   Write “(” after “SYSPROF=” followed by the option that was coded which could be “OFF”, “NULL”, “USER”, “GROUP”, “SYSTEM” or an actual “profile name”.   IF “ON” was coded write after the option coded for “SYSPROF=” then write “ON)”   ELSE write “)”       
 
         [0035]    IF USRPROF= was coded write “,” followed by “X” in column 72.
       Write “USRPROF=” parameter on the following line.   Write “(” after “USRPROF=” followed by the option that was coded which could be “OFF”, “NULL”, “GROUP”, “SYSTEM” or an actual “profile name”.   IF “ON” was coded write after the option coded for “USRPROF=” then write   ELSE write “)”       
 
         [0040]    IF “DFLTSGN=YES” was coded write followed by “X” in column 72.
       write “DFLTSGN=YES” parameter on the following line.       
 
         [0042]    IF “DFLTUID=” was coded write “,” followed by “X” in column 72.
       Write “DFLTUID=” parameter on the following line.   IF “(” was coded after DFLTUID then a parameter list of VTAMNODE and/or PTERMID and/or LTERMID was coded.
           Write “(VTAMNODE,PTERMID,LTERMID)”   
           ELSE Write the ‘userid’ after “DFLTUID=”.       
 
         [0047]    IF “EXTRUID=” was coded write “.” followed by “X” in column 72.
       Write “EXTRUID=userid”.       
 
         [0049]    IF “SVCNUM=” was coded write “.” followed by “X” in column 72.
       Write “SVCNUM=nnn” where nnn is the SVC number.       
 
         [0051]    This terminates the #SECRTT TYPE=INITIAL statement. 
         [0052]    The program then goes through a repeated cycle (loop) based on the number of SECRTTED entries in SECRTTHD. 
         [0000]    
       
         
               
             
           
               
                   
               
             
             
               
                  IF there is a “#SECRTT TYPE=” for SECRTTED write “#SECRTT TYPE=”. 
               
               
                   IF type is ENTRY write “ENTRY” 
               
               
                    IF “RESTYPE=” was coded write “.” then write “RESTYPE=restype” where 
               
               
                 restype is the actual resource type. 
               
               
                    IF “SECBY=” was coded write “,” followed by “X” in column 72 then 
               
               
                     write “SECBY=INT” or “SECBY=EXT” on the following line depending on 
               
               
                 whether internal or external was coded. 
               
               
                     IF “SECBY=EXT” was coded check for “EXTCLS=” 
               
               
                      IF “EXTCLS=” was coded write “.” followed by “X” in column 72. 
               
               
                      Write “EXTCLS=resource-class-name” on the following line. 
               
               
                      IF “EXTNAME=” was coded write “.” followed by “X” in column 72. 
               
               
                      Write “EXTCLS=(”. 
               
               
                      Write the parameters that were coded separated by commas and end with “)”. 
               
               
                   ELSE 
               
               
                    write “OCCUR”. 
               
               
                    IF “RESNAME=” was coded write “RESNAME=resource-name”. 
               
               
                    IF “RESTYPE=” was coded write “,” then “RESTYPE=resource-type” 
               
               
                     IF “EXTCLS=” was coded write “.” followed by “X” in column 72. 
               
               
                      Write “EXTCLS=resource-class-name” on the following line. 
               
               
                      IF “EXTNAME=” was coded write “.” followed by “X” in column 72. 
               
               
                      Write “EXTCLS=(”. 
               
               
                      Write the parameters that were coded separated by commas and end with “)”. 
               
               
                 ELSE write “#SECRTT TYPE=FINAL” 
               
               
                  Write “END” 
               
               
                   
               
             
          
         
       
     
         [0053]    Various aspects of the present disclosure may be embodied as a program, software, or computer instructions embodied in a computer or machine usable or readable medium, which causes the computer or machine to perform the steps of the method when executed on the computer, processor, and/or machine. 
         [0054]    The terms “computer system” and “computer network” as may be used in the present application may include a variety of combinations of fixed and/or portable computer hardware, software, peripherals, and storage devices. The computer system may include a plurality of individual components that are networked or otherwise linked to perform collaboratively, or may include one or more stand-alone components. The hardware and software components of the computer system of the present application may include and may be included within fixed and portable devices such as desktop, laptop, and/or server. A module may be a component of a device, software, program, or system that implements some “functionality”, which can be embodied as software, hardware, firmware, electronic circuitry, or etc. 
         [0055]    The embodiments described above are illustrative examples and it should not be construed that the present invention is limited to these particular embodiments. Thus, various changes and modifications may be effected by one skilled in the art without departing from the spirit or scope of the invention as defined in the appended claims.