Skip to main content

Robotframework RADIUS library

Project description

https://travis-ci.org/deviousops/robotframework-radius.svg?branch=master

Introduction

RadiusLibrary is a test library for Robot Framework, providing keywords for handling the RADIUS protocol. The library supports the creation of RADIUS clients and servers, and supports authentication, accounting and change of authorization requests.

Installation

Using the PIP installer

$ pip install robotframework-radius

Or after cloning this repository

$ python setup.py install

Example

*** Settings ***
Library           RadiusLibrary

*** Test Cases ***
Should Receive Access Accept
    Create Client    auth    %{SERVER}    %{AUTHPORT}    %{SECRET}    %{DICTIONARY}
    Create Access Request
    Add Request attribute    User-Name    user
    Add Request attribute    User-Password    x
    Add Request attribute    Acct-Session-Id    1234
    Add Request attribute    NAS-IP-Address    127.0.1.1
    Send Request
    Receive Access Accept
    Response Should Contain Attribute    Framed-IP-Address    10.0.0.100
    Response Should Contain Attribute    Class    premium

Wrong Password Should Receive Access Reject
    Create Client    auth    %{SERVER}    %{AUTHPORT}    %{SECRET}    %{DICTIONARY}
    Create Access Request
    Add Request attribute    User-Name    user
    Add Request attribute    User-Password    wrong
    Add Request attribute    Acct-Session-Id    126
    Send Request
    Receive Access Reject
    Response Should Contain Attribute    Reply-Message    authentication failed

For more info, have a look at the keyword documentation: https://rawgit.com/deviousops/robotframework-radius/master/doc/RadiusLibrary.html.

Usage

Save the example above to auth.robot, execute the following commands.

$ export SERVER=127.0.0.1
$ export AUTHPORT=1812
$ export SECRET=secret
$ export DICTIONARY=/usr/share/freeradius/dictionary.rfc2865
$ robot auth.robot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-radius-0.3.1.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file robotframework-radius-0.3.1.tar.gz.

File metadata

File hashes

Hashes for robotframework-radius-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5034c46d42554f46b32c26aa4f3d4ebc4a3f18b2743a51de4f139bdb8ec262e2
MD5 c1fd0f8d028a3bc866b205d4825e38e0
BLAKE2b-256 6e950be747a5fc2e174ae5eaace0800f64a99dcd5d71f06ae8e00757cc142801

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page