Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003901 [Quercus] minor always 02-20-10 21:39 02-20-10 21:39
Reporter nam View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.3
  Product Build
Summary 0003901: JSR 223 javax.script ServletContext issue
Description (rep by liamr)

http://forum.caucho.com/showthread.php?t=4354 [^]

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..
Code:

$givenName->getValues()->get(0)

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

Code:

<?php
    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..

Code:

importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
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.
Quote:
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.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
02-20-10 21:39 nam New Issue


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
26 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker