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