 |
» |
|
|
 |
The basic architecture of an Oracle database includes many
different logical and physical storage structures. This section
only covers those structures as they relate to the configuration
of an Oracle database for AAA server access. The Oracle
Information Model |  |
An Oracle database is divided into one or more logical storage
structures. The highest-level structures are table spaces and user
schema. These structures provide two categories that data may be
logically grouped. Data belonging to one table space may belong
to different schema, and data for one schema may belong to different
table spaces. The physical database storage units, data files, are associated
with table spaces according to the logical structure of the database.
For example, table spaces may be created to separate different categories
of data. Table spaces are divided into smaller logical divisions
called segments, which are divided further into extents and data
blocks. These levels of data storage allow control over how the
data files are allocated for physical storage. A schema is a set of objects associated with a user. Schema
objects include tables and other data structures used by the database.
These objects do not directly correspond to data files stored on
the server. Each object’s data is stored in one or more
data files within a table space. You can specify the space allocated
for tables and a few other objects. Tables are the basic unit of storage in an Oracle database.
Tables are defined by a name, a set of columns, and other optional
parameters. For each column, a column name, data type, and width,
precision, or scale must be specified. When a table is created,
the database allocates a segment in a table space for the table. Using SQL statements, data is added and removed from the table
by rows. Each row represents one data record. Data can also be modified through
SQL by removing columns or changing the column value for a record. Configuring
the Oracle Database |  |
Create the table that will store your users and then add their information
to the table. You can create a new database for your user table
or add it to an existing database. To Create
the AUTH_NET_USERS Table Start up an instance
of the database where the users should be stored. Start SQL*Plus at the Unix prompt
and connect to the database with the SQLPLUS command. At the SQL prompt execute the
create table SQL statement to add AUTH_NET_USERS to the database.
The statement must follow the predefined structure described in Table 17-2 “Database Access Parameters”.
To create the table quickly, you can run the create.sql command file by entering START create.sql at the SQL prompt. To Manage
User Records in the AUTH_NET_USERS Table Add user records
with the following SQL command:
insert into AUTH_NET_USERS values ('User-Name', 'User-Password', Session-Timeout, Idle-Timeout, Port-Limit, Tunnel-Type, Tunnel-Medium-Type, 'Tunnel-Client-Endpoint', 'Tunnel-Server-Endpoint', 'Acct-Tunnel-Connection', Service-Type, Framed-Protocol, Framed-IP-Address, Framed-IP-Netmask, Framed-Routing,'Filter-Id', Framed-Compression); commit; |
Substitute attribute placeholders with an appropriate value
to assign to the corresponding column value. You can write a NULL
value to any attribute, except User-Name and Password. You can modify
the /opt/aaa/examples/oracle/insert.sql command file included with db_srv, and then add all the users defined in the file
by typing START insert.sql at the SQL prompt. Remove user
records with the following SQL commands:
delete from AUTH_NET_USERS where network_auth_name = 'User-Name'; commit; |
Substitute the User-Name placeholder with the network_auth_name user
record.  |  |  |  |  | NOTE: This delete command line will remove all users that
match User-Name. If you have duplicate records keyed on the same
network_auth_name value, all of the records will be deleted. |  |  |  |  |
You can use the /opt/aaa/examples/oracle/delete.sql command file included with db_srv to clear user(s) from the table by typing START delete.sql at the SQL prompt. The Oracle table contains a data record for each user. Each
row in the table represents one user. Figure 18-2 “Oracle Database Table Format” shows a sample table and its relationship with
the other database structures. The HP-UX AAA Server uses this information to perform authentication using
the network_auth_name and network_auth_password column values. The rest of the table’s
column values are passed back as reply items to the HP-UX AAA Server’s
Oracle process through the db_srv daemon. Table Structure |  |
For this implementation of the Oracle authentication type,
the table created to store users must be defined with the following
SQL statements: create table AUTH_NET_USERS ( PRIMARY KEY (network_auth_name), network_auth_name VARCHAR2(63), network_auth_password VARCHAR2(128), session_timeout number (10), idle_timeout number(10), port_limit number(10), tunnel_type number(10), tunnel_medium_type number(10), tunnel_client_end VARCHAR2(64), tunnel_server_end VARCHAR2(64), acct_tunnel_connection VARCHAR2(64), service_type number(10), framed_protocol number(10), framed_ip_addr number(10), framed_ip_netmask number(10), framed_routing number(10), filter_id VARCHAR(128), framed_compression number(10), |
An SQL*Plus command, /opt/aaa/examples/oracle/create.sql, to execute this statement, is distributed with the db_srv daemon.
|