This document contains information pertinent to the pgipfauth (version 0.1) executable.
The pgipfauth daemon accepts the following command line options:
usage:
/usr/local/pgipfauth/current/bin/pgipfauth {options}
options:
--help/-h this info
--quiet/-q don't print anything except critical information
--annoying/-a print so much that the sysadmin will go crazy trying to read
our log files
--daemon/-d run as a daemon (not in the foreground)
--invalidator/-i [path] use [path] as the FIFO we should watch for cache invalidation
requests; default is /usr/local/pgipfauth/0.1/etc/cache-invalidate
--config/-c [path] use [path] as the configuration file; default configuration file
is at: /usr/local/pgipfauth/0.1/etc/pgipfauth.conf
signals:
HUP force the daemon to dump its cache, close the database connection,
and re-read the configuration file
USR1 write current info for the cache and database to the daemon's
stdout
USR2 force the daemon to purge its cache
TERM,ABRT,QUIT,INT terminate the daemon gracefully
The –daemon option just means that the process forks off a child and exits (the usual daemon behavior). Cache coherency issues and their relation to the USR2 signal and –invalidator CLI option are covered later in this document.
An XML configuration file is used to provide the majority of the startup parameters to the pgipfauth daemon:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pgipfauth-conf PUBLIC "-//UDEL//DTD pgipfauth configuration 1.0//EN"
"http://metal1.nss.udel.edu/DTDs/pgipfauth-conf_1.0.dtd"
>
<pgipfauth-conf
version="1.0"
authoritative="yes"
ipf-logging="yes"
ipf-keep-state="yes"
ipf-return-reset="yes"
>
<database>
<dbname>ipfauth</dbname>
<schema>alternate</schema>
<host-group>FlexLM</host-group>
</database>
<cache enabled="yes" size="256" ttl="600" honor-ip-port="no">
<search method="stateful"/>
<adaptive enabled="yes" grow-by="64" critical-fraction="0.10"/>
</cache>
</pgipfauth-conf>
The version attribute MUST be included in the pgipfauth-conf tag; it can also have the following attributes:
In the configuration above, pgipfauth is instructed to return the following dispositions back to IPF:
The database element provides the connection information pgipfauth needs in order to connect to the database for authorization queries. The following sub-elements are used when connecting to the database:
pgipfauth should read the password. Use the type="inline" attribute for the former and type="external" for the latter.There are two additional sub-elements that configure the nature of the database queries:
public in the databaseThe nature of the authorization SQL and host-groups will be covered in the next chapter.
By default, no caching is done by pgipfauth. The cache is configured by the cache element; this element has two attributes:
The honor-ip-port option is available to conserve cache lines in the instance where the inbound port is just not important. An example is the application for which pgipfauth was created: an license daemon that listens on a random TCP/IP port needs a large port range to be "open" but access still needs to be controlled to keep unauthorized users from grabbing licenses. In this case, the connection profile dictates that the TCP/IP port is not integral in authorizing a connection.
pgipfauth to the SQL authorization functions (see next section). You must write your SQL authorization functions in such a way that they treat the port the same way you configure the cache to treat the port!
A search sub-element specifies which algorithm should be used when searching the cache for an IP. The algorithm is selected by providing the method attribute, which may have the values:
pgipfauth chooses
Finally, the adaptive sub-element is used to enable/disable pgipfauth's ability to automatically add more cache lines if the cache is full and the miss ratio reaches some critical value:
The configuration file is stored by default in an etc directory inside the install directory of pgipfauth. An alternate configuration can be passed to the daemon by use of the –config command-line option:
% pgipfauth --config /etc/pgipfauth.conf