getInboundMessageTransport always returns a null value

Mark McCoy Mark.McCoy at utsa.edu
Tue May 26 11:49:28 EDT 2015


We are trying to add a check on the user’s IP address to determine whether or not the user is coming from on or off campus.

IdP version: 2.4.4
Tomcat: 6.0.24
Java: OpenJDK 1.7.0.75
OS: RHEL 6.6

In a scripted attribute, I’ve tried to use the following calls to get the user’s IP address. Every call results in the getInboundMessageTransport() returning a null value, which obviously causes the getPeerAddress() call to fail. Other calls to methods contained within the requestContext succeed (example, the getEntityId() call works fine).

try {
   var ipAddress = requestContext.getInboundMessageTransport().getPeerAddress();
} catch (err) {
   var ipAddress = 'unavailable'
   logger.warn(pre + err);
}
logger.debug(pre + "ipAddress = " + ipAddress);

The idp-process.log entries look like this:
2015-05-26 10:34:48.817 - WARN [edu.internet2.middleware.shibboleth.resolver.Script.validAuthContexts:-2] - TypeError: Cannot call method "getPeerAddress" of null
2015-05-26 10:34:48.817 - DEBUG [edu.internet2.middleware.shibboleth.resolver.Script.validAuthContexts:-1] - ipAddress = unavailable

Any suggestions?

Thanks,
Mark

---
Mark McCoy
Identity Management
The University of Texas at San Antonio
210-458-5871

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20150526/90402553/attachment-0001.html>


More information about the users mailing list