Created
May 12, 2012 20:09
-
-
Save MariusSchiffer/2668679 to your computer and use it in GitHub Desktop.
freeradius oath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- text -*- | |
# | |
# $Id$ | |
# Compares the a token generated with a token seed with the User-Password (TOTP) | |
exec oath { | |
# wait for the program | |
wait = yes | |
# Compares the token with User-Password | |
program = "/usr/bin/oath_radius --time-step-size=60 --totp %{control:OTP-Token}" | |
input_pairs = request | |
output_pairs = control | |
shell_escape = yes | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
update control { | |
Cleartext-Password := "%{oath:/usr/bin/oath_radius --time-step-size=60s --totp <TOKEN>}" | |
} | |
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
# look for instantiate | |
instantiate { | |
exec | |
oath | |
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
env oathtool "$@" 2>/dev/null | tr -d '\n' | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment