Giter Site home page Giter Site logo

Comments (4)

psanford avatar psanford commented on July 29, 2024

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.

sizovilya avatar sizovilya commented on July 29, 2024

@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.

sizovilya avatar sizovilya commented on July 29, 2024

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.

psanford avatar psanford commented on July 29, 2024

Great! I'm glad you got it working.

from node-radius.

Related Issues (20)

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.