Highlighted
pjagadesh Absent Member.
Absent Member.
1769 views

SSPR: SMS Gateway help needed

Hi,

I am currently new to SSPR. We have a requirement for sending the token via sms&Email. As of now i was able to configure the Email settings successfully.

But facing issues in the SMS Gateway configuration.

As of now i have the key parameters like,
1. SMS Gateway URL
2. API Key, which needs to be send via headers.
3. And its a JSON based API.

Could anyone please point/guide me to configure the SMS Gateway with the above parameters. Also apart from this any thing i have to look into.

Gave try to configure, I am getting below errors in the tomcat.

2017-05-15T13:07:05Z, FATAL, servlet.PwmServlet, 5015 ERROR_UNKNOWN (unexpected error processing request: null
java.lang.NullPointerException
at java.lang.String.replace(Unknown Source)
at password.pwm.util.queue.SmsQueueManager$SmsSendEngine.sendSms(SmsQueueManager.java:404)
at password.pwm.util.queue.SmsQueueManager.sendDirectMessage(SmsQueueManager.java:495)
at password.pwm.http.servlet.ConfigEditorServlet.restSmsHealthCheck(ConfigEditorServlet.java:659)
at password.pwm.http.servlet.ConfigEditorServlet.processAction(ConfigEditorServlet.java:189)
at password.pwm.http.servlet.PwmServlet.handleRequest(PwmServlet.java:111)
at password.pwm.http.servlet.PwmServlet.doPost(PwmServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at password.pwm.http.filter.AbstractPwmFilter$PwmFilterChain.doFilter(AbstractPwmFilter.java:100)
at password.pwm.http.filter.AuthenticationFilter.processAuthenticatedSession(AuthenticationFilter.java:156)
at password.pwm.http.filter.AuthenticationFilter.processFilter(AuthenticationFilter.java:97)
at password.pwm.http.filter.AbstractPwmFilter.doFilter(AbstractPwmFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at password.pwm.http.filter.AbstractPwmFilter$PwmFilterChain.doFilter(AbstractPwmFilter.java:100)
at password.pwm.http.filter.SessionFilter.processFilter(SessionFilter.java:86)
at password.pwm.http.filter.AbstractPwmFilter.doFilter(AbstractPwmFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at password.pwm.http.filter.AbstractPwmFilter$PwmFilterChain.doFilter(AbstractPwmFilter.java:100)
at password.pwm.http.filter.ApplicationModeFilter.processFilter(ApplicationModeFilter.java:69)
at password.pwm.http.filter.AbstractPwmFilter.doFilter(AbstractPwmFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at password.pwm.http.filter.RequestInitializationFilter.doFilter(RequestInitializationFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at password.pwm.http.filter.GZIPFilter.doFilter(GZIPFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
)

Thanks in advance.:mad:
0 Likes
6 Replies
Knowledge Partner
Knowledge Partner

Re: SSPR: SMS Gateway help needed

Could you give us a few more details?

SSPR version (exactly)
Which fields you have filled out, with which values, for the SMS gateway?
No, don't send usernames/passwords, but confirm you put something valid in
them.

A NullPointerException when trying to do a replacement on a String object
makes me think you left something blank that is assumed to never be
blank/null.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
0 Likes
pjagadesh Absent Member.
Absent Member.

Re: SSPR: SMS Gateway help needed

SSPR Version 3.4

As per the SMS Gateway provider documentation there is no need to configure authentication. So that is left blank.

Below are the filled in configurations.

1. SMS Gateway Example: https://xxx.yyy.com/service/sms
2. HTTP(S) Method : POST
3. SMS Gateway Authentication Method : Request Authentication will be the part of the request.
4. SMS Request Data: To=%TO%&From=%SENDERID%&Body=%MESSAGE%&-u %USER%:%PASS%
5. SMS Data Content Type : Javascript - Recommended for JSON formatted documents
6. SMS Gateway HTTP Request Headers : apikey-xxxxxxxxx....
7. Successful HTTP Result Codes : 202 (Got it from the SMS Gateway API document)


Thanks,
0 Likes
Knowledge Partner
Knowledge Partner

Re: SSPR: SMS Gateway help needed

On 05/15/2017 07:44 AM, pjagadesh wrote:
>
> SSPR Version 3.4
>
> As per the SMS Gateway provider documentation there is no need to
> configure authentication. So that is left blank.


That, to me, seems really strange. I do not think I have worked with a
provider that did not require authentication, but this isn't my area of
expertise either. Are you able to provide something in those fields which
would be valid to the provider, even if not required?

> Below are the filled in configurations.
>
> 1. SMS Gateway Example: https://xxx.yyy.com/service/sms
> 2. HTTP(S) Method : POST
> 3. SMS Gateway Authentication Method : Request Authentication will be
> the part of the request.
> 4. SMS Request Data: To=%TO%&From=%SENDERID%&Body=%MESSAGE%&-u
> %USER%:%PASS%
> 5. SMS Data Content Type : Javascript - Recommended for JSON formatted
> documents
> 6. SMS Gateway HTTP Request Headers : apikey-xxxxxxxxx....
> 7. Successful HTTP Result Codes : 202 (Got it from the SMS Gateway API
> document)


Are these numbered items from an actual test using something like 'curl'
or another HTTP client, or are you getting this 202 back in SSPR?

It may also be worth testing out the latest (4.x) version of SSPR to see
if that helps at all as 3.4 is pretty old.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
0 Likes
ScorpionSting Absent Member.
Absent Member.

Re: SSPR: SMS Gateway help needed

So, the "SMS Request Data" says something....

To=%TO%&From=%SENDERID%&Body=%MESSAGE%&-u %USER%:%PASS%


I would put your %USER% value into the Username parameter in SSPR, the %PASS% into the Password and change the Request Data to be:

To=%TO%&From=%SENDERID%&Body=%MESSAGE%


As Aaron suggests, the "-u" tends to be a CLI command switch for authentication

Visit my Website for links to Cool Solution articles.
0 Likes
pjagadesh Absent Member.
Absent Member.

Re: SSPR: SMS Gateway help needed

ScorpionSting;2457501 wrote:
So, the "SMS Request Data" says something....



I would put your %USER% value into the Username parameter in SSPR, the %PASS% into the Password and change the Request Data to be:



As Aaron suggests, the "-u" tends to be a CLI command switch for authentication


Hi All,

Yes. As per the documentation instead of authentication, we need to send the apikey in the headers.

Is there any possibility to check the trace of what exactly happens in the background when we click on the TEST SMS setting.

Thanks,
Prashanth
0 Likes
ScorpionSting Absent Member.
Absent Member.

Re: SSPR: SMS Gateway help needed

As it stands, your SMS Request Data is malformed, have you corrected this and tried again? Thought of upgrading to current release?

Change the logging configuration in the UI, then check the catalina.out

Visit my Website for links to Cool Solution articles.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.