HttpClient in Scripted Attribute Example

Paul Caskey pcaskey at internet2.edu
Tue Nov 7 20:41:09 EST 2017


Interesting approach…

I’m curious what would happen if that URL were unavailable/erroring or, perhaps worse, taking a really long time to respond.




On 11/7/17, 4:08 PM, "users on behalf of Klingenstein, Nate" <users-bounces at shibboleth.net on behalf of nklingenstein at calstate.edu> wrote:

    > I suppose you could do something with the java.net.URL class to do something simple, perhaps.
    
    It's trivial to do this with no safety netting.  Failures of various types appear to display a frank 500 error to the browser without taking down the IdP, making this appear innocuous.
    
    Does anyone know how dangerous is this in reality?
    
    	<AttributeDefinition xsi:type="ScriptedAttribute" id="createUserInADForvIDM">
    		<Dependency ref="calstateEduPersonID"/>
    		<Script><![CDATA[
    logger = Java.type("org.slf4j.LoggerFactory").getLogger("edu.calstate.co.idm.vidm.createUserInADForvIDM");
    urlType = Java.type("java.net.URL");
    var url = "https://iam.calstate.edu/provision.aspx?cepid=" + calstateEduPersonID.getValues().get(0);
    urlTyped = new urlType(url);
    urlTyped.openStream();
    logger.debug("User provisioned at URL: {} ", url);
    		]]></Script>
    	</AttributeDefinition>
    -- 
    For Consortium Member technical support, see https://wiki.shibboleth.net/confluence/x/coFAAg
    To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
    



More information about the users mailing list