The Authorizer Lookup Command
l -- The Authorizer Lookup Command The lookup command is most often used with the authorizer DBM to test characteristics assigned to a PUID.
Characteristics are known associations the PUID has -- e.g., the person identified with the PUID is a student, is an employee, is enrolled in a particular course.
The puidnetd.hh symbol for the lookup command is PUIDNETD_CMD_LOOKUP.
These keys may be used to test a PUID's characteristics. The field identifier symbols come from puidnetd.h
- a -- alias (PUIDNETD_DATA_AKA); do an exact match on the alias field value.
- p -- PUID (PUIDNETD_DATA_PUID); do an exact match on the PUID field value.
- X -- a characteristics test expression (PUIDNETD_DATA_EXP)
An authorization characteristics Boolean expression, stored in the value of a PUIDNETD_DATA_EXP ('X') field, contains the logical representation of the characteristics test for a PUID.
A positive acknowledgement (ACK) reflector reply message may contain these fields. The field identifier symbols come from puidnetd.h
- a -- an alias (PUIDNETD_DATA_AKA);
- N -- a common name (PUIDNETD_DATA_CNM);
- p -- PUID (PUIDNETD_DATA_PUID); a unique PUID;
- v -- a true (1, one) or false (0, zero) expression evaluation value (PUIDNETD_DATA_EXPV).
A negative acknowledgement (NAK) reply with contain these fields.
- e -- an error code (PUIDNETD_DATA_ERRC);
- M -- a message (PUIDNETD_DATA_MSG).
Here is an example that applies the characteristic tests, "Is the PUID a student who is currently enrolled in C S 180?" to
The student characteristic number is 1; the characteristic number for C S 180 is 1003722. See the description of the characteristics lookup command for more information on how to find characteristic numbers.
External protocol lookup command message:
l p18 X0 & 1003722
Positive acknowledgement (ACK) reply when the test result is true:
a NFOO BAR p18 afoobar v1
Positive acknowledgement (ACK) reply when the test result is false:
a NFOO BAR p18 afoobar v0
Negative acknowledgement (NAK) reply:
n e17 MPerson not found (75)
17 is the external protocol PUIDNETD_EDBME error code. 75 is the internal protocol error number from the DBM, expanded in the first part of the message (PUIDNETD_DATA_MSG) field.