sasl 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. This is ../../info/sasl, produced by makeinfo version 4.13 from
  2. sasl.texi.
  3. This file describes the Emacs SASL library, version 0.2.
  4. Copyright (C) 2000, 2004-2012 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this
  6. document under the terms of the GNU Free Documentation License,
  7. Version 1.3 or any later version published by the Free Software
  8. Foundation; with no Invariant Sections, with the Front-Cover texts
  9. being "A GNU Manual," and with the Back-Cover Texts as in (a)
  10. below. A copy of the license is included in the section entitled
  11. "GNU Free Documentation License" in the Emacs manual.
  12. (a) The FSF's Back-Cover Text is: "You have the freedom to copy and
  13. modify this GNU manual. Buying copies from the FSF supports it in
  14. developing GNU and promoting software freedom."
  15. This document is part of a collection distributed under the GNU
  16. Free Documentation License. If you want to distribute this
  17. document separately from the collection, you can do so by adding a
  18. copy of the license to the document, as described in section 6 of
  19. the license.
  20. INFO-DIR-SECTION Emacs network features
  21. START-INFO-DIR-ENTRY
  22. * SASL: (sasl). The Emacs SASL library.
  23. END-INFO-DIR-ENTRY
  24. 
  25. File: sasl, Node: Top, Next: Overview, Up: (dir)
  26. Emacs SASL
  27. **********
  28. SASL is a common interface to share several authentication mechanisms
  29. between applications using different protocols.
  30. This file describes the Emacs SASL library, version 0.2.
  31. Copyright (C) 2000, 2004-2012 Free Software Foundation, Inc.
  32. Permission is granted to copy, distribute and/or modify this
  33. document under the terms of the GNU Free Documentation License,
  34. Version 1.3 or any later version published by the Free Software
  35. Foundation; with no Invariant Sections, with the Front-Cover texts
  36. being "A GNU Manual," and with the Back-Cover Texts as in (a)
  37. below. A copy of the license is included in the section entitled
  38. "GNU Free Documentation License" in the Emacs manual.
  39. (a) The FSF's Back-Cover Text is: "You have the freedom to copy and
  40. modify this GNU manual. Buying copies from the FSF supports it in
  41. developing GNU and promoting software freedom."
  42. This document is part of a collection distributed under the GNU
  43. Free Documentation License. If you want to distribute this
  44. document separately from the collection, you can do so by adding a
  45. copy of the license to the document, as described in section 6 of
  46. the license.
  47. * Menu:
  48. * Overview:: What Emacs SASL library is.
  49. * How to use:: Adding authentication support to your applications.
  50. * Data types::
  51. * Back end drivers:: Writing your own drivers.
  52. * Index::
  53. * Function Index::
  54. * Variable Index::
  55. 
  56. File: sasl, Node: Overview, Next: How to use, Prev: Top, Up: Top
  57. 1 Overview
  58. **********
  59. SASL is short for "Simple Authentication and Security Layer". This
  60. standard is documented in RFC2222. It provides a simple method for
  61. adding authentication support to various application protocols.
  62. The toplevel interface of this library is inspired by Java SASL
  63. Application Program Interface. It defines an abstraction over a series
  64. of authentication mechanism drivers (*note Back end drivers::).
  65. Back end drivers are designed to be close as possible to the
  66. authentication mechanism. You can access the additional configuration
  67. information anywhere from the implementation.
  68. 
  69. File: sasl, Node: How to use, Next: Data types, Prev: Overview, Up: Top
  70. 2 How to use
  71. ************
  72. (Not yet written).
  73. To use Emacs SASL library, please evaluate following expression at
  74. the beginning of your application program.
  75. (require 'sasl)
  76. If you want to check existence of sasl.el at runtime, instead you
  77. can list autoload settings for functions you want.
  78. 
  79. File: sasl, Node: Data types, Next: Back end drivers, Prev: How to use, Up: Top
  80. 3 Data types
  81. ************
  82. There are three data types to be used for carrying a negotiated
  83. security layer--a mechanism, a client parameter and an authentication
  84. step.
  85. * Menu:
  86. * Mechanisms::
  87. * Clients::
  88. * Steps::
  89. 
  90. File: sasl, Node: Mechanisms, Next: Clients, Up: Data types
  91. 3.1 Mechanisms
  92. ==============
  93. A mechanism (`sasl-mechanism' object) is a schema of the SASL
  94. authentication mechanism driver.
  95. -- Variable: sasl-mechanisms
  96. A list of mechanism names.
  97. -- Function: sasl-find-mechanism mechanisms
  98. Retrieve an appropriate mechanism. This function compares
  99. MECHANISMS and `sasl-mechanisms' then returns appropriate
  100. `sasl-mechanism' object.
  101. (let ((sasl-mechanisms '("CRAM-MD5" "DIGEST-MD5")))
  102. (setq mechanism (sasl-find-mechanism server-supported-mechanisms)))
  103. -- Function: sasl-mechanism-name mechanism
  104. Return name of mechanism, a string.
  105. If you want to write an authentication mechanism driver (*note Back
  106. end drivers::), use `sasl-make-mechanism' and modify `sasl-mechanisms'
  107. and `sasl-mechanism-alist' correctly.
  108. -- Function: sasl-make-mechanism name steps
  109. Allocate a `sasl-mechanism' object. This function takes two
  110. parameters--name of the mechanism, and a list of authentication
  111. functions.
  112. (defconst sasl-anonymous-steps
  113. '(identity ;no initial response
  114. sasl-anonymous-response))
  115. (put 'sasl-anonymous 'sasl-mechanism
  116. (sasl-make-mechanism "ANONYMOUS" sasl-anonymous-steps))
  117. 
  118. File: sasl, Node: Clients, Next: Steps, Prev: Mechanisms, Up: Data types
  119. 3.2 Clients
  120. ===========
  121. A client (`sasl-client' object) initialized with four parameters--a
  122. mechanism, a user name, name of the service and name of the server.
  123. -- Function: sasl-make-client mechanism name service server
  124. Prepare a `sasl-client' object.
  125. -- Function: sasl-client-mechanism client
  126. Return the mechanism (`sasl-mechanism' object) of client.
  127. -- Function: sasl-client-name client
  128. Return the authorization name of client, a string.
  129. -- Function: sasl-client-service client
  130. Return the service name of client, a string.
  131. -- Function: sasl-client-server client
  132. Return the server name of client, a string.
  133. If you want to specify additional configuration properties, please
  134. use `sasl-client-set-property'.
  135. -- Function: sasl-client-set-property client property value
  136. Add the given property/value to client.
  137. -- Function: sasl-client-property client property
  138. Return the value of the property of client.
  139. -- Function: sasl-client-set-properties client plist
  140. Destructively set the properties of client. The second argument
  141. is the new property list.
  142. -- Function: sasl-client-properties client
  143. Return the whole property list of client configuration.
  144. 
  145. File: sasl, Node: Steps, Prev: Clients, Up: Data types
  146. 3.3 Steps
  147. =========
  148. A step (`sasl-step' object) is an abstraction of authentication "step"
  149. which holds the response value and the next entry point for the
  150. authentication process (the latter is not accessible).
  151. -- Function: sasl-step-data step
  152. Return the data which STEP holds, a string.
  153. -- Function: sasl-step-set-data step data
  154. Store DATA string to STEP.
  155. To get the initial response, you should call the function
  156. `sasl-next-step' with the second argument `nil'.
  157. (setq name (sasl-mechanism-name mechanism))
  158. At this point we could send the command which starts a SASL
  159. authentication protocol exchange. For example,
  160. (process-send-string
  161. process
  162. (if (sasl-step-data step) ;initial response
  163. (format "AUTH %s %s\r\n" name (base64-encode-string (sasl-step-data step) t))
  164. (format "AUTH %s\r\n" name)))
  165. To go on with the authentication process, all you have to do is call
  166. `sasl-next-step' consecutively.
  167. -- Function: sasl-next-step client step
  168. Perform the authentication step. At the first time STEP should be
  169. set to `nil'.
  170. 
  171. File: sasl, Node: Back end drivers, Next: Index, Prev: Data types, Up: Top
  172. 4 Back end drivers
  173. ******************
  174. (Not yet written).
  175. 
  176. File: sasl, Node: Index, Next: Function Index, Prev: Back end drivers, Up: Top
  177. 5 Index
  178. *******
  179. [index]
  180. * Menu:
  181. 
  182. File: sasl, Node: Function Index, Next: Variable Index, Prev: Index, Up: Top
  183. 6 Function Index
  184. ****************
  185. [index]
  186. * Menu:
  187. * sasl-client-mechanism: Clients. (line 13)
  188. * sasl-client-name: Clients. (line 16)
  189. * sasl-client-properties: Clients. (line 38)
  190. * sasl-client-property: Clients. (line 31)
  191. * sasl-client-server: Clients. (line 22)
  192. * sasl-client-service: Clients. (line 19)
  193. * sasl-client-set-properties: Clients. (line 34)
  194. * sasl-client-set-property: Clients. (line 28)
  195. * sasl-find-mechanism: Mechanisms. (line 13)
  196. * sasl-make-client: Clients. (line 10)
  197. * sasl-make-mechanism: Mechanisms. (line 29)
  198. * sasl-mechanism-name: Mechanisms. (line 22)
  199. * sasl-next-step: Steps. (line 34)
  200. * sasl-step-data: Steps. (line 11)
  201. * sasl-step-set-data: Steps. (line 14)
  202. 
  203. File: sasl, Node: Variable Index, Prev: Function Index, Up: Top
  204. 7 Variable Index
  205. ****************
  206. [index]
  207. * Menu:
  208. * sasl-mechanisms: Mechanisms. (line 10)
  209. 
  210. Tag Table:
  211. Node: Top1305
  212. Node: Overview2873
  213. Node: How to use3555
  214. Node: Data types3938
  215. Node: Mechanisms4240
  216. Node: Clients5580
  217. Node: Steps6878
  218. Node: Back end drivers8052
  219. Node: Index8193
  220. Node: Function Index8316
  221. Node: Variable Index9552
  222. 
  223. End Tag Table