[security-dev] Added IdentityStoreInvocationContext
Shane Bryzak
sbryzak at redhat.com
Wed Oct 24 23:33:20 EDT 2012
Just to add to the previous changes, I've also made a change to the
IdentityStore API so that each method includes an
IdentityStoreInvocationContext parameter. This API was first introduced
by Bolek in PicketLink 1.x [1] and offers a robust method of passing
context-specific state to individual IdentityStore invocations.
I can't think of any more elegant design that addresses this requirement
or improves on the work Bolek has already done, so beyond any minor
tweaks to the API I think we should stick with the motto "if it ain't
broke, don't fix it".
I've gone ahead and updated both (JPA and LDAP) IdentityStore
implementations to include these parameters. Along the way though, it
seems I've broken a couple of the LDAP tests; Pedro or Anil, could you
please take a look at these as my LDAP is a little rusty - I've attached
the stack trace output from the test run.
[1]
https://github.com/picketlink/picketlink-idm/tree/1.4/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/store
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/security-dev/attachments/20121025/c8871e2d/attachment.html
-------------- next part --------------
-------------------------------------------------------------------------------
Test set: org.picketlink.test.idm.internal.mgr.DefaultLDAPIdentityManagerTestCase
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.014 sec <<< FAILURE!
testDefaultIdentityManager(org.picketlink.test.idm.internal.mgr.DefaultLDAPIdentityManagerTestCase) Time elapsed: 4.012 sec <<< ERROR!
java.lang.NullPointerException
at org.picketlink.idm.ldap.internal.LDAPUser.setLastName(LDAPUser.java:293)
at org.picketlink.idm.ldap.internal.LDAPIdentityStore.createUser(LDAPIdentityStore.java:113)
at org.picketlink.idm.internal.DefaultIdentityManager.createUser(DefaultIdentityManager.java:72)
at org.picketlink.test.idm.internal.mgr.DefaultLDAPIdentityManagerTestCase.testDefaultIdentityManager(DefaultLDAPIdentityManagerTestCase.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
More information about the security-dev
mailing list