In this section: |
These commands are outside the Maintain language, but are described in this chapter for your convenience. You can issue these commands from within a WebFOCUS procedure, not from within a Maintain procedure.
Since the restriction information for a FOCUS data source is stored in its Master File, you might want to encrypt the Master File in order to prevent users from examining the restriction rules. Only the database administrator can encrypt a Master File. You must set PASS=DBA name before you issue the ENCRYPT command.
The following is an example of the complete procedure:
SET PASS=JONES76 ENCRYPT FILE PERS
The process can be reversed if you wish to change the restrictions. The command to restore the Master File to a readable form is DECRYPT.
The DBA password must be issued with the SET command before the Master File can be decrypted.
For example:
SET PASS=JONES76 DECRYPT FILE PERS
Once PASS is set, it is also possible to encrypt procedures by using the same ENCRYPT syntax. If no file extension is specified, the ENCRYPT command assumes an extension of .MAS, so be sure to include the extension when encrypting procedures. Also, remember to include the whole name of the file being encrypted, with no wildcards.
When encrypting any file, it is very important to enter its whole name after the ENCRYPT command. The use of wildcards could damage all the files that fit the file specification with the wildcards, and is therefore very dangerous.
You can also use the ENCRYPT command within the Master File to encrypt some or all of the data.
Encryption takes place on the segment level (that is, the entire segment is encrypted). The request for encryption is made in the Master File by setting the attribute ENCRYPT to ON. For instance:
SEGMENT=COMPSEG, PARENT=IDSEG, SEGTYPE=S1, ENCRYPT=ON,$
You must specify the ENCRYPT attribute when the file is new, before it contains any data. Encryption cannot be requested later by a change to the Master File and cannot be removed once it has been requested and any data has been entered in the file.
Note: Encryption is used only with FOCUS data sources.
There is a small loss in processing efficiency when data is encrypted. You can minimize this loss by grouping the sensitive data fields and making them a separate segment with SEGTYPE=U beneath their original segment, as shown in the following image.
Suppose the data items on a segment are:
They should be grouped as:
When you write a Master File for a new data source and include security limitations, data added to the data source is automatically protected according to those rules. If you write a new Master File for an existing data source that contains no data, that data will also be automatically protected. If, however, you have existing FOCUS data sources to which you want to add security limitations, you need to use the RESTRICT command.
Note: This is not the RESTRICT attribute.
The syntax is
RESTRICT C:filename.FOC
END
where:
Is the name of the data file that you want to protect.
Remember to specify the disk drive letter in this command. If you omit it, you will receive an error message. Also remember to include the file extension. Without it, the RESTRICT command will not be able to find the file.
RESTRICT is actually the next to last of a series of steps that are necessary when changing or adding a password to your data. The following outlines the steps:
The file now has the new password assigned to it.
Note: Before you begin this procedure, make sure to back up your data file.
WebFOCUS |