String(resolutionContext.getAttributeRecipientID()) returns null

Rhian Resnick rresnick at fau.edu
Tue Jul 18 08:02:53 EDT 2017


Andrew and Scott,


Thank you for the sample code and pointers. Turns out we were lookup the entityId incorrectly and your sample code pointed us in the correct direction.


The following line correctly and reliably returns the entityId of the relaying party and resolves our issue.


        peerEntityId = profileContext.getSubcontext("net.shibboleth.idp.profile.context.RelyingPartyContext").getRelyingPartyId();

Thanks



Rhian Resnick

Assistant Director Middleware and HPC

Office of Information Technology


Florida Atlantic University

777 Glades Road, CM22, Rm 173B

Boca Raton, FL 33431

Phone 561.297.2647

Fax 561.297.0222

 [image] <https://hpc.fau.edu/wp-content/uploads/2015/01/image.jpg>


________________________________
From: users <users-bounces at shibboleth.net> on behalf of Cantor, Scott <cantor.2 at osu.edu>
Sent: Monday, July 17, 2017 7:28 PM
To: Shib Users
Subject: Re: String(resolutionContext.getAttributeRecipientID()) returns null

On 7/17/17, 6:08 PM, "users on behalf of Rhian Resnick" <users-bounces at shibboleth.net on behalf of rresnick at fau.edu> wrote:

> Oh my, we may be missing something obvious. How does one obtain the entityId of the remote service provider in the context of
> the mfa flow selection?

Generally input.getSubcontext("net.shibboleth.idp.profile.context.RelyingPartyContext").getRelyingPartyId()

> The value is populated by something because when Shibboleth resolves the users attributes the value is present and the code
> executes as expected. Unfortunately when called by the MFA selection code it is null.

The value is populated by the IdP when it runs the resolver. You are running the resolver, ergo you have to populate it. Look at the script example; you're creating the context in the first place. A fresh one is empty. Even the principal name has to be supplied to it.

-- Scott


--
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20170718/94ae96d7/attachment-0001.html>


More information about the users mailing list