Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

Amigopod as RADIUS server - Condition Expression

This thread has been viewed 0 times
  • 1.  Amigopod as RADIUS server - Condition Expression

    Posted Sep 13, 2012 04:56 PM

    I need to have the RADIUS server return a specific IP address back but only if a specific user ID is used. I've created a user role and put in the correct attribute, and that works just fine. However I want to add a condition expression that allows the radius attribue to be returned only if the condition is met. That condition would be the user ID. 


    I can't figure out the syntax. I understand its PHP and i know that well, but I'm not sure how it wants it in that expression.

     

    return ($userid == "testuser1);

     

    or something like that?

     

    Thanks for your time.


    Eric 



  • 2.  RE: Amigopod as RADIUS server - Condition Expression

    Posted Sep 13, 2012 05:33 PM

    I found something that works. Just wonderign if this is the correct way to do it. I'll need to create one of these for each device that needs to get fed an IP address back, so the least cumbersome the better.

     

    <?php if (GetAttr("user-name") == "actual_user_name") { return true; }

     

    This is the conditional expression of a Framed-IP-Address attribute.



  • 3.  RE: Amigopod as RADIUS server - Condition Expression
    Best Answer

    Posted Sep 17, 2012 05:00 PM

    Your solution should work, however the following might be a little bit cleaner:

     

    return GetAttr("user-name") == "actual_user_name"

     You don't need the <?php tag, and you can short-cut a simple Boolean condition like this.



  • 4.  RE: Amigopod as RADIUS server - Condition Expression

    Posted Nov 15, 2012 10:40 AM

    @amigodave wrote:

    Your solution should work, however the following might be a little bit cleaner:

     

    return GetAttr("user-name") == "actual_user_name"

     You don't need the <?php tag, and you can short-cut a simple Boolean condition like this.


    Worked great! Thanks!