SMS Token enrollment behaviour


#1

I am having a slight issue with enrolling new SMS tokens. I don’t have any HTTP SMS Gateway setup. I only have one SMTP SMS Gateway configured and it is selected in the SMS token settings page.

Yet, as an admin, I enter the phone number and assign it to a user and hit ‘Enrol’. The SMS token is enrolled (every time) as a “privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider”.
As a user, I get the warning “For SMS tokens to work properly you need to set the SMS Token Config!” If I enroll anyways, there is no sms.Provider set on the token.

How do I default all SMS tokens to enroll as privacyidea.lib.smsprovider.SmtpSMSProvider.SmtpSMSProvider whether by User or by Admin? Is the behaviour due to some configuration on my end or is it default?


#2

You might run a configuration from an old privacyIDEA system. I.e. you have an entry “sms.Provider” in the config table.

Does sending SMS fail?

You could try to delete the entry from the config table:

delete from config where config.Key="sms.Provider";

and restart apache. try to enroll a new sms token and see what happens.

Anyways, we might have a bug here with SMS via SMTP which obviously is not used rather often.
If so, please open an issue at github including your findings, if the sms is sent at all.
Including output from privacyidea.log.

THanks a lot
Cornelius


#3

I just checked with the current release candidate of 2.22 (2.22dev7 which could be installed via ppa:privacyidea/privacyidea-dev - see privacyIDEA 2.22 prerelease).

Sending SMS works fine via SMTP provider. The token might have an entry

sms.Provider: privacyidea.lib.smsprovider.Ht...

which is a remnant of the depricated SMS configuration. But it does not matter. The SMS is still sent via the configured SMS-Gateway in Config->Token->SMS.


#4

Thanks Cornelius. Yes the SMS message is still received via SMTP even with the sms.Provider set to “privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider” for that token. If that is deprecated, I am happy ignoring it.

I did remove the entry from the config table and restarted Apache. New tokens are still generated with the privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider in the tokeninfo table, but they still work fine.

I have logged the issue in Github: https://github.com/privacyidea/privacyidea/issues/993