pyrad 2.3__tar.gz → 2.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. pyrad-2.5.0/CHANGES.rst +301 -0
  2. {pyrad-2.3 → pyrad-2.5.0}/LICENSE.txt +2 -1
  3. pyrad-2.5.0/MANIFEST.in +7 -0
  4. pyrad-2.5.0/PKG-INFO +126 -0
  5. {pyrad-2.3 → pyrad-2.5.0}/README.rst +22 -6
  6. pyrad-2.5.0/TODO.rst +2 -0
  7. pyrad-2.5.0/docs/Makefile +20 -0
  8. pyrad-2.5.0/docs/make.bat +36 -0
  9. pyrad-2.5.0/docs/source/_static/logo.png +0 -0
  10. pyrad-2.5.0/docs/source/api/client.rst +10 -0
  11. pyrad-2.5.0/docs/source/api/dictionary.rst +10 -0
  12. pyrad-2.5.0/docs/source/api/host.rst +7 -0
  13. pyrad-2.5.0/docs/source/api/packet.rst +48 -0
  14. pyrad-2.5.0/docs/source/api/proxy.rst +7 -0
  15. pyrad-2.5.0/docs/source/api/server.rst +13 -0
  16. pyrad-2.5.0/docs/source/conf.py +158 -0
  17. pyrad-2.5.0/docs/source/index.rst +75 -0
  18. {pyrad-2.3 → pyrad-2.5.0}/example/acct.py +0 -1
  19. {pyrad-2.3 → pyrad-2.5.0}/example/auth.py +0 -1
  20. {pyrad-2.3 → pyrad-2.5.0}/example/client-coa.py +0 -1
  21. {pyrad-2.3 → pyrad-2.5.0}/example/coa.py +0 -1
  22. pyrad-2.5.0/example/dictionary.freeradius +91 -0
  23. pyrad-2.5.0/example/pyrad.log +0 -0
  24. {pyrad-2.3 → pyrad-2.5.0}/example/server.py +0 -1
  25. {pyrad-2.3 → pyrad-2.5.0}/example/status.py +0 -1
  26. pyrad-2.5.0/pyproject.toml +60 -0
  27. {pyrad-2.3 → pyrad-2.5.0}/pyrad/__init__.py +3 -3
  28. {pyrad-2.3 → pyrad-2.5.0}/pyrad/client.py +54 -9
  29. {pyrad-2.3 → pyrad-2.5.0}/pyrad/client_async.py +22 -14
  30. {pyrad-2.3 → pyrad-2.5.0}/pyrad/dictfile.py +2 -5
  31. {pyrad-2.3 → pyrad-2.5.0}/pyrad/dictionary.py +12 -1
  32. {pyrad-2.3 → pyrad-2.5.0}/pyrad/host.py +1 -1
  33. {pyrad-2.3 → pyrad-2.5.0}/pyrad/packet.py +208 -133
  34. {pyrad-2.3 → pyrad-2.5.0}/pyrad/proxy.py +2 -2
  35. {pyrad-2.3 → pyrad-2.5.0}/pyrad/server.py +3 -7
  36. {pyrad-2.3 → pyrad-2.5.0}/pyrad/server_async.py +4 -5
  37. pyrad-2.5.0/pyrad/tests/__init__.py +5 -0
  38. {pyrad-2.3 → pyrad-2.5.0}/pyrad/tests/mock.py +5 -1
  39. pyrad-2.3/pyrad/tests/testBidict.py → pyrad-2.5.0/pyrad/tests/test_bidict.py +2 -2
  40. pyrad-2.3/pyrad/tests/testClient.py → pyrad-2.5.0/pyrad/tests/test_client.py +28 -30
  41. pyrad-2.3/pyrad/tests/testDictionary.py → pyrad-2.5.0/pyrad/tests/test_dictionary.py +38 -21
  42. pyrad-2.3/pyrad/tests/testHost.py → pyrad-2.5.0/pyrad/tests/test_host.py +10 -10
  43. pyrad-2.5.0/pyrad/tests/test_packet.py +679 -0
  44. pyrad-2.3/pyrad/tests/testProxy.py → pyrad-2.5.0/pyrad/tests/test_proxy.py +11 -11
  45. pyrad-2.3/pyrad/tests/testServer.py → pyrad-2.5.0/pyrad/tests/test_server.py +35 -33
  46. pyrad-2.5.0/pyrad/tests/test_tools.py +126 -0
  47. pyrad-2.5.0/pyrad/tools.py +332 -0
  48. pyrad-2.5.0/pyrad.egg-info/PKG-INFO +126 -0
  49. {pyrad-2.3 → pyrad-2.5.0}/pyrad.egg-info/SOURCES.txt +22 -11
  50. pyrad-2.5.0/pyrad.egg-info/requires.txt +8 -0
  51. pyrad-2.5.0/pyrad.egg-info/top_level.txt +4 -0
  52. pyrad-2.5.0/setup.cfg +4 -0
  53. pyrad-2.3/MANIFEST.in +0 -3
  54. pyrad-2.3/PKG-INFO +0 -98
  55. pyrad-2.3/example/.coverage +0 -0
  56. pyrad-2.3/example/dictionary.freeradius +0 -37
  57. pyrad-2.3/example/pyrad.log +0 -3
  58. pyrad-2.3/pyrad/tests/__init__.py +0 -5
  59. pyrad-2.3/pyrad/tests/testPacket.py +0 -530
  60. pyrad-2.3/pyrad/tests/testTools.py +0 -122
  61. pyrad-2.3/pyrad/tools.py +0 -236
  62. pyrad-2.3/pyrad.egg-info/PKG-INFO +0 -98
  63. pyrad-2.3/pyrad.egg-info/requires.txt +0 -2
  64. pyrad-2.3/pyrad.egg-info/top_level.txt +0 -1
  65. pyrad-2.3/setup.cfg +0 -8
  66. pyrad-2.3/setup.py +0 -33
  67. {pyrad-2.3 → pyrad-2.5.0}/example/auth_async.py +0 -0
  68. {pyrad-2.3 → pyrad-2.5.0}/example/dictionary +0 -0
  69. {pyrad-2.3 → pyrad-2.5.0}/example/server_async.py +0 -0
  70. {pyrad-2.3 → pyrad-2.5.0}/pyrad/bidict.py +0 -0
  71. {pyrad-2.3 → pyrad-2.5.0}/pyrad/curved.py +0 -0
  72. {pyrad-2.3 → pyrad-2.5.0}/pyrad.egg-info/dependency_links.txt +0 -0
  73. {pyrad-2.3 → pyrad-2.5.0}/pyrad.egg-info/zip-safe +0 -0
@@ -0,0 +1,301 @@
1
+ Changelog
2
+ =========
3
+
4
+ 2.5 - Jan 29, 2026
5
+ -------------------
6
+
7
+ * Drop support of Python 2.x
8
+
9
+ * Add salt decryption of encrypted attributes
10
+
11
+ * Fix #194 salt-encryption
12
+
13
+ * Fix #213 EncodeIPv6Prefix
14
+
15
+ * Fix for UTF-8
16
+
17
+ * Fix fix usage of socket.getaddrinfo
18
+
19
+ * Fix #197 KeyError when handling CoA packet for 0.0.0.0
20
+
21
+ * Fix create CoA packet in client_async
22
+
23
+ * Fix #152 and add corresponding unittests
24
+
25
+ * Fixed unittests
26
+
27
+ 2.4 - Nov 23, 2020
28
+ -------------------
29
+
30
+ * Support poetry for for building this project
31
+
32
+ * Use secrets.SysRandom instead of random.SystemRandom if possible
33
+
34
+ * `.get` on Packets has an optional default parameter (to mimic dict.get())
35
+
36
+ * Fix: digestmod is not optional in python3.8 anymore
37
+
38
+ * Fix: authenticator was refreshed before the packet was generated
39
+
40
+ * Fix bug causing Message-Authenticator verification to fail if
41
+ multiple instances of an attribute do not appear sequentially in
42
+ the attributes list
43
+
44
+ * Fixed #140 VerifyReply broken when multiple instances of same attribute are
45
+ not adjacent on reply
46
+
47
+ * Fixed #135 Missing send_packet for async Client
48
+
49
+ * Fixed #126 python3 support for SaltCrypt
50
+ (was previously broken)
51
+
52
+ 2.3 - Feb 6, 2020
53
+ ------------------
54
+
55
+ * Fixed #124 remove reuse_address=True from async server/client
56
+
57
+ * Fixed #121 Unknown attribute key error
58
+
59
+ 2.2 - Oct 19, 2019
60
+ ------------------
61
+
62
+ * Add message authenticator support (attribute 80)
63
+
64
+ * Add support for multiple values of the same attribute (#95)
65
+
66
+ * Add experimental async client and server implementation for python >=3.5.
67
+
68
+ * Add IPv6 bind support for client and server.
69
+
70
+ * Add support of tlv and integer64 attributes.
71
+
72
+ * Multiple minor enhancements and fixes.
73
+
74
+ 2.1 - Feb 2, 2017
75
+ -----------------
76
+
77
+ * Add CoA support (client and server).
78
+
79
+ * Add tagged attribute support (send only).
80
+
81
+ * Add salt encryption support (encrypt 2).
82
+
83
+ * Add ascend data filter support (human readable format to octets).
84
+
85
+ * Add ipv6 address and prefix support.
86
+
87
+ * Add support for octet strings in hex (starting with 0x).
88
+
89
+ * Add support for types short, signed and byte.
90
+
91
+ * Add support for VSA's with multiple sub TLV's.
92
+
93
+ * Use a different random generator to improve the security of generated
94
+ packet ids and authenticators.
95
+
96
+
97
+ 2.0 - May 15, 2011
98
+ ------------------
99
+
100
+ * Start moving codebase to PEP8 compatible coding style.
101
+
102
+ * Add support for Python 3.2.
103
+
104
+ * Several code cleanups. As a side effect Python versions before 2.6
105
+ are unfortunatley no longer supported. If you use Python 2.5 or older
106
+ Pyrad 1.2 will still work for you.
107
+
108
+
109
+ 1.2 - July 12, 2009
110
+ -------------------
111
+
112
+ * Setup sphinx based documentation.
113
+
114
+ * Use hashlib instead of md5, if present. This fixes deprecation warnings
115
+ for python 2.6. Patch from Jeremy Liané.
116
+
117
+ * Support parsing VENDOR format specifications in dictionary files. Patch by
118
+ Kristoffer Grönlun.
119
+
120
+ * Supprt $INCLUDE directores in dictionary files. Patch by
121
+ Kristoffer Grönlun.
122
+
123
+ * Standardize on 4 spaces for indents. Patch by Kristoffer Grönlund/
124
+ Purplescout.
125
+
126
+ * Make sure all encoding utility methods raise a TypeError if a value of
127
+ the wrong type is passed in.
128
+
129
+
130
+ 1.1 - September 30, 2007
131
+ ------------------------
132
+
133
+ * Add the 'octets' datatype from FreeRADIUS. This is treated just like string;
134
+ the only difference is how FreeRADIUS prints it.
135
+
136
+ * Check against unimplemented datatypes in EncodeData and DecodeData instead
137
+ of assuming an identity transform works.
138
+
139
+ * Make Packet.has_key and __contains__ gracefully handle unknown attributes.
140
+ Based on a patch from Alexey V Michurun <am@rol.ru>.
141
+
142
+ * Add a __delitem__ implementation to Packet. Based on a patch from
143
+ Alexey V Michurun <am@rol.ru>.
144
+
145
+
146
+ 1.0 - September 16, 2007
147
+ ------------------------
148
+
149
+ * Add unit tests. Pyrad now has 100% test coverage!
150
+
151
+ * Moved the proxy server has been out of the server module to a new
152
+ proxy module.
153
+
154
+ * Fix several errors that prevented the proxy code from working.
155
+
156
+ * Use the standard logging module instead of printing to stdout.
157
+
158
+ * The default dictionary for Server instances was shared between all
159
+ instances, possibly leading to unwanted data pollution. Each Server now
160
+ gets its own dict instance if none is passed in to the constructor.
161
+
162
+ * Fixed a timeout handling problem in the client: after receiving an
163
+ invalid reply the current time was not updated, possibly leading to
164
+ the client blocking forever.
165
+
166
+ * Switch to setuptools, allowing pyrad to be distributed as an egg
167
+ via the python package index.
168
+
169
+ * Use absolute instead of relative imports.
170
+
171
+ * Sockets are now opened with SO_REUSEADDR enabled to allow for faster
172
+ restarts.
173
+
174
+
175
+ 0.9 - April 25, 2007
176
+ ------------------------
177
+
178
+ * Start using trac to manage the project: http://code.wiggy.net/tracker/pyrad/
179
+
180
+ * [bug 3] Fix handling of packets with an id of 0
181
+
182
+ * [bug 2] Fix handling of file descriptor parameters in the server
183
+ code and example.
184
+
185
+ * [bug 4] Fix wrong variable name in exception raised when encountering
186
+ an overly long packet.
187
+
188
+ * [bug 5] Fix error message in parse error for dictionaries.
189
+
190
+ * [bug 8] Packet.CreateAuthenticator is now a static method.
191
+
192
+
193
+ 0.8
194
+ ---
195
+
196
+ * Fix time-handling in the client packet sending code: it would loop
197
+ forever since the now time was updated at the wrong moment. Fix from
198
+ Michael Mitchell <Michael.Mitchell@team.telstra.com>
199
+
200
+ * Fix passing of dict parameter when creating reply packets
201
+
202
+
203
+ 0.7
204
+ ---
205
+
206
+ * add HandleAuthPacket and HandleAcctPacket hooks to Server class.
207
+ Request from Thomas Boettcher.
208
+
209
+ * Pass on dict attribute when creating a reply packet. Requested by
210
+ Thomas Boettcher.
211
+
212
+ * Allow specififying new attributes when using
213
+ Server.CreateReplyPacket. Requested by Thomas Boettcher.
214
+
215
+
216
+ 0.6
217
+ ---
218
+
219
+ * packet.VerifyReply() had a syntax error when not called with a raw packet.
220
+
221
+ * Add bind() method to the Client class.
222
+
223
+ * [SECURITY] Fix handling of timeouts in client module: when a bad
224
+ packet was received pyrad immediately started the next retry instead of
225
+ discarding it and waiting for a timeout. This could be exploited by
226
+ sending a number of bogus responses before a correct reply to make pyrad
227
+ not see the real response.
228
+
229
+ * correctly set Acct-Delay-Time when resending accounting requests packets.
230
+
231
+ * verify account request packages as well (from Farshad Khoshkhui).
232
+
233
+ * protect against packets with bogus lengths (from Farshad Khoshkhui).
234
+
235
+
236
+ 0.5
237
+ ---
238
+
239
+ * Fix typo in server class which broke handling of accounting packets.
240
+
241
+ * Create seperate AuthPacket and AcctPacket classes; this resulted in
242
+ a fair number of API changes.
243
+
244
+ * Packets now know how to create and verify replies.
245
+
246
+ * Client now directs authentication and accounting packets to the
247
+ correct port on the server.
248
+
249
+ * Add twisted support via the new curved module.
250
+
251
+ * Fix incorrect exception handling in client code.
252
+
253
+ * Update example server to handle accounting packets.
254
+
255
+ * Add example for sending account packets.
256
+
257
+
258
+ 0.4
259
+ ---
260
+
261
+ * Fix last case of bogus exception usage.
262
+
263
+ * Move RADIUS code constants to packet module.
264
+
265
+ * Add support for decoding passwords and generating reply packets to Packet
266
+ class.
267
+
268
+ * Add basic RADIUS server and proxy implementation.
269
+
270
+
271
+ 0.3
272
+ ---
273
+
274
+ * client.Timeout is now derived from Exception.
275
+
276
+ * Docstring documentation added.
277
+
278
+ * Include example dictionaries and authentication script.
279
+
280
+
281
+ 0.2
282
+ ---
283
+
284
+ * Use proper exceptions.
285
+
286
+ * Encode and decode vendor attributes.
287
+
288
+ * Dictionary can parse vendor dictionaries.
289
+
290
+ * Dictionary can handle attribute values.
291
+
292
+ * Enhance most constructors; they now take extra optional parameters
293
+ with initialisation info.
294
+
295
+ * No longer use obsolete python interfaces like whrandom.
296
+
297
+
298
+ 0.1
299
+ ---
300
+
301
+ * First release
@@ -1,4 +1,5 @@
1
- Copyright 2017-2020 Christian Giese. All rights reserved.
1
+ Copyright 2020 Istvan Ruzman. All rights reserved.
2
+ Copyright 2017-2026 Christian Giese. All rights reserved.
2
3
  Copyright 2007-2008 Simplon. All rights reserved.
3
4
  Copyright 2002-2008 Wichert Akkerman. All rights reserved.
4
5
 
@@ -0,0 +1,7 @@
1
+ include README.rst
2
+ include CHANGES.rst
3
+ include TODO.rst
4
+ include LICENSE.txt
5
+ recursive-include example *
6
+ recursive-include docs *
7
+ recursive-include tests/data *
pyrad-2.5.0/PKG-INFO ADDED
@@ -0,0 +1,126 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyrad
3
+ Version: 2.5.0
4
+ Summary: RADIUS tools
5
+ Author-email: Istvan Ruzman <istvan@ruzman.eu>, Christian Giese <gic@gicnet.de>, Stefan Lieberth <stefan@lieberth.net>
6
+ License: BSD-3-Clause
7
+ Project-URL: Repository, https://github.com/pyradius/pyrad
8
+ Project-URL: Documentation, https://pyradius-pyrad.readthedocs.io
9
+ Keywords: radius,authentication,AAA,accounting,authorization,RADIUS
10
+ Classifier: Development Status :: 6 - Mature
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: BSD License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: System :: Systems Administration :: Authentication/Directory
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/x-rst
25
+ License-File: LICENSE.txt
26
+ Requires-Dist: netaddr>=0.8.0
27
+ Requires-Dist: six>=1.16.0
28
+ Provides-Extra: test
29
+ Requires-Dist: pytest>=8; extra == "test"
30
+ Requires-Dist: mock; python_version < "3.10" and extra == "test"
31
+ Dynamic: license-file
32
+
33
+
34
+ .. image:: https://github.com/pyradius/pyrad/actions/workflows/python-test.yml/badge.svg?branch=master
35
+ :target: https://github.com/pyradius/pyrad/actions/workflows/python-test.yml
36
+ .. image:: https://coveralls.io/repos/github/pyradius/pyrad/badge.svg?branch=master
37
+ :target: https://coveralls.io/github/pyradius/pyrad?branch=master
38
+ .. image:: https://img.shields.io/pypi/v/pyrad.svg
39
+ :target: https://pypi.python.org/pypi/pyrad
40
+ .. image:: https://img.shields.io/pypi/pyversions/pyrad.svg
41
+ :target: https://pypi.python.org/pypi/pyrad
42
+ .. image:: https://img.shields.io/pypi/dm/pyrad.svg
43
+ :target: https://pypi.python.org/pypi/pyrad
44
+ .. image:: https://readthedocs.org/projects/pyradius-pyrad/badge/?version=latest
45
+ :target: https://pyradius-pyrad.readthedocs.io/en/latest/?badge=latest
46
+ :alt: Documentation Status
47
+ .. image:: https://img.shields.io/pypi/l/pyrad.svg
48
+ :target: https://pypi.python.org/pypi/pyrad
49
+ .. image:: https://img.shields.io/badge/Chat-darkgreen
50
+ :target: https://matrix.to/#/#pyradius:matrix.org
51
+
52
+ Introduction
53
+ ============
54
+
55
+ pyrad is an implementation of a RADIUS client/server as described in RFC2865.
56
+ It takes care of all the details like building RADIUS packets, sending
57
+ them and decoding responses.
58
+
59
+ Here is an example of doing a authentication request::
60
+
61
+ from pyrad.client import Client
62
+ from pyrad.dictionary import Dictionary
63
+ import pyrad.packet
64
+
65
+ srv = Client(server="localhost", secret=b"Kah3choteereethiejeimaeziecumi",
66
+ dict=Dictionary("dictionary"))
67
+
68
+ # create request
69
+ req = srv.CreateAuthPacket(code=pyrad.packet.AccessRequest,
70
+ User_Name="wichert", NAS_Identifier="localhost")
71
+ req["User-Password"] = req.PwCrypt("password")
72
+
73
+ # send request
74
+ reply = srv.SendPacket(req)
75
+
76
+ if reply.code == pyrad.packet.AccessAccept:
77
+ print("access accepted")
78
+ else:
79
+ print("access denied")
80
+
81
+ print("Attributes returned by server:")
82
+ for i in reply.keys():
83
+ print("%s: %s" % (i, reply[i]))
84
+
85
+
86
+
87
+ Requirements & Installation
88
+ ===========================
89
+
90
+ pyrad requires Python 3.8 or later
91
+
92
+ Installing is simple; pyrad uses the standard distutils system for installing
93
+ Python modules::
94
+
95
+ python setup.py install
96
+
97
+
98
+ Author, Copyright, Availability
99
+ ===============================
100
+
101
+ pyrad was written by Wichert Akkerman <wichert@wiggy.net> and is maintained by
102
+ Christian Giese (GIC-de) and Istvan Ruzman (Istvan91).
103
+
104
+ We’re looking for contributors to support the pyrad team! If you’re interested in
105
+ helping with development, testing, documentation, or other areas, please contact
106
+ us directly.
107
+
108
+ This project is licensed under a BSD license.
109
+
110
+ Copyright and license information can be found in the LICENSE.txt file.
111
+
112
+ The current version and documentation can be found on pypi:
113
+ https://pypi.org/project/pyrad/
114
+
115
+ Bugs and wishes can be submitted in the pyrad issue tracker on github:
116
+ https://github.com/pyradius/pyrad/issues
117
+
118
+ Related Projects & Forks
119
+ ========================
120
+
121
+ **pyrad2:** Noteworthy fork with experimental RadSec (RFC 6614) support. Targets Python 3.12+,
122
+ adds extensive type hints, boosts test coverage, and includes fresh bug fixes.
123
+ https://github.com/nicholasamorim/pyrad2
124
+
125
+ **pyrad-server:** Lab-grade RADIUS test server built on top of pyrad.
126
+ https://github.com/slieberth/pyrad-server
@@ -1,5 +1,6 @@
1
- .. image:: https://travis-ci.org/pyradius/pyrad.svg?branch=master
2
- :target: https://travis-ci.org/pyradius/pyrad
1
+
2
+ .. image:: https://github.com/pyradius/pyrad/actions/workflows/python-test.yml/badge.svg?branch=master
3
+ :target: https://github.com/pyradius/pyrad/actions/workflows/python-test.yml
3
4
  .. image:: https://coveralls.io/repos/github/pyradius/pyrad/badge.svg?branch=master
4
5
  :target: https://coveralls.io/github/pyradius/pyrad?branch=master
5
6
  .. image:: https://img.shields.io/pypi/v/pyrad.svg
@@ -8,11 +9,13 @@
8
9
  :target: https://pypi.python.org/pypi/pyrad
9
10
  .. image:: https://img.shields.io/pypi/dm/pyrad.svg
10
11
  :target: https://pypi.python.org/pypi/pyrad
11
- .. image:: https://readthedocs.org/projects/pyrad/badge/?version=latest
12
- :target: http://pyrad.readthedocs.io/en/latest/?badge=latest
12
+ .. image:: https://readthedocs.org/projects/pyradius-pyrad/badge/?version=latest
13
+ :target: https://pyradius-pyrad.readthedocs.io/en/latest/?badge=latest
13
14
  :alt: Documentation Status
14
15
  .. image:: https://img.shields.io/pypi/l/pyrad.svg
15
16
  :target: https://pypi.python.org/pypi/pyrad
17
+ .. image:: https://img.shields.io/badge/Chat-darkgreen
18
+ :target: https://matrix.to/#/#pyradius:matrix.org
16
19
 
17
20
  Introduction
18
21
  ============
@@ -23,7 +26,6 @@ them and decoding responses.
23
26
 
24
27
  Here is an example of doing a authentication request::
25
28
 
26
- from __future__ import print_function
27
29
  from pyrad.client import Client
28
30
  from pyrad.dictionary import Dictionary
29
31
  import pyrad.packet
@@ -53,7 +55,7 @@ Here is an example of doing a authentication request::
53
55
  Requirements & Installation
54
56
  ===========================
55
57
 
56
- pyrad requires Python 2.7, or Python 3.4 or later
58
+ pyrad requires Python 3.8 or later
57
59
 
58
60
  Installing is simple; pyrad uses the standard distutils system for installing
59
61
  Python modules::
@@ -67,6 +69,10 @@ Author, Copyright, Availability
67
69
  pyrad was written by Wichert Akkerman <wichert@wiggy.net> and is maintained by
68
70
  Christian Giese (GIC-de) and Istvan Ruzman (Istvan91).
69
71
 
72
+ We’re looking for contributors to support the pyrad team! If you’re interested in
73
+ helping with development, testing, documentation, or other areas, please contact
74
+ us directly.
75
+
70
76
  This project is licensed under a BSD license.
71
77
 
72
78
  Copyright and license information can be found in the LICENSE.txt file.
@@ -76,3 +82,13 @@ https://pypi.org/project/pyrad/
76
82
 
77
83
  Bugs and wishes can be submitted in the pyrad issue tracker on github:
78
84
  https://github.com/pyradius/pyrad/issues
85
+
86
+ Related Projects & Forks
87
+ ========================
88
+
89
+ **pyrad2:** Noteworthy fork with experimental RadSec (RFC 6614) support. Targets Python 3.12+,
90
+ adds extensive type hints, boosts test coverage, and includes fresh bug fixes.
91
+ https://github.com/nicholasamorim/pyrad2
92
+
93
+ **pyrad-server:** Lab-grade RADIUS test server built on top of pyrad.
94
+ https://github.com/slieberth/pyrad-server
pyrad-2.5.0/TODO.rst ADDED
@@ -0,0 +1,2 @@
1
+ ToDo
2
+ ====
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ SPHINXPROJ = pyrad
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,36 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=source
11
+ set BUILDDIR=build
12
+ set SPHINXPROJ=pyrad
13
+
14
+ if "%1" == "" goto help
15
+
16
+ %SPHINXBUILD% >NUL 2>NUL
17
+ if errorlevel 9009 (
18
+ echo.
19
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20
+ echo.installed, then set the SPHINXBUILD environment variable to point
21
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
22
+ echo.may add the Sphinx directory to PATH.
23
+ echo.
24
+ echo.If you don't have Sphinx installed, grab it from
25
+ echo.http://sphinx-doc.org/
26
+ exit /b 1
27
+ )
28
+
29
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30
+ goto end
31
+
32
+ :help
33
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34
+
35
+ :end
36
+ popd
Binary file
@@ -0,0 +1,10 @@
1
+ :mod:`pyrad.client` -- basic client
2
+ ===================================
3
+
4
+ .. automodule:: pyrad.client
5
+
6
+ .. autoclass:: Timeout
7
+ :members:
8
+
9
+ .. autoclass:: Client
10
+ :members:
@@ -0,0 +1,10 @@
1
+ :mod:`pyrad.dictionary` -- RADIUS dictionary
2
+ ============================================
3
+
4
+ .. automodule:: pyrad.dictionary
5
+
6
+ .. autoclass:: ParseError
7
+ :members:
8
+
9
+ .. autoclass:: Dictionary
10
+ :members:
@@ -0,0 +1,7 @@
1
+ :mod:`pyrad.host` -- RADIUS host definition
2
+ ===========================================
3
+
4
+ .. automodule:: pyrad.host
5
+
6
+ .. autoclass:: Host
7
+ :members:
@@ -0,0 +1,48 @@
1
+ :mod:`pyrad.packet` -- packet encoding and decoding
2
+ ===================================================
3
+
4
+ .. automodule:: pyrad.packet
5
+
6
+ .. autoclass:: Packet
7
+ :members:
8
+
9
+ .. autoclass:: AuthPacket
10
+ :members:
11
+
12
+ .. autoclass:: AcctPacket
13
+ :members:
14
+
15
+ .. autoclass:: CoAPacket
16
+ :members:
17
+
18
+ .. autoclass:: PacketError
19
+ :members:
20
+
21
+
22
+ Constants
23
+ ---------
24
+
25
+ The :mod:`pyrad.packet` module defines several common constants
26
+ that are useful when dealing with RADIUS packets.
27
+
28
+ The following packet codes are defined:
29
+
30
+ ================== ======
31
+ Constant name Value
32
+ ================== ======
33
+ AccessRequest 1
34
+ ------------------ ------
35
+ AccessAccept 2
36
+ AccessReject 3
37
+ AccountingRequest 4
38
+ AccountingResponse 5
39
+ AccessChallenge 11
40
+ StatusServer 12
41
+ StatusClient 13
42
+ DisconnectRequest 40
43
+ DisconnectACK 41
44
+ DisconnectNAK 42
45
+ CoARequest 43
46
+ CoAACK 44
47
+ CoANAK 45
48
+ ================== ======
@@ -0,0 +1,7 @@
1
+ :mod:`pyrad.proxy` -- basic proxy
2
+ =================================
3
+
4
+ .. automodule:: pyrad.proxy
5
+
6
+ .. autoclass:: Proxy
7
+ :members:
@@ -0,0 +1,13 @@
1
+ :mod:`pyrad.server` -- basic server
2
+ ===================================
3
+
4
+ .. automodule:: pyrad.server
5
+
6
+ .. autoclass:: RemoteHost
7
+ :members:
8
+
9
+ .. autoclass:: ServerPacketError
10
+ :members:
11
+
12
+ .. autoclass:: Server
13
+ :members: