Triggering an action on AuthZ failure
Hello, What is the correct way to run a module if authorisation is going to fail? Specifically, I'm trying to use the line log to record when a user is refused access for reasons other than bad credentials. My initial thought was to try and check rcode, but that didn't seem to work (I'm not 100% sure I had the test correct though): authorize { // ... // Policy checks and things // ... if (rcode == reject) { refusal_log } } Adam Bishop Systems Development Specialist gpg: 0x6609D460 t: +44 (0) 1235 822 245 xmpp: adamb@jabber.dev.ja.net Janet, the UK’s research and education network. Janet is a trading name of The JNT Association, a company limited by guarantee which is registered in England under No. 2881024 and whose Registered Office is at Lumen House, Library Avenue, Harwell Oxford, Didcot, Oxfordshire. OX11 0SG
Specifically, I'm trying to use the line log to record when a user is refused access for reasons other than bad credentials.
My initial thought was to try and check rcode, but that didn't seem to work (I'm not 100% sure I had the test correct though):
Checking rcode is ok but make sure priorities are set correctly so you don't end up returning only. To check rcode you just use the keyword. i.e. if (ok) {} or if (reject) {} -Arran
On 25 Oct 2012, at 16:54, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
Specifically, I'm trying to use the line log to record when a user is refused access for reasons other than bad credentials.
My initial thought was to try and check rcode, but that didn't seem to work (I'm not 100% sure I had the test correct though):
Checking rcode is ok but make sure priorities are set correctly so you don't end up returning only.
*early
participants (2)
-
Adam Bishop -
Arran Cudbard-Bell