directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1665421 - /directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/
Date Tue, 10 Mar 2015 09:17:01 GMT
Author: elecharny
Date: Tue Mar 10 09:17:01 2015
New Revision: 1665421

URL: http://svn.apache.org/r1665421
Log:
o Adding some Javadoc
o Adding the pwdMin/MaxDelay fields

Modified:
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesMasterDetailsBlock.java
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java?rev=1665421&r1=1665420&r2=1665421&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
Tue Mar 10 09:17:01 2015
@@ -2036,6 +2036,9 @@ public class LdapLdapsServersPage extend
                     setText( authMechNtlmText, saslMechHandler.getNtlmMechProvider() );
                 }
             }
+            
+            // Delegating authentication
+            // TODO
 
             // Limits
             setText( maxTimeLimitText, Integer.toString( ldapServerBean.getLdapServerMaxTimeLimit()
) );

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesMasterDetailsBlock.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesMasterDetailsBlock.java?rev=1665421&r1=1665420&r2=1665421&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesMasterDetailsBlock.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesMasterDetailsBlock.java
Tue Mar 10 09:17:01 2015
@@ -55,6 +55,59 @@ import org.eclipse.ui.forms.widgets.Sect
 /**
  * This class represents the Password Policies Master/Details Block used in the Password
Policies Page.
  *
+ * <pre>
+ * +------------------------------------------------------------------------------------+
+ * | .----------------------------------. .-------------------------------------------. |
+ * | | All password Policies            | | Password Policy Details                   | |
+ * | +----------------------------------+ +-------------------------------------------+ |
+ * | | +---------------------+          | | Set the properties of the password Policy | |
+ * | | | Default (enabled)   | [ Add  ] | |  [X] Enabled                              | |
+ * | | |                     | [Delete] | |  ID :          [//////////]               | |
+ * | | |                     |          | |  Description : [////////////////////////] | |
+ * | | |                     |          | |  Attribute   : [////////////////////////] | |
+ * | | |                     |          | .-------------------------------------------. |
+ * | | |                     |          | | Quality                                   | |
+ * | | |                     |          | +-------------------------------------------+ |
+ * | | |                     |          | | Check quality : [=======================] | |
+ * | | |                     |          | | Validator :     [///////////////////////] | |
+ * | | |                     |          | | [X] Enable Minimum Length                 | |
+ * | | |                     |          | |   Number of chars : [NNN]                 | |
+ * | | |                     |          | | [X] Enable Maximum Length                 | |
+ * | | |                     |          | |   Number of chars : [NNN]                 | |
+ * | | |                     |          | .-------------------------------------------. |
+ * | | |                     |          | | Expiration                                | |
+ * | | |                     |          | +-------------------------------------------+ |
+ * | | |                     |          | | Minimum age (seconds): [NNN]              | |
+ * | | |                     |          | | Maximum age (seconds): [NNN]              | |
+ * | | |                     |          | | [X] Enable Expire Warning                 | |
+ * | | |                     |          | |   Number of seconds  : [NNN]              | |
+ * | | |                     |          | | [X] Enable Grace Authentication Limit     | |
+ * | | |                     |          | |   Number of times    : [NNN]              | |
+ * | | |                     |          | | [X] Enable Grace Expire                   | |
+ * | | |                     |          | |   Interval (seconds) : [NNN]              | |
+ * | | |                     |          | .-------------------------------------------. |
+ * | | |                     |          | | Options                                   | |
+ * | | |                     |          | +-------------------------------------------+ |
+ * | | |                     |          | | [X] Enable Must Change                    | |
+ * | | |                     |          | | [X] Enable Allow User Change              | |
+ * | | |                     |          | | [X] Enable Safe Modify                    | |
+ * | | |                     |          | .-------------------------------------------. |
+ * | | |                     |          | | Lockout                                   | |
+ * | | |                     |          | +-------------------------------------------+ |
+ * | | |                     |          | | [X] Enable Lockout                        | |
+ * | | |                     |          | |   Lockout duration (seconds)   : [NNN]    | |
+ * | | |                     |          | |   Maximum Consecutive Failures : [NNN]    | |
+ * | | |                     |          | |   Failure Count Interval       : [NNN]    | |
+ * | | |                     |          | | [X] Enable Maximum Idle                   | |
+ * | | |                     |          | |   Intervals                    : [NNN]    | |
+ * | | |                     |          | | [X] Enable In History                     | |
+ * | | |                     |          | |   Used passwords stored in Hist: [NNN]    | |
+ * | | |                     |          | | [X] Delay                                 | |
+ * | | |                     |          | |   Minimum delay (seconds)      : [NNN]    | |
+ * | | +---------------------+          | |   Maximum delay (seconds)      : [NNN]    | |
+ * | +----------------------------------+ +-------------------------------------------+ |
+ * +------------------------------------------------------------------------------------+
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class PasswordPoliciesMasterDetailsBlock extends MasterDetailsBlock
@@ -78,8 +131,7 @@ public class PasswordPoliciesMasterDetai
     /**
      * Creates a new instance of PasswordPoliciesMasterDetailsBlock.
      *
-     * @param page
-     *      the associated page
+     * @param page the associated page
      */
     public PasswordPoliciesMasterDetailsBlock( PasswordPoliciesPage page )
     {
@@ -181,6 +233,7 @@ public class PasswordPoliciesMasterDetai
                 return super.getImage( element );
             }
         } );
+        
         viewer.setComparator( new ViewerComparator()
         {
             public int compare( Viewer viewer, Object e1, Object e2 )

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java?rev=1665421&r1=1665420&r2=1665421&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java
Tue Mar 10 09:17:01 2015
@@ -20,6 +20,7 @@
 package org.apache.directory.studio.apacheds.configuration.v2.editor;
 
 
+import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.server.config.beans.AuthenticationInterceptorBean;
 import org.apache.directory.server.config.beans.DirectoryServiceBean;
 import org.apache.directory.server.config.beans.InterceptorBean;
@@ -29,17 +30,25 @@ import org.eclipse.ui.forms.widgets.Form
 
 
 /**
- * This class represents the General Page of the Server Configuration Editor.
+ * This class represents the PasswordPolicy Page of the Server Configuration Editor. It has

+ * two parts :
+ * <ul>
+ * <li>The list of existing password policies</li>
+ * <li>The detail for each selected password policy</li>
+ * </ul>
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class PasswordPoliciesPage extends ServerConfigurationEditorPage
 {
+    /** The authentication interceptor name */
     private static final String AUTHENTICATION_INTERCEPTOR_ID = "authenticationInterceptor";
+    
+    /** Default name for the passwordPolicy */
     private static final String PASSWORD_POLICY_ID_DEFAULT = "default";
-
+    
     /** The Page ID*/
-    public static final String ID = PasswordPoliciesPage.class.getName(); //$NON-NLS-1$
+    public static final String ID = PasswordPoliciesPage.class.getName(); 
 
     /** The Page Title */
     private static final String TITLE = Messages.getString( "PasswordPoliciesPage.PasswordPolicies"
); //$NON-NLS-1$
@@ -51,8 +60,7 @@ public class PasswordPoliciesPage extend
     /**
      * Creates a new instance of GeneralPage.
      *
-     * @param editor
-     *      the associated editor
+     * @param editor the associated editor
      */
     public PasswordPoliciesPage( ServerConfigurationEditor editor )
     {
@@ -177,22 +185,22 @@ public class PasswordPoliciesPage extend
 
             // Configuring the password policy
             passwordPolicy.setPwdId( PASSWORD_POLICY_ID_DEFAULT );
+            passwordPolicy.setPwdAttribute( SchemaConstants.USER_PASSWORD_AT );
+            passwordPolicy.setPwdMinAge( 0 );
             passwordPolicy.setPwdMaxAge( 0 );
-            passwordPolicy.setPwdFailureCountInterval( 30 );
-            passwordPolicy.setPwdAttribute( "userPassword" );
-            passwordPolicy.setPwdMaxFailure( 5 );
-            passwordPolicy.setPwdLockout( true );
-            passwordPolicy.setPwdMustChange( false );
-            passwordPolicy.setPwdLockoutDuration( 0 );
-            passwordPolicy.setPwdMinLength( 5 );
             passwordPolicy.setPwdInHistory( 5 );
-            passwordPolicy.setPwdExpireWarning( 600 );
-            passwordPolicy.setPwdMinAge( 0 );
-            passwordPolicy.setPwdAllowUserChange( true );
-            passwordPolicy.setPwdGraceAuthNLimit( 5 );
             passwordPolicy.setPwdCheckQuality( 1 );
+            passwordPolicy.setPwdMinLength( 5 );
             passwordPolicy.setPwdMaxLength( 0 );
+            passwordPolicy.setPwdExpireWarning( 600 );
+            passwordPolicy.setPwdGraceAuthNLimit( 5 );
             passwordPolicy.setPwdGraceExpire( 0 );
+            passwordPolicy.setPwdLockout( true );
+            passwordPolicy.setPwdLockoutDuration( 0 );
+            passwordPolicy.setPwdMaxFailure( 5 );
+            passwordPolicy.setPwdFailureCountInterval( 30 );
+            passwordPolicy.setPwdMustChange( false );
+            passwordPolicy.setPwdAllowUserChange( true );
             passwordPolicy.setPwdMinDelay( 0 );
             passwordPolicy.setPwdMaxDelay( 0 );
             passwordPolicy.setPwdMaxIdle( 0 );

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java?rev=1665421&r1=1665420&r2=1665421&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java
Tue Mar 10 09:17:01 2015
@@ -52,6 +52,58 @@ import org.eclipse.ui.forms.widgets.Tabl
 
 /**
  * This class represents the Details Page of the Server Configuration Editor for the Password
Policy type
+ * 
+ * <pre>
+ * .-------------------------------------------.
+ * | Password Policy Details                   |
+ * +-------------------------------------------+
+ * | Set the properties of the password Policy |
+ * |  [X] Enabled                              |
+ * |  ID :          [//////////]               |
+ * |  Description : [////////////////////////] |
+ * |  Attribute   : [////////////////////////] |
+ * .-------------------------------------------.
+ * | Quality                                   |
+ * +-------------------------------------------+
+ * | Check quality : [=======================] |
+ * | Validator :     [///////////////////////] |
+ * | [X] Enable Minimum Length                 |
+ * |   Number of chars : [NNN]                 |
+ * | [X] Enable Maximum Length                 |
+ * |   Number of chars : [NNN]                 |
+ * .-------------------------------------------.
+ * | Expiration                                |
+ * +-------------------------------------------+
+ * | Minimum age (seconds): [NNN]              |
+ * | Maximum age (seconds): [NNN]              |
+ * | [X] Enable Expire Warning                 |
+ * |   Number of seconds  : [NNN]              |
+ * | [X] Enable Grace Authentication Limit     |
+ * |   Number of times    : [NNN]              |
+ * | [X] Enable Grace Expire                   |
+ * |   Interval (seconds) : [NNN]              |
+ * .-------------------------------------------.
+ * | Options                                   |
+ * +-------------------------------------------+
+ * | [X] Enable Must Change                    |
+ * | [X] Enable Allow User Change              |
+ * | [X] Enable Safe Modify                    |
+ * .-------------------------------------------.
+ * | Lockout                                   |
+ * +-------------------------------------------+
+ * | [X] Enable Lockout                        |
+ * |   Lockout duration (seconds)   : [NNN]    |
+ * |   Maximum Consecutive Failures : [NNN]    |
+ * |   Failure Count Interval       : [NNN]    |
+ * | [X] Enable Maximum Idle                   |
+ * |   Intervals                    : [NNN]    |
+ * | [X] Enable In History                     |
+ * |   Used passwords stored in Hist: [NNN]    |
+ * | [X] Delay                                 |
+ * |   Minimum delay (seconds)      : [NNN]    |
+ * |   Maximum delay (seconds)      : [NNN]    |
+ * +-------------------------------------------+
+ * </pre>
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -95,6 +147,8 @@ public class PasswordPolicyDetailsPage i
     private Text inHistoryText;
     private Button maxIdleCheckbox;
     private Text maxIdleText;
+    private Text minimumDelayText;
+    private Text maximumDelayText;
 
     // Listeners
     /** The Text Modify Listener */
@@ -269,6 +323,9 @@ public class PasswordPolicyDetailsPage i
         layout.bottomMargin = 2;
         parent.setLayout( layout );
 
+        // Depending on if the PP is enabled or disabled, we will
+        // expose the configuration
+        
         createDetailsSection( toolkit, parent );
         createQualitySection( toolkit, parent );
         createExpirationSection( toolkit, parent );
@@ -297,6 +354,7 @@ public class PasswordPolicyDetailsPage i
         section.setLayoutData( td );
         Composite client = toolkit.createComposite( section );
         toolkit.paintBordersFor( client );
+        
         GridLayout glayout = new GridLayout( 2, false );
         client.setLayout( glayout );
         section.setClient( client );
@@ -522,6 +580,16 @@ public class PasswordPolicyDetailsPage i
             "Used passwords stored in history:" );
         inHistoryText = toolkit.createText( inHistoryRadioIndentComposite, "" );
         inHistoryText.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+        
+        // Minimum delay (pwdMinDelay)
+        toolkit.createLabel( composite, "Mimimum Delay (seconds):" );
+        minimumDelayText = toolkit.createText( composite, "" );
+        minimumDelayText.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false )
);
+
+        // Maximum Delay (pwdMaxDelay)
+        toolkit.createLabel( composite, "Maximum Delay (seconds):" );
+        maximumDelayText = toolkit.createText( composite, "" );
+        maximumDelayText.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false )
);
     }
 
 
@@ -600,6 +668,10 @@ public class PasswordPolicyDetailsPage i
         inHistoryCheckbox.addSelectionListener( inHistoryCheckboxSelectionListener );
         inHistoryText.addModifyListener( textModifyListener );
         inHistoryText.addVerifyListener( integerVerifyListener );
+        minimumDelayText.addModifyListener( textModifyListener );
+        minimumDelayText.addVerifyListener( integerVerifyListener );
+        maximumDelayText.addModifyListener( textModifyListener );
+        maximumDelayText.addVerifyListener( integerVerifyListener );
     }
 
 
@@ -656,6 +728,10 @@ public class PasswordPolicyDetailsPage i
         inHistoryCheckbox.removeSelectionListener( inHistoryCheckboxSelectionListener );
         inHistoryText.removeModifyListener( textModifyListener );
         inHistoryText.removeVerifyListener( integerVerifyListener );
+        minimumDelayText.removeModifyListener( textModifyListener );
+        minimumDelayText.removeVerifyListener( integerVerifyListener );
+        maximumDelayText.removeModifyListener( textModifyListener );
+        maximumDelayText.removeVerifyListener( integerVerifyListener );
     }
 
 
@@ -881,6 +957,26 @@ public class PasswordPolicyDetailsPage i
             {
                 passwordPolicy.setPwdInHistory( 0 );
             }
+
+            // Minimum Delay
+            try
+            {
+                passwordPolicy.setPwdMinDelay( Integer.parseInt( minimumDelayText.getText()
) );
+            }
+            catch ( NumberFormatException e )
+            {
+                passwordPolicy.setPwdMinDelay( 0 );
+            }
+
+            // Maximum Delay
+            try
+            {
+                passwordPolicy.setPwdMaxDelay( Integer.parseInt( maximumDelayText.getText()
) );
+            }
+            catch ( NumberFormatException e )
+            {
+                passwordPolicy.setPwdMaxDelay( 0 );
+            }
         }
     }
 
@@ -1051,6 +1147,12 @@ public class PasswordPolicyDetailsPage i
             inHistoryCheckbox.setSelection( inHistory != 0 );
             inHistoryText.setText( "" + inHistory );
             inHistoryText.setEnabled( inHistory != 0 );
+
+            // Minimum Delay
+            minimumDelayText.setText( "" + passwordPolicy.getPwdMinDelay() );
+
+            // Maximum Delay
+            maximumDelayText.setText( "" + passwordPolicy.getPwdMaxDelay() );
         }
 
         addListeners();



Mime
View raw message