| 1 |
<html> |
| 2 |
<body> |
| 3 |
|
| 4 |
<h2><a href="cvm.html">CVM</a></h2> |
| 5 |
<h2><a href="protocol-2.html">CVM Version 2 Proposed Protocol</a></h2> |
| 6 |
|
| 7 |
<h1>CVM Version 1 Protocol</h1> |
| 8 |
|
| 9 |
<h2>Input</h2> |
| 10 |
|
| 11 |
<p>Input to the authenticator is as follows. All items except the |
| 12 |
first, which is a single byte, are NUL-terminated strings. The total |
| 13 |
length of the input must not exceed 512 bytes.</p> |
| 14 |
|
| 15 |
<ol> |
| 16 |
|
| 17 |
<li>Protocol number, 1. |
| 18 |
|
| 19 |
<li>Account name base (ie user name). |
| 20 |
|
| 21 |
<li>Account domain name. |
| 22 |
|
| 23 |
<li>List of credentials. |
| 24 |
|
| 25 |
<li>An empty string (ie a single NUL byte). |
| 26 |
|
| 27 |
</ol> |
| 28 |
|
| 29 |
<p>The credentials consist of one of the following:</p> |
| 30 |
|
| 31 |
<ul> |
| 32 |
|
| 33 |
<li>For plain login, the password. |
| 34 |
|
| 35 |
<li>For APOP, the timestamp and MD5 digest. |
| 36 |
|
| 37 |
<li>For CRAM-MD5 keyed hashing, as specified in RFC 2095, the |
| 38 |
challenge and MD5 digest. |
| 39 |
|
| 40 |
</ul> |
| 41 |
|
| 42 |
<h2>Output</h2> |
| 43 |
|
| 44 |
<p>If authentication succeeds, the output from the module is a single |
| 45 |
byte success code followed by a list of <a href="facts.html">facts</a> |
| 46 |
about the authenticator. The total size of the output must not exceed |
| 47 |
512 bytes.</p> |
| 48 |
|
| 49 |
<p>If authentication succeeded, the code byte will be 0. If the |
| 50 |
credentials are accepted by this module, but are not valid, the code |
| 51 |
will be 100 (permanent failure). Any other code indicates a temporary |
| 52 |
error.</p> |
| 53 |
|
| 54 |
<p>Each fact consists of a single byte identifying what type of fact |
| 55 |
is being reported, followed by a sequence of zero or more non-NUL |
| 56 |
bytes, terminated by a single NUL byte. A second NUL byte follows the |
| 57 |
last fact and indicates the end of the list.</p> |
| 58 |
|
| 59 |
<h2>Environment Variables</h2> |
| 60 |
|
| 61 |
<p>The following environment variables may be set by the invoker:</p> |
| 62 |
|
| 63 |
<dl> |
| 64 |
|
| 65 |
<dt><tt>SERVICE</tt> <dd>The service name, to be used (for example) by |
| 66 |
PAM modules to determine which configuration file to load. |
| 67 |
|
| 68 |
</dl> |
| 69 |
|
| 70 |
<p><b>Note:</b> for non-command modules, the invoker is NOT the CVM |
| 71 |
client. The CVM client has no control over the environment variables |
| 72 |
of non-command modules.</p> |
| 73 |
|
| 74 |
<h2>Implementation Considerations</h2> |
| 75 |
|
| 76 |
<p>The module must report a temporary error if it detects malformed |
| 77 |
input (incorrect credentials, etc.). Extra data following the final |
| 78 |
NUL byte in the credentials is a fault in the invoking code, and must |
| 79 |
be rejected by the module. Similarly, extra data following the final |
| 80 |
NUL byte in the facts is a fault in the module code.</p> |
| 81 |
|
| 82 |
<p>All data following an unsuccessful result status code must be |
| 83 |
ignored by the invoking code. Modules should not produce any facts |
| 84 |
when validation fails.</p> |
| 85 |
|
| 86 |
<p>An executable module must exit 0 if authentication succeeds. |
| 87 |
Non-zero exit codes from an executable module should be treated as a |
| 88 |
temporary error.</p> |
| 89 |
|
| 90 |
<p>The invoker of an executable module must assume a temporary error |
| 91 |
if the module either fails to completely read its input or produces |
| 92 |
incomplete output, even if the module exits without error.</p> |
| 93 |
|
| 94 |
</body> |
| 95 |
</html> |