Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Information Flow control basically implementation message filtering algorithm

Hi !! ALL

I kindly need this clarification from AOP security community, i want to apply information flow control for leakage of information because of  virus attach in an enterprise application , whether Spring security  i.e, Spring's proxy based AOP is better,But how to apply for an jFTPd server application ?

Please who are using Spring security & AOP can  provide me some help.

S K Sirbi


On Sat, Jan 8, 2011 at 3:00 AM, <aspectj-users-request@xxxxxxxxxxx> wrote:
Send aspectj-users mailing list submissions to
       aspectj-users@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
       https://dev.eclipse.org/mailman/listinfo/aspectj-users
or, via email, send a message with subject or body 'help' to
       aspectj-users-request@xxxxxxxxxxx

You can reach the person managing the list at
       aspectj-users-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of aspectj-users digest..."


Today's Topics:

  1. Re: How to turn of "optimized matching"? (Andy Clement)
  2. Re: Retrieving value whilst using the "get"       primitive
     (Andy Clement)
  3. Re: How to turn of "optimized matching"? (Ramnivas Laddad)


----------------------------------------------------------------------

Message: 1
Date: Fri, 7 Jan 2011 11:42:03 -0800
From: Andy Clement <andrew.clement@xxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] How to turn of "optimized matching"?
Message-ID:
       <AANLkTinT1q-bHvSu7d-dvHjhEtB30WhT_AUSL1exEfe_@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1

Hi Anthony,

Your description of what might be the problem sounds correct.  I'm not
an expert on the spring usage of AspectJ though, I might have to wait
for Ramnivas to chime in on this thread.

In your first post, I got the impression that everything works as
expected even when the type cannot be found?  It is only a warning
that the type cannot be found, and an Xlint warning at that (which
means it can be turned off entirely). If running via an agent, then a
META-INF/aop.xml can be setup to turn off xlints or turn off optimized
matching, but I can't say for certain how you do it in the
spring-using-aspectj case, another thing it'd be nice to hear from
Ramnivas on.  in the aop.xml file you just need to set the weaver
options section:

<weaver options="-Xset:optimizedMatching=false"/>
or
<weaver options="-Xlint:ignore"/>

Given that it is just a warning, do you just want to run completely
clean in your environment?

Andy


On 6 January 2011 17:39, Anthony Tang <aant00@xxxxxxxxx> wrote:
> Actually, on further inspection, it looks like this is a potential problem
> in AspectJ.? ReflectionBasedRefereceTypeDelegateFactory uses a classloader
> that is set during initialization, but this classloader is not necessarily
> the correct one.? For example, in our app, we're running two wars within an
> ear (in jboss), and we need classloader isolation between those two
> webapps.? There are some common beans in the ear so spring is initialized at
> the ear level, which ends up setting the "usingClassLoader"in
> ReflectionBasedReferenceTypeDelegateFactory to the ear's classloader.? But
> later, when the war specific beans are initialized, this classloader does
> not have visibility to the war loaded objects, which results in this
> failure.
>
> Is my understanding of how this is working correct?
>
> Thanks.
> - Anthony
>
>
> ________________________________
> From: Anthony Tang <aant00@xxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Sent: Wed, January 5, 2011 11:02:02 AM
> Subject: Re: How to turn of "optimized matching"?
>
> Hi Andy -
>
> Thanks for the quick reply.? We are doing load time weaving.? How do I
> specify this option when using spring for the aop configuration?? I tried
> adding an aop.xml file to the ear's META-INF/ directory, but it doesn't seem
> to have an effect.
>
> The bug we're encountering is probably more on our side than in aspectj.
> Our custom Adaptor Factory Bean returns a Proxy, which fails to be loaded by
> ReflectionBasedReferenceTypeDelegateFactory (line 38) which results in the
> creation of a MissingResolvedTypeWithKnownSignature type.? During optimized
> matching, it looks like it tries to get some information from the object (in
> KindedPointcut, line 126), but since it's a
> "MissingResolvedTypeWithKnownSignature", this results in an exception thrown
> instead:
>
> Post-processing of the FactoryBean's object failed; nested exception is
> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning
> can't determine modifiers of missing type $Proxy380
> ?[Xlint:cantFindType]
>
> The specific problem seems to be that our custom adaptor factory bean loads
> the proxy in a different class loader than the World is initialized with.
> The deployment consists of an ear with multiple wars, and the first war ends
> up initializing spring/aspectj, so its classloader is the one used by the
> World, but other wars end up using a different classloader for the proxy
> object.? Once the postprocessing is allowed to occur in the first war and
> the object is cached, the problem goes away.? In aspectj 1.5.3, this wasn't
> a problem, but I can't find source code to step through what it's doing
> differently.? I assumed turning off the optimized matching in 1.6.9 would
> help, since that's where the above exception is coming from (plus everything
> works after it's correctly loaded/post processed by the first war).? That
> would be a quick fix while we tried to untangle the classloader problems.
>
> Thanks.
> - Anthony
>
> On 4 January 2011 21:41, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
>> Hi Anthony,
>>
>> Do you mean the optimized matching that became default in AspectJ
>> 1.6.7 onwards? (Discussed here:
>>
>> http://andrewclement.blogspot.com/2009/11/aspectj-how-much-faster-is-aspectj-167.html
>> ).? Ideally I'd like to fix any bugs so it isn't causing you an issue
>> under Spring - do you want to raise an AspectJ bug for the problem?
>> There is a configuration option for the weaver that turns it off:
>>
>> -Xset:optimizedMatching=false
>>
>> But I'm not sure where you would set that, it depends on your spring
>> configuration.? I would normally set it either on the command line (if
>> compile time weaving), or in an aop.xml file (if loadtime weaving).
>>
>> cheers
>> Andy
>>
>> On 4 January 2011 18:40, Anthony Tang <aant00@xxxxxxxxx> wrote:
>> > Hi -
>> >
>> > I am having a problem with optimized matching specific to a custom
>> > Adaptor
>> > Factor Bean I have in Spring.? While trying to figure that out, it looks
>> > like I can get around it by turning off "optimized matching", but I
>> > can't
>> > find documentation on how to specify these configurations.
>> >
>> > How do I specify an option to the JVM so that aspectj turns off
>> > optimized
>> > matching?? I am running a web application deployed as an EAR in JBoss.
>> >
>> > Thanks!
>> >
>> > _______________________________________________
>> > aspectj-users mailing list
>> > aspectj-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>> >
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


------------------------------

Message: 2
Date: Fri, 7 Jan 2011 11:47:06 -0800
From: Andy Clement <andrew.clement@xxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Retrieving value whilst using the "get"
       primitive
Message-ID:
       <AANLkTinXR3wmPSpoc61zEhLHz3MrVNtiuekAOoF-VJT_@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1

I feel there ought to be a neater way I can't quite think of, but
these are options:

import org.aspectj.lang.reflect.*;

public aspect Foo {
 boolean around(): get(boolean value) {
   boolean b = proceed();
   System.out.println("around advice: "+b);
   return b;
 }

 after(C target): get(boolean C.value) && target(target) {
   try {
     boolean b =
((FieldSignature)thisJoinPoint.getSignature()).getField().getBoolean(target);
     System.out.println("before advice: "+b);
   } catch (Exception e) {}
 }

 public static void main(String []argv) {
   new C().run();
 }
}

class C {
 boolean value = true;

 public void run() {
   boolean b = value;
   value= false;
   b = value;
 }
}

Andy

On 7 January 2011 08:10, tomansley <tomansley@xxxxxxxxx> wrote:
>
> (NOTE: If anybody has a way of being able to do meaningful searches on "get"
> and "set" then let me know. ?I have searched the web for my question below
> and am stymied by how to actually perform the search)
>
> Hi all,
>
> I am playing around with the "get" and "set" primitives and am not having
> luck gaining access to the variable that is being retrieved with the "get".
> The set works fine. ?The following code allows me to gain access to the
> variable (isCacheEnabled) that is being set along with the new value that
> the value is being set to.
>
> before(Boolean newval): set(Boolean ReferenceDataWorker+.isCacheEnabled) &&
> args(newval) {
> ? ? ? ?System.out.println("isCacheEnabled has been set and the new value is " +
> newval);
> }
>
> This works great and I am able to print out the new value that
> isCacheEnabled is being set to. ?The same cannot be said for when I use the
> "get" primitive. ?Obviously I do not have the argument available since there
> is no argument. ?I am trying to print out the value of isCacheEnabled before
> (or after for that matter) its retrieved.
>
> before(): get(Boolean ReferenceDataWorker+.isCacheEnabled) {
> ? ? ? ?System.out.println("isCacheEnabled has been retrieved and the value is " +
> isCacheEnabled);
> }
>
> My question is: How do I gain access to the "isCacheEnabled" variable when
> using the "get" primitive? ?If anyone has anymore useful tips on gaining
> access to variables then that would be great as well. ?I have tried
> understanding "this", "target" etc but I think I am missing something
> fundamental.
>
> Any help greatly appreciated.
>
> Cheers
> Tom
> --
> View this message in context: http://aspectj.2085585.n4.nabble.com/Retrieving-value-whilst-using-the-get-primitive-tp3179362p3179362.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


------------------------------

Message: 3
Date: Fri, 7 Jan 2011 13:30:16 -0800
From: Ramnivas Laddad <ramnivas@xxxxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] How to turn of "optimized matching"?
Message-ID:
       <AANLkTi=G=05gtu4j1Z3jQuyhiHM2-mufxuXcBs-8kQAH@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

It has been a very long time since I dealt with an ear!

The apo.xml file needs to be on classpath element META-INF. For a war file,
it need to be in either classes/META-INF/aop.xml or in a jar under META-INF.
You will need to place apo.xml for ear under an equivalent location. Can you
try this and we can go from there.

-Ramnivas

On Fri, Jan 7, 2011 at 11:42 AM, Andy Clement <andrew.clement@xxxxxxxxx>wrote:

> Hi Anthony,
>
> Your description of what might be the problem sounds correct.  I'm not
> an expert on the spring usage of AspectJ though, I might have to wait
> for Ramnivas to chime in on this thread.
>
> In your first post, I got the impression that everything works as
> expected even when the type cannot be found?  It is only a warning
> that the type cannot be found, and an Xlint warning at that (which
> means it can be turned off entirely). If running via an agent, then a
> META-INF/aop.xml can be setup to turn off xlints or turn off optimized
> matching, but I can't say for certain how you do it in the
> spring-using-aspectj case, another thing it'd be nice to hear from
> Ramnivas on.  in the aop.xml file you just need to set the weaver
> options section:
>
> <weaver options="-Xset:optimizedMatching=false"/>
> or
> <weaver options="-Xlint:ignore"/>
>
> Given that it is just a warning, do you just want to run completely
> clean in your environment?
>
> Andy
>
>
> On 6 January 2011 17:39, Anthony Tang <aant00@xxxxxxxxx> wrote:
> > Actually, on further inspection, it looks like this is a potential
> problem
> > in AspectJ.  ReflectionBasedRefereceTypeDelegateFactory uses a
> classloader
> > that is set during initialization, but this classloader is not
> necessarily
> > the correct one.  For example, in our app, we're running two wars within
> an
> > ear (in jboss), and we need classloader isolation between those two
> > webapps.  There are some common beans in the ear so spring is initialized
> at
> > the ear level, which ends up setting the "usingClassLoader"in
> > ReflectionBasedReferenceTypeDelegateFactory to the ear's classloader.
> But
> > later, when the war specific beans are initialized, this classloader does
> > not have visibility to the war loaded objects, which results in this
> > failure.
> >
> > Is my understanding of how this is working correct?
> >
> > Thanks.
> > - Anthony
> >
> >
> > ________________________________
> > From: Anthony Tang <aant00@xxxxxxxxx>
> > To: aspectj-users@xxxxxxxxxxx
> > Sent: Wed, January 5, 2011 11:02:02 AM
> > Subject: Re: How to turn of "optimized matching"?
> >
> > Hi Andy -
> >
> > Thanks for the quick reply.  We are doing load time weaving.  How do I
> > specify this option when using spring for the aop configuration?  I tried
> > adding an aop.xml file to the ear's META-INF/ directory, but it doesn't
> seem
> > to have an effect.
> >
> > The bug we're encountering is probably more on our side than in aspectj.
> > Our custom Adaptor Factory Bean returns a Proxy, which fails to be loaded
> by
> > ReflectionBasedReferenceTypeDelegateFactory (line 38) which results in
> the
> > creation of a MissingResolvedTypeWithKnownSignature type.  During
> optimized
> > matching, it looks like it tries to get some information from the object
> (in
> > KindedPointcut, line 126), but since it's a
> > "MissingResolvedTypeWithKnownSignature", this results in an exception
> thrown
> > instead:
> >
> > Post-processing of the FactoryBean's object failed; nested exception is
> > org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
> warning
> > can't determine modifiers of missing type $Proxy380
> >  [Xlint:cantFindType]
> >
> > The specific problem seems to be that our custom adaptor factory bean
> loads
> > the proxy in a different class loader than the World is initialized with.
> > The deployment consists of an ear with multiple wars, and the first war
> ends
> > up initializing spring/aspectj, so its classloader is the one used by the
> > World, but other wars end up using a different classloader for the proxy
> > object.  Once the postprocessing is allowed to occur in the first war and
> > the object is cached, the problem goes away.  In aspectj 1.5.3, this
> wasn't
> > a problem, but I can't find source code to step through what it's doing
> > differently.  I assumed turning off the optimized matching in 1.6.9 would
> > help, since that's where the above exception is coming from (plus
> everything
> > works after it's correctly loaded/post processed by the first war).  That
> > would be a quick fix while we tried to untangle the classloader problems.
> >
> > Thanks.
> > - Anthony
> >
> > On 4 January 2011 21:41, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
> >> Hi Anthony,
> >>
> >> Do you mean the optimized matching that became default in AspectJ
> >> 1.6.7 onwards? (Discussed here:
> >>
> >>
> http://andrewclement.blogspot.com/2009/11/aspectj-how-much-faster-is-aspectj-167.html
> >> ).  Ideally I'd like to fix any bugs so it isn't causing you an issue
> >> under Spring - do you want to raise an AspectJ bug for the problem?
> >> There is a configuration option for the weaver that turns it off:
> >>
> >> -Xset:optimizedMatching=false
> >>
> >> But I'm not sure where you would set that, it depends on your spring
> >> configuration.  I would normally set it either on the command line (if
> >> compile time weaving), or in an aop.xml file (if loadtime weaving).
> >>
> >> cheers
> >> Andy
> >>
> >> On 4 January 2011 18:40, Anthony Tang <aant00@xxxxxxxxx> wrote:
> >> > Hi -
> >> >
> >> > I am having a problem with optimized matching specific to a custom
> >> > Adaptor
> >> > Factor Bean I have in Spring.? While trying to figure that out, it
> looks
> >> > like I can get around it by turning off "optimized matching", but I
> >> > can't
> >> > find documentation on how to specify these configurations.
> >> >
> >> > How do I specify an option to the JVM so that aspectj turns off
> >> > optimized
> >> > matching?? I am running a web application deployed as an EAR in JBoss.
> >> >
> >> > Thanks!
> >> >
> >> > _______________________________________________
> >> > aspectj-users mailing list
> >> > aspectj-users@xxxxxxxxxxx
> >> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >> >
> >> >
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> >
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20110107/3ad58cb6/attachment.htm>

------------------------------

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


End of aspectj-users Digest, Vol 71, Issue 5
********************************************


Back to the top