Mantis - Quercus
Viewing Issue Advanced Details
3901 minor always 02-20-10 21:39 02-20-10 21:39
new 4.0.3  
0003901: JSR 223 javax.script ServletContext issue
(rep by liamr) [^]

We're trying to use quercus as a JSR-223 compliant scripting language with Shibboleth (a java based web SSO package). In addition to being an SSO, Shibboleth provides "attribute" information about users for the purposes of making authorization decisions. Attribute values can be generated by JSR-223 compliant languages...

My php script can see the information passed into it..


But attribute data modified by the script doesn't make it back out of the script.


    import edu.internet2.middleware.shibboleth.common.attribute.provider.BasicAttribute;
    $phpAttr = new BasicAttribute("phpAttr");
    $phpAttr->getValues()->add("some value");

Other than invoking $attr->getValues()->add(), one shouldn't have to do anything to make the information available to the application. The equivalent script in ECMAscript would be..


jsAttr = new BasicAttribute("jsAttr");
jsAttr.getValues().add("some value");

I'm not that Java savvy, but the Shib developers suggested that it could be a "context" issue.
The JSR-223 APIs have you pass in a processing context in to the script execution engine. This context contains a map where the keys are the attribute IDs and the values are the created objects. The keys then get changed in to variables within the script.
Shibboleth can see the updated value in the other JSR-223 compliant languages I've tried (jython, jruby, ECMAscript, groovy). My example script is essentially the same across all languages.

I'd really like to be able to use PHP/Quercus for this purpose (PHP being my language of choice). I'm not sure if the behavior I'm seeing with Quercus is a bug or a configuration option.

There are no notes attached to this issue.