Hello Haiks,
there is no way to automate the SMS TOken enrollment at the moment.
If the mobile number is contained in the directory privacyidea will
use it during enrollment.
NEvertheless you can use the client api to ease the enrollment and
write a little python script like this:
from privacyideautils.clientutils import privacyideaclient
protocol = "https"
host = "localhost"
admin = "admin"
adminpw = "test"
adminrealm = "admin"
client = privacyideaclient(protocol, host, admin=admin, adminpw=adminpw,
adminrealm=adminrealm)
users = [("+49 12345", "cornelius", "pin1"),
("+1 12345", "corny", "pin2")]
for user in users:
r = client.inittoken({"phone": user[0], "user": user[1], "pin": user[2],
"genkey": 1, "type": "sms"})
You can define a big array "users" with all your users, their mobile
numbers and the OTPpins. Client.inittoken will create all these SMS
tokens for the users.
PLease note, that the users have to exist in a directory or your
passwd.
To be able to use challenge response you need to set the policy
scope:authentication
action:challenge_response
You can generate a challenge by trying to authenticate with the otp
pin:
/validate/check?user=cornelius&pass=pin1
and then authenticate in the second step with the
state/transactionid and the OTP value sent to you with the SMS.
Kind regards
Cornelius