Bug 685007 - Update RemoteClientProxy to work with signed jars
Summary: Update RemoteClientProxy to work with signed jars
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Charles Crouch
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon30-bugs jon3-sprint1 715334
TreeView+ depends on / blocked
 
Reported: 2011-03-15 03:23 UTC by Charles Crouch
Modified: 2015-02-01 23:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-03 16:58:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Charles Crouch 2011-03-15 03:23:29 UTC
Right now RemoteClientProxy.simplifyInterface() takes an interface class and tries to create a new class in the same package by appending the interface name with "Simple". When that interface is from a signed jar, loading the resulting class fails with an error similar to 

2011-03-14 18:34:45,497 ERROR [RHQ Client Prompt Input Thread]
(org.rhq.enterprise.client.RemoteClientProxy)- Failed to
simplify interface org.rhq.enterprise.server.auth.SubjectManagerRemote.
javassist.CannotCompileException: by java.lang.SecurityException: class
"org.rhq.enterprise.server.auth.SubjectManagerRe
moteSimple"'s signer information does not match signer information of other
classes in the same package
        at javassist.ClassPool.toClass(ClassPool.java:953)
        at javassist.ClassPool.toClass(ClassPool.java:896)
        at javassist.ClassPool.toClass(ClassPool.java:854)
        at javassist.CtClass.toClass(CtClass.java:1053)
        at
org.rhq.enterprise.client.RemoteClientProxy.simplifyInterface(RemoteClientProxy.java:146

RemoteClientProxy.simplifyInterface() appears to support recovering from such as errors, by returning the original interface, but as shown in https://bugzilla.redhat.com/show_bug.cgi?id=685003 that doesn't appear to work as expected.

Comment 1 Lukas Krejci 2011-03-15 15:21:26 UTC
Note that this has been the intended behaviour since introduction of CLI.

The RemoteClientProxy "simplifies" the remote interfaces by removing the Subject parameter from them. The JS client then actually uses these simplified interfaces to do the remote calls. The currently logged in user is used behind the scenes to automatically insert that parameter back when doing the actual remote call.

The fix here, I think, is to change the package the simplified interface is declared in.

Comment 2 Lukas Krejci 2011-03-15 15:23:42 UTC
Another note:

This method changed location in RHQ 4 codebase and is now declared in:

org.rhq.bindings.util.InterfaceSimplifier

in the modules/enterprise/binding module

Comment 3 Ian Springer 2011-05-16 20:39:01 UTC
Simplified interfaces now have a different package than the original interface. For example, the simplified interface for "org.rhq.enterprise.server.auth.SubjectManagerRemote" is now "org.rhq.enterprise.server.auth.wrapped.SubjectManagerRemoteSimple" - [master 40faf17].

Comment 4 Mike Foley 2011-05-24 20:31:15 UTC
to verify requires a jon build from brew (with signed jars)

Comment 9 Mike Foley 2011-09-06 16:47:12 UTC
verified JON3 Beta ... a build created with Brew and signed-jars...

Comment 11 Heiko W. Rupp 2013-09-03 16:58:40 UTC
Bulk closing of old issues that are in VERIFIED state.


Note You need to log in before you can comment on or make changes to this bug.