Mpd 4.4.1 User Manual : Internals : External authentication
Previous: RADIUS authentication
Next: Hints for developers

8.4. External authentication

This chapter describes implementation specific details of MPD.

Mpd supports authentication and accounting by calling external scripts. Pathes to that scripts must be specified using set auth extauth-script ... and set auth extacct-script ... commands.

On invocation this script receives on stdin set of request attribute:value pairs terminated by empty line and must generate response in same format on stdout.

Currently supported request attributes:

USER_NAME
USER_PASSWORD - for PAP only
NAS_PORT
NAS_PORT_TYPE
CALLING_STATION_ID
CALLED_STATION_ID
PEER_ADDR
PEER_PORT

Currently supported response attributes:

RESULT - one of SUCCESS, UNDEF (if valid USER_PASSWORD returned) or FAIL
USER_NAME
USER_PASSWORD
FRAMED_IP_ADDRESS
FRAMED_ROUTE
FRAMED_IPV6_ROUTE
FRAMED_MTU
SESSION_TIMEOUT
IDLE_TIMEOUT
REPLY_MESSAGE
MS_CHAP_ERROR
MPD_RULE
MPD_PIPE
MPD_QUEUE
MPD_TABLE
MPD_TABLE_STATIC
MPD_FILTER
MPD_LIMIT

On invocation extacct script receives on stdin set of request attribute:value pairs terminated by empty line and must generate response in same format on stdout.

Currently supported request attributes:

ACCT_STATUS_TYPE
ACCT_SESSION_ID
ACCT_MULTI_SESSION_ID
USER_NAME
IFACE
BUNDLE
LINK
NAS_PORT
NAS_PORT_TYPE
ACCT_LINK_COUNT
CALLING_STATION_ID
CALLED_STATION_ID
PEER_ADDR
PEER_PORT
PEER_IDENT
FRAMED_IP_ADDRESS
ACCT_TERMINATE_CAUSE
ACCT_SESSION_TIME
ACCT_INPUT_OCTETS
ACCT_INPUT_PACKETS
ACCT_OUTPUT_OCTETS
ACCT_OUTPUT_PACKETS

Currently supported response attributes:

MPD_DROP_USER - nonzero value means that link should be disconnected

For most of attributes description look their RADIUS alternatives.


Mpd 4.4.1 User Manual : Internals : External authentication
Previous: RADIUS authentication
Next: Hints for developers