home *** CD-ROM | disk | FTP | other *** search
- This file describes the three programs included in this package that
- were not discussed in the March 1991 DBMS Bindery article. The three
- programs are:
-
- AddID
- VerID
- FindIDs
-
- Together, the three programs allow you to store application-specific
- userids in the bindery, and read them back to verify a user's entry to
- the application. You must be a Supervisor (or equivalent) to run the
- AddID and FindIDs programs successfully, but any user can run VerID
- (normally from a batch file) as part of an application start-up routine.
- ___________________________________________________________________________
- AddID - Allows the Supervisor to assign application-specific userids for
- any network user. The syntax is as follows:
-
- AddID <user-network-id> <appl-id> <user-id>
-
- where <user-network-id> is the user's network (login) id
- <appl-id> is a name assigned to the application (max 12 chars)
- <user-id> is the user's id for the application
-
- The Supervisor should assign application names consistently,
- e.g., Sales, Acct, Inventory. The user-id is the id the user
- must provide in order to gain access to the application (it acts
- as a password, really). For example:
-
- AddID Molly Sales Secret
-
- will assign a bindery property "SALES" to user Molly, with a
- property value of "SECRET". Using the VerID program (described
- next), Molly can be denied access to the Sales application
- unless she provides the userid "SECRET" when calling the Sales
- application.
-
- For conformity in assigning properties in the bindery, the
- program automatically appends "ID" to the application name (in
- this case, it stores the Sales application-id as SALESID in the
- bindery). This should be transparent to both the Supervisor
- assigning ids and the end-users. Only a programmer wishing to
- modify the code needs to be aware of this.
-
- AddID can be used to change a user's userid for a given
- application by simply calling it again. For example, to change
- Molly's id (password) from "Secret" to "Sneakers" for the Sales
- application, you'd type:
-
- AddID Molly Sales Sneakers
-
- Appropriate error messages are returned if the program is unable
- to assign a property (application name) and/or property value
- (userid).
-
- As an exercise, you may want to enhance the program to include a
- friendlier "front-end", allowing the Supervisor to enter values
- interactively, rather than as command-line parameters.
-
- ___________________________________________________________________________
-
- VerID - This program works in connection with AddID by verifying that
- the application-id/userid combination passed to the program
- (normally by the end user) matches what's stored in the bindery.
- Its syntax is:
-
- VerID <appl-id> <user-id>
- where <appl-id> is the name given to the application (note
- that this must match the name used in the
- AddID program)
- <user-id> is the application-specific userid
- (again, this must match the id assigned to
- the user through the AddID program).
-
- VerID validates the application-id/userid for the user who runs
- it (i.e., the login name of the person calling the program).
- It returns the following values:
-
- 0 - Match (successful)
- 1 - No match
- 2 - Can't read property value
- 3 - Too few parameters supplied
-
- VerID is designed to be used from an application start-up batch
- file. For example, a Sales application might have a start-up
- file that looks something like this:
-
- ECHO OFF
- VERID Sales %1
- IF ERRORLEVEL 1 GOTO NoWay
- ECHO Loading the Sales application...
- FoxProLn Sales
- GOTO End
- :NoWay
- ECHO Sorry, You're denied access to the Sales program
- :End
-
- ___________________________________________________________________________
-
- FindIDs - This program simply lists all users who have an
- application-specific property stored in the bindery. It can
- be run successfully only by a Supervisor (or equivalent).
- It's useful if you forget to whom you have assigned
- application ids, or the application names you've used. It
- DOES NOT list the userids, since this would be like listing all
- user passwords. If you really want to see the passwords, you
- can modify the program to call ReadPropertyValue and display
- the password. A more secure solution, though, is to simply
- change the userid by running AddID again and assigning a new
- userid for the given application-id (this is similar to what
- NetWare 2.1x does for user passwords).
-
- Note that the program does not show the "ID" that AddID
- appends to the end of all application names.
-
- ___________________________________________________________________________
-
- One final note: If you use these routines to incorporate security into
- your application, you will probably want to write another program that
- deletes specific properties for a given user. This will help you keep
- the bindery "clean", eliminating unused properties as necessary. You
- can write such a program using the DeleteProperty function call.
-
-
-