Using the Cyrus SASL Sample Programs
The Cyrus SASL distribution includes a 2 sets of testing/sample applications in the sample subdirectory of the cyrus sasl source distribution. sample-server.c/sample-client.c and the server.c/client.c
Using server.c/client.c
Most RPM distributions include these as sasl-sample-server/sasl-sample-client or sasl2-sample-server/sasl2-sample-client.
Both tools take 3 optional arguments,
- -p
- the tcp port to listen/connect on which defaults to 12345
- -s
- the service to use which defaults to rcmd, and I'm not quite sure how this is used in sasl as it is not the config filename.
- -m
- the mechanism to use to authenticate which defaults to the first in the sasl mech_list configuration.
the client application takes a manditory parameter of the hostname/ip of the server.
To use these applications you need two terminals/console/ttys/xterms open to the server you are testing authentiaction on, or two different machines as the sample program does run over TCP/IP.
first setup the sasl configuration file for th sample server which is sample.conf in /usr/lib/sasl2 (or /usr/local/lib/sasl2 depending on your installation)
pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: plain login ntlm cram-md5 digest-md5
Run the server in one terminal like so
sasl-sample-server -p 12345
then in the other teminal run (replace localhost with the hostname of the sample-server is running on if you testing on 2 separate systems.)
sasl-sample-client -p 12345 -m PLAIN localhost
The client will prompt you for the authentication id, authorization id, and the password and then send them to the server via the specified mechanism to authentication the user. and return either
successful authentication of
authentication failed.
Using sample-server.c/sample-client.c
To Be Written
--
TWikiGuest - 25 Apr 2005
Topic revision: r15 - 31 Aug 2005 - 15:03:49 -
TWikiGuest