directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lucas theisen (JIRA)" <>
Subject [jira] [Updated] (DIRSERVER-1936) Annotation based integration of password policy.
Date Fri, 13 Dec 2013 16:23:09 GMT


lucas theisen updated DIRSERVER-1936:


This implementation is an example.  The annotation could probably remain unmodified (except
package should be changed to apache), but the PasswordPolicyAnnotationProcessingTestRule functionality
would probably be better integrated into the FrameworkRunner though it could be left alone.
 As such, you need to add the @Rule along with the annotation:

    public TestRule passwordPolicyAnnotationProcessingTestRule = new PasswordPolicyAnnotationProcessingTestRule(
            (AuthenticationInterceptor) getService().getInterceptor( 
                    InterceptorEnum.AUTHENTICATION_INTERCEPTOR.getName() ) );


            pwdMustChange = true,
            pwdMinAge = 5,
            pwdCheckQuality = CheckQualityEnum.CHECK_ACCEPT )
    public void testMinAge() throws LdapException, InterruptedException {

If you indeed are interested, I could supply a patch to the trunk.  Let me know.

> Annotation based integration of password policy.
> ------------------------------------------------
>                 Key: DIRSERVER-1936
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 2.0.0-M16
>            Reporter: lucas theisen
>            Priority: Trivial
>         Attachments:,
> For my own unit testing purposes, I have added some additional annotations to add password
policies via annotations.  See attached classes.  It makes for cleaner tests with more obvious
settings.  You may or may not want to integrate this approach, but I thought i would offer.

This message was sent by Atlassian JIRA

View raw message