Giter Site home page Giter Site logo

bsdradius's People

Stargazers

 avatar

Watchers

 avatar  avatar

bsdradius's Issues

Setup fails using version 0.7.3

Install 0.7.3 via setup.py on Ubuntu 12.04 LTS (fully updated to 18 July 2013)

Issue 1: Prefix is incorrect leading to install error

prefix: /usr
Creating configuration files which don't exist yet
Traceback (most recent call last):
  File "setup.py", line 139, in <module>
    cfgFiles = listdir(os.path.join(prefix, "etc/bsdradius"))
  File "setup.py", line 40, in listdir
    for name in os.listdir(path):
OSError: [Errno 2] No such file or directory: '/usr/etc/bsdradius'

Workaround: python setup install --prefix /usr/local

Issue 2: Version is incorrect in setup.py when invoking setup(). It's set to 
0.7.0, leading pip freeze to report the incorrect version.

Original issue reported on code.google.com by [email protected] on 18 Jul 2013 at 8:06

crash with error in working thread

After flawless work for many months, suddenly crashed with following error:

[2010-11-23 13:44:52] thread "Working thread 0" grabbed a packet for processing
[2010-11-23 13:44:53] ERROR:
[2010-11-23 13:44:53] ERROR: ---[ PYTHON EXCEPTION ]---
[2010-11-23 13:44:53] ERROR: Traceback (most recent call last):
[2010-11-23 13:44:53] ERROR:   File 
/usr/local/lib/python2.6/dist-packages/bsdradius/BsdRadiusServer.py, line 353, 
in run()
[2010-11-23 13:44:53] ERROR:     dumpPacket.dumpUnhandledAuthPacket(pkt)
[2010-11-23 13:44:53] ERROR:   File 
/usr/local/lib/python2.6/dist-packages/bsdradius/serverModules/dumpPacket.py, 
line 180, in dumpUnhandledAuthPacket()
[2010-11-23 13:44:53] ERROR:     doIt = 
radParsedConfig['BEHAVIOR'].get('dump_unh_auth', False)
[2010-11-23 13:44:53] ERROR:   <type 'exceptions.TypeError'>: 'NoneType' object 
is unsubscriptable
[2010-11-23 13:44:53] ERROR: ---
[2010-11-23 13:44:53] ERROR:
[2010-11-23 13:44:53] ERROR: Error in working thread


version 0.7.1

Original issue reported on code.google.com by [email protected] on 30 Nov 2010 at 9:06

Problem with bsdradclient.py

Hello

When I want start bsdradclient.py.

therin@Z10N:~/bsdradius/share/bsdradius/tools$ python bsdradclient.py 
--- Parsing dictionary files ---
--- Reading config file ---
Adding: User-Name : '5555555'
Adding: Calling-Station-Id : '5555555'
Adding: Called-Station-Id : '123#4567811234567890'
Adding: Quintum-h323-conf-id : 'h323-conf-id=34343663 62353735 31660034 
383463F6'
Adding: NAS-IP-Address : '10.1.1.8'
Adding: Client-IP-Address : '10.1.1.8'
Adding: Service-Type : 'Login-User'
Adding: NAS-Port-Type : 'Async'
Adding: User-Password : '5555555'
Adding: Quintum-AVPair : 'h323-ivr-out=ACCESSCODE:'
Adding: Quintum-h323-disconnect-time : 'h323-disconnect-time=17:57:16.360 UTC 
Thu May 18 2006'
Adding: Acct-Input-Packets : 0
Adding: Quintum-h323-disconnect-cause : 'h323-disconnect-cause=29'
Adding: Quintum-h323-call-origin : 'h323-call-origin=originate'
Adding: Quintum-Trunkid-Out : ''
Adding: Acct-Input-Octets : 0
Adding: Acct-Status-Type : 'Stop'
Adding: Quintum-Trunkid-In : '0 2/1/1'
Adding: Quintum-h323-connect-time : 'h323-connect-time=17:57:16.360 UTC Thu May 
18 2006'
Adding: Quintum-h323-setup-time : 'h323-setup-time=17:57:09.155 UTC Thu May 18 
2006'
Adding: Acct-Output-Octets : 0
Adding: Quintum-h323-call-type : 'h323-call-type=Telephony'
Adding: Acct-Delay-Time : 0
Adding: Quintum-h323-gw-id : 'h323-gw-id=DTL'
Adding: Acct-Output-Packets : 0
Adding: Quintum-h323-voice-quality : 'h323-voice-quality=0'
Adding: Quintum-NAS-Port : '0 2/1/1'
Adding: Quintum-AVPair : 'h323-incoming-conf-id=34343663 62353735 31660034 
383463F6'
Adding h323-conf-id: '6741a978 7758c0ed 96365cd8 00232bbe'
Adding Acct-Session-Id: '873f54541f664bb5'
--- preparing packet ---
Preparing authorization request
Preparing accounting request
--- Sending requests ---
Sending request 0
Traceback (most recent call last):
  File "bsdradclient.py", line 245, in <module>
    reply = sendPacket(srv, req[i])
  File "bsdradclient.py", line 84, in sendPacket
    reply = srv.SendPacket(req)
  File "/usr/local/lib/python2.7/site-packages/bsdradius/pyrad/client.py", line 168, in SendPacket
    return self._SendPacket(pkt, self.authport)
  File "/usr/local/lib/python2.7/site-packages/bsdradius/pyrad/client.py", line 133, in _SendPacket
    self._socket.sendto(pkt.RequestPacket(), (self.server, port))
  File "/usr/local/lib/python2.7/site-packages/bsdradius/pyrad/packet.py", line 418, in RequestPacket
    attr=self._PktEncodeAttributes()
  File "/usr/local/lib/python2.7/site-packages/bsdradius/pyrad/packet.py", line 299, in _PktEncodeAttributes
    result+=self._PktEncodeAttribute(code, data)
  File "/usr/local/lib/python2.7/site-packages/bsdradius/pyrad/packet.py", line 292, in _PktEncodeAttribute
    return struct.pack("!BB", key, (len(value)+2))+value
struct.error: ubyte format requires 0 <= number <= 255 


Original issue reported on code.google.com by [email protected] on 8 May 2011 at 12:24

WebService (SOAP) module

I have developed a webservice module.
It support sending authorization and accounting requests to a web server using 
SOAP protocol.

I was wondering if you can include it in the next released version.

I have attached the file. Feedback on enhancements is highly appreciated. I am 
not a python expert and would like to get your input on enhancing it.

Original issue reported on code.google.com by [email protected] on 5 Sep 2010 at 2:44

Attachments:

digest authentication with kamailio

I am trying to authenticate sip user using kamailio & bsdradius. I have 
configured and tested. it is working fine without digest auth & without 
password authentication. Kamailio & bsdRadius is working fine with User-Name 
authentication.

My Problem is related to password authentication bcz without password auth any 
buddy can register account. so please help me where i need to changes in 
bsdradius or kamailio config.

following is my kamailio digest auth log----

 6(28132) DEBUG: tm [t_lookup.c:1081]: DEBUG: t_check_msg: msg id=11 global id=10 T start=(nil)
 6(28132) DEBUG: tm [t_lookup.c:528]: t_lookup_request: start searching: hash=22642, isACK=0
 6(28132) DEBUG: tm [t_lookup.c:485]: DEBUG: RFC3261 transaction matching failed
 6(28132) DEBUG: tm [t_lookup.c:711]: DEBUG: t_lookup_request: no transaction found
 6(28132) DEBUG: tm [t_lookup.c:1150]: DEBUG: t_check_msg: msg id=11 global id=11 T end=(nil)
 6(28132) DEBUG: auth [api.c:95]: auth: digest-algo: MD5 parsed value: 1
 6(28132) ERROR: auth_radius [sterman.c:412]: authorization failed
 6(28132) DEBUG: auth [challenge.c:102]: build_challenge_hf: realm='176.249.2.66'
 6(28132) DEBUG: auth [challenge.c:113]: build_challenge_hf: qop='auth'
 6(28132) DEBUG: auth [challenge.c:236]: auth: 'WWW-Authenticate: Digest realm="176.249.2.66", nonce="Tb7Jg02+yFc7BB9YwpCzKexo3KWLdGP+", qop="auth"
'
 6(28132) DEBUG: auth [challenge.c:102]: build_challenge_hf: realm='176.249.2.66'
 6(28132) DEBUG: auth [challenge.c:113]: build_challenge_hf: qop='auth'
 6(28132) DEBUG: auth [challenge.c:236]: auth: 'WWW-Authenticate: Digest realm="176.249.2.66", nonce="Tb7Jg02+yFc7BB9YwpCzKexo3KWLdGP+", qop="auth"
'
 6(28132) DEBUG: sl [sl.c:278]: reply in stateless mode (sl)



bsdradius log...............


thread "Working thread 0" grabbed a packet for processing
--AuthPacket--------------------------------------------------
'NAS-IP-Address': '127.0.0.1'
'User-Name': '[email protected]'
'NAS-Port-Id': 5060
'Cisco-AVPair': 
'call-id=b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'
'Digest-Attributes': '\n\x05102'
'Digest-Attributes': '\x01\x0e176.249.2.66'
'Digest-Attributes': '\x02"Tb7Jg02+yFc7BB9YwpCzKexo3KWLdGP+'
'Digest-Attributes': '\x04\x12sip:176.249.2.66'
'Digest-Attributes': '\x03\nREGISTER'
'Digest-Attributes': '\x05\x06auth'
'Digest-Attributes': '\t\n00000001'
'Digest-Attributes': '\x08\x12afffa5c7499e64e9'
'Request-Authenticator': '\xd1\xe2\xedMW\n\xaf\xbe"4\xe3\xcbn2\x81{'
'Service-Type': 'Sip-Session'
'Sip-Uri-User': '102'
'Client-IP-Address': '127.0.0.1'
'Acct-Session-Id': 
'b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'
'Digest-Response': 'e2ee24e001a9abfb868d27d566daf5fc'

#########################################
### Authorization module "preprocess" ###
#########################################
--- Fixing VSA attributes ---
Fixing attribute: 'Cisco-AVPair'
  [New] 'call-id': 'b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'
--- Module preprocess results ---
Status: OK
Check: {'Auth-Type': [None]}
Reply: {}
Return value: True
###################################
### Authorization module "chap" ###
###################################
No CHAP-Password found in request. Doing nothing.
--- Module chap results ---
Status: OK
Check: {'Auth-Type': [None]}
Reply: {}
Return value: True
#####################################
### Authorization module "digest" ###
#####################################
Setting Auth-Type to "digest"
--- Module digest results ---
Status: OK
Check: {'Auth-Type': ['digest']}
Reply: {}
Return value: True
##########################################
### Authorization module "dump_packet" ###
##########################################
Dumping packet to file:
/usr/var/log/radius/127.0.0.1/auth/radius.packet.20110502.dump
--- Module dump_packet results ---
Status: OK
Check: {'Auth-Type': ['digest']}
Reply: {}
Return value: True
###########################################
### Authorization module "dayalbilling" ###
###########################################
Received packet:
{'NAS-IP-Address': ['127.0.0.1'], 'User-Name': ['[email protected]'], 
'NAS-Port-Id': [5060], 'Cisco-AVPair': 
['call-id=b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'], 
'Digest-Attributes': ['\n\x05102', '\x01\x0e176.249.2.66', 
'\x02"Tb7Jg02+yFc7BB9YwpCzKexo3KWLdGP+', '\x04\x12sip:176.249.2.66', 
'\x03\nREGISTER', '\x05\x06auth', '\t\n00000001', '\x08\x12afffa5c7499e64e9'], 
'Request-Authenticator': ['\xd1\xe2\xedMW\n\xaf\xbe"4\xe3\xcbn2\x81{'], 
'Service-Type': ['Sip-Session'], 'Sip-Uri-User': ['102'], 'Client-IP-Address': 
['127.0.0.1'], 'Acct-Session-Id': 
['b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'], 'call-id': 
['b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'], 
'Digest-Response': ['e2ee24e001a9abfb868d27d566daf5fc']}
db>> Using connection handler "dayalbilling"
db>> QUERY:

select id,username from account where usernale= 102

db>> (2L, '5822495865')

db>> Using connection handler "samplebill"
db>> QUERY: "select * from accounts";


Account found
Looking for username and password
Received packet:
{'NAS-IP-Address': ['127.0.0.1'], 'User-Name': ['[email protected]'], 
'NAS-Port-Id': [5060], 'Cisco-AVPair': 
['call-id=b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'], 
'Digest-Attributes': ['\n\x05102', '\x01\x0e176.249.2.66', 
'\x02"Tb7Jg02+yFc7BB9YwpCzKexo3KWLdGP+', '\x04\x12sip:176.249.2.66', 
'\x03\nREGISTER', '\x05\x06auth', '\t\n00000001', '\x08\x12afffa5c7499e64e9'], 
'Request-Authenticator': ['\xd1\xe2\xedMW\n\xaf\xbe"4\xe3\xcbn2\x81{'], 
'Service-Type': ['Sip-Session'], 'Sip-Uri-User': ['102'], 'Client-IP-Address': 
['127.0.0.1'], 'Acct-Session-Id': 
['b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'], 'call-id': 
['b552ba139c0a737aM2Y3NTFkMjE1YTQzOGEyMWU5MDZmMzkxZDFkZTEwNDY.'], 
'Digest-Response': ['e2ee24e001a9abfb868d27d566daf5fc']}
Check data---------------------------------------------------------
{'Auth-Type': ['digest']}
Reply data ---------------------------------------------------------
{}
This is Registration Request Message ---------------------------------
--- Module dayalbilling results ---
Status: OK
Check: {'User-Password': '10212', 'Auth-Type': ['digest'], 'User-Name': '102'}
Reply: {'h323-credit-amount': '9.98', 'h323-return-code': 'h323-return-code=0', 
'h323-billing-model': 'h323-billing-model=1'}
Return value: True
######################################
### Authentication module "digest" ###
######################################
Performing Digest authentication
Password "e2ee24e001a9abfb868d27d566daf5fc" for user "['\n\x05102', 
'\x01\x0e176.249.2.66', '\x02"Tb7Jg02+yFc7BB9YwpCzKexo3KWLdGP+', 
'\x04\x12sip:176.249.2.66', '\x03\nREGISTER', '\x05\x06auth', '\t\n00000001', 
'\x08\x12afffa5c7499e64e9']" not valid
Password "10212" for user "102" not valid
--- Module digest results ---
Status: REJECTED
Check: {'User-Password': ['10212'], 'Auth-Type': ['digest'], 'User-Name': 
['102']}
Reply: {'h323-credit-amount': ['9.98'], 'h323-return-code': 
['h323-return-code=0'], 'h323-billing-model': ['h323-billing-model=1']}
Return value: False
===

Authentication phase failed
Sending Authorization REJECT to localhost (127.0.0.1)
--AuthPacket--------------------------------------------------
'h323-credit-amount': '9.98'
'h323-billing-model': 'h323-billing-model=1'
'h323-return-code': 'h323-return-code=0'

==============================================================



Please help me

Anand


Original issue reported on code.google.com by [email protected] on 2 May 2011 at 11:29

High CPU usage

I have installed BSDRadius on Ubuntu 12.04 LTS Server 64-bit. When I start it 
via service bsdradius start (effectively bsdradiusd -f), top show 100% CPU load 
for bsdradiusd. This is without any radius packets entering the system.

What could be causing this?

Thanks,

Abdul

Original issue reported on code.google.com by [email protected] on 19 Jul 2013 at 12:52

WebService (SOAP) module

I have developed a webservice module.
It support sending authorization and accounting requests to a web server using 
SOAP protocol.

I was wondering if you can include it in the next released version.


Original issue reported on code.google.com by [email protected] on 5 Sep 2010 at 2:42

Attachments:

Exception in attribute encoding in packet assembly code, with patch

The packet assembly code throws a struct.error exception if the key value of an 
attribute is > 255. This is correct as according to the RFC the key values must 
be a byte. However, some of my clients make the mistake of adding incorrect 
attributes to the responses and the threads crash. I have attached a diff to 
add a try/except block to silently ignore the invalid attributes.

Abdul


Original issue reported on code.google.com by [email protected] on 21 Jul 2013 at 10:31

Attachments:

Problem with Authorization

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

We are seeing this:

#########################################
--- Fixing VSA attributes ---
Fixing attribute: 'h323-conf-id'
  [Replace] 'h323-conf-id': '1290505230076'
ERROR: 
ERROR: ---[ PYTHON EXCEPTION ]---
ERROR: Traceback (most recent call last):
ERROR:   File /radius//lib/python2.4/site-packages/bsdradius/modules.py, line 
351, in execAuthorizationModules()
ERROR:     result = module.authz_funct(received, check, reply)
ERROR:   File 
/radius//lib/python2.4/site-packages/bsdradius/serverModules/preprocess.py, 
line 63, in preprocessAuthorization()
ERROR:     fixVsa(received)
ERROR:   File 
/radius//lib/python2.4/site-packages/bsdradius/serverModules/preprocess.py, 
line 99, in fixVsa()
ERROR:     debug ('Fixing attribute: %r' % key)
ERROR:   exceptions.TypeError: not all arguments converted during string 
formatting
ERROR: ---
ERROR: 
--- Module preprocess results ---
Status: FAILED
Check: {'Auth-Type': [None]}
Reply: {}
Return value: None
===

Authorization phase failed
Dumping packet to file:
/radius//var/log/bsdradius/xxx.xxx.xxx.xxx/auth_failed/bsdradius.packet.20101123
.dump
Sending Authorization REJECT to intraswitch (xxx.xxx.xxx.xxx)
--AuthPacket--------------------------------------------------




What version of the product are you using? On what operating system?

We are using Centos 5.5 64 bit os. Radius version is BSDradius 0.7.1.


Please provide any additional information below.

We are having problems with authorization. 

We have comment example_mod2 and example_mod but we are still getting this:
etting order of accounting modules
--- Executing startup modules ---
#####################################
### Startup module "example_mod2" ###
#####################################
Example2
Doing some file opening and stuff like that
####################################
### Startup module "example_mod" ###
####################################
Doing some file opening and stuff like that
############################
### Startup module "sql" ###

When we star a call we are getting this:
--- Module preprocess results ---
Status: FAILED
Check: {'Auth-Type': [None]}
Reply: {}
Return value: None
===

Thank you for your help!

Miha


Original issue reported on code.google.com by [email protected] on 23 Nov 2010 at 9:43

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.