Comments (4)
The radius protocol (rfc2865) requires that all custom attributes have a vendor-id. I'm a little surprised that your second example didn't also generate an error.
If you want to use a Buffer you should use the uint8 attribute type value as the key not a string (see rfc2865 section 5 for details).
I don't think this is actually what you want to do though.
The attributes you are trying to set 'request-type', 'src-gw-name' and 'gw-ip' are not standard radius attributes, so I would guess that they are vendor specific attributes. If they are, the easiest thing would be to get a radius dictionary file and load that. Then you can use the attribute names.
from node-radius.
@psanford Thank you for the response!
I found out that these attributes can be sent like Cisco-AVPair "key=value" . Is it possible now ?
from node-radius.
I found solution. Need just create right dictionary file with BEGIN VENDOR/END VENDOR syntax.
Example here - https://gist.github.com/sizovilya/2e9c14eb76ce09da5aaf044aacafbae6
Next create packet like this:
const packet = radius.encode({
code: 'Access-Request',
secret: 'very secret',
attributes: [
['Vendor-Specific', 9, [['Cisco-AVPair', 'request-type=user']]],
['Vendor-Specific', 9, [['Cisco-AVPair', 'src-gw-ip=127.0.0.1']]],
['Vendor-Specific', 9, [['Cisco-AVPair', 'src-gw-name=user']]],
['Vendor-Specific', 9, [['Cisco-AVPair', 'h323-conf-id=i am any hash']]],
['Vendor-Specific', 9, [['Cisco-AVPair', 'h323-call-id=i am any hash 2']]],
['Vendor-Specific', 9, [['Cisco-AVPair', 'Calling-Station_id=123456789']]],
['Vendor-Specific', 9, [['Cisco-AVPair', 'Called-Station_id=987654321']]],
],
})
After, all should works fine.
@psanford thank you.
from node-radius.
Great! I'm glad you got it working.
from node-radius.
Related Issues (20)
- Using with hostapd HOT 3
- Packet identifier number HOT 6
- Openwrt, Linux HOT 6
- Attributes without a tag have one after decoding HOT 2
- RADIUS server issue ChangeOfAuthorization (CoA) requests HOT 5
- Error in Freeradius with CHAP Password due to attribute length HOT 2
- Unable to get true from verify_response HOT 4
- Session-Timeout not working HOT 2
- At what condition I get the 'Vendor-Specific' attributes value in the decoded response HOT 4
- sending PEAP responses HOT 2
- dictionary.rfc2865 incorrect Class attribute definition HOT 2
- There is no password attr HOT 7
- Response verification fails for Status-Server response to FreeRADIUS HOT 5
- User-Password is not defined in my packet. HOT 4
- encode: invalid attributes - must give buffer for unknown attribute 'WISPr-Bandwitdth-Max-Down' HOT 7
- Active Directory integration HOT 2
- Chap Password - Active Directory HOT 2
- Dependency Dashboard
- Disconnect-Request not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-radius.