You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2017/06/14 21:43:13 UTC

[2/3] ant-ivyde git commit: squash of the branch ivyDECredentials of https://github.com/alex-bl/ivyDEextension at commit bad3b84

squash of the branch ivyDECredentials of https://github.com/alex-bl/ivyDEextension at commit bad3b84


Project: http://git-wip-us.apache.org/repos/asf/ant-ivyde/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivyde/commit/86138a1b
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivyde/tree/86138a1b
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivyde/diff/86138a1b

Branch: refs/heads/ivyDECredentials
Commit: 86138a1b9d809d0ac642a9a41745baa51ab8cc2d
Parents: fefe9a8
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Wed Jun 14 23:20:25 2017 +0200
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Wed Jun 14 23:21:02 2017 +0200

----------------------------------------------------------------------
 README.md                                       |  35 +++
 org.apache.ivyde.eclipse/.classpath             |  18 --
 .../.settings/org.eclipse.jdt.core.prefs        |  25 +-
 org.apache.ivyde.eclipse/META-INF/MANIFEST.MF   |  11 +-
 org.apache.ivyde.eclipse/build.properties       |   4 +-
 org.apache.ivyde.eclipse/plugin.xml             |   7 +-
 .../apache/ivyde/eclipse/GUIfactoryHelper.java  |  83 +++++++
 .../ivyde/eclipse/IvyDEsecurityHelper.java      | 165 +++++++++++++
 .../apache/ivyde/eclipse/cp/SecuritySetup.java  | 183 ++++++++++++++
 .../ivyde/internal/eclipse/IvyPlugin.java       |  23 +-
 .../controller/SecuritySetupController.java     | 245 +++++++++++++++++++
 .../cpcontainer/SecuritySetupContainer.java     |  55 +++++
 .../eclipse/ui/SecuritySetupEditor.java         | 128 ++++++++++
 .../ui/components/CustomConfirmationDialog.java |  44 ++++
 .../ui/components/SecuritySetupDialog.java      | 225 +++++++++++++++++
 .../SecuritySetupPreferencePage.java            |  91 +++++++
 .../eclipse/validator/BaseValidator.java        |  58 +++++
 .../eclipse/validator/IValidationReaction.java  |  25 ++
 .../eclipse/validator/impl/HostValidator.java   |  42 ++++
 .../eclipse/validator/impl/IdValidator.java     |  80 ++++++
 .../validator/impl/PasswordValidator.java       |  36 +++
 .../eclipse/validator/impl/RealmValidator.java  |  43 ++++
 .../validator/impl/UserNameValidator.java       |  39 +++
 .../reaction/GeneralValidationReaction.java     |  58 +++++
 .../reaction/NopValidationReaction.java         |  34 +++
 org.apache.ivyde.feature/feature.xml            |   2 +-
 .../.settings/org.apache.ivyde.eclipse.prefs    |   2 +
 .../.settings/org.apache.ivyde.eclipse.prefs    |   2 +
 .../.settings/org.apache.ivyde.eclipse.prefs    |   2 +
 29 files changed, 1713 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ac02efb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,35 @@
+# ivyDEextension
+This project is an extension to the eclipse-plugin [Apache IvyDE 2.2.0.final-201311091524-RELEASE](https://ant.apache.org/ivy/ivyde/) from the [Apache Software Foundation](https://www.apache.org/). ***So please have a look at the original [README](/README.txt)-, [LICENSE](/LICENSE)- and [NOTICE](/NOTICE) files***.
+
+It is build on top of the latest ApacheIvyDE release (2.2.0.final) and extends its functionallity by providing the possibility to manage credentials - needed to retrieve artifacts from protected repositories - using the eclipse secure storage instead of setting them in plaintext within the ANT-buildscripts or ivySettings.
+
+## 1. Compatability
+This project tends to be compatible with the same versions as the source plugin is. Click [here](http://ant.apache.org/ivy/ivyde/history/trunk/compatibility.html) for further information. Compatabilities different to the ApacheIvyDE 2.2.0.final are listed below.
+
+#### 1.1 Eclipse
+The minimal required Eclipse version is Eclipse 4.2 (Juno).
+
+#### 1.2 JVM
+At least Java 1.6 is needed.
+
+## 2. Installation
+The installation procedure didn't change. Please click [here](http://ant.apache.org/ivy/ivyde/history/trunk/install.html) for further information.
+
+## 3. Features
+The Apache IvyDE-extension contains all the features of the 2.2.0.final version. In addition an additional preference page is provided (`Window > Preferences > Ivy > Security`) where a user can manage its ivy credentials inside the eclipse secure storage. This credentials are exported to the internal ivy-credential store and retrieved from there in case of a resolve/retrieve.
+
+**NOTE:** The ivy-credentials stored this way are copied from the eclipse secure storage to the ivy credential store at the plugin startup or after they are inserted/updated/deleted. If somewhere credentials are provided the "usual" way (e.g. inside the ivySettings.xml, via ANT-Configuration), the credentials stored inside the eclipse secure storage may are overwritten. This occurs if credentials have the same host and realm (host@realm is used by ivy as identifier). To avoid such undesired behaviour please make sure that all your credentials are unique.
+
+## 4. Usage
+The usage of the Apache IvyDE-extension plugin remains the same. The only difference is the new preference page as described in ***3. Features***. The security preference page should be self-explaining.
+
+## 5. Ivy issues
+During the development the following issues with the used ivy-library were detected:
+
+***1. Meaningless errors:*** If an ivy-resolve/retrieve fails because of not beeing authorized, the default console output is `BUILD FAILED: Artifact not found`. To discover the real error a developer has to dig deep inside the debug log.
+
+***2. Final:*** Once credentials are stored inside the ivy-credential store, they are unchangable (final). Making them `final` makes it impossible to change them during runtime (e.g. to hook a credential-popup before the credentials are sent to the server).
+
+***3. (Unpredictable) cache behaviour:*** If a resolve/retrieve fails because of invalid credentials, the credentials are reloaded on the next try. If one resolve/retrieve is successfull, the credentials are stored somewhere and changes on credentials inside the eclipse secure storage or the ivySettings/ANT-Configuration are completely ignored on subsequent resolves/retrieves, even the credentials are wrong. If Eclipse is restarted, the credentials are reloaded.
+
+***4. Inflexible ivy-credential store:*** The ivy-credential store just offers a method to add credentials (to a hash-map) but no operation to remove them. In case of a removal, the add method has to be "abused" to invalidate the non-deletable credentials on the ivy-credential storage. To fully remove not needed credentials, Eclipse has to be restarted.

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/.classpath
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/.classpath b/org.apache.ivyde.eclipse/.classpath
index 85c53c9..16c3e8e 100644
--- a/org.apache.ivyde.eclipse/.classpath
+++ b/org.apache.ivyde.eclipse/.classpath
@@ -1,22 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.    
--->
 <classpath>
 	<classpathentry kind="src" path="src/java"/>
 	<classpathentry kind="src" path="test/java"/>

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/.settings/org.eclipse.jdt.core.prefs
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/.settings/org.eclipse.jdt.core.prefs b/org.apache.ivyde.eclipse/.settings/org.eclipse.jdt.core.prefs
index ac46b41..3eff64b 100644
--- a/org.apache.ivyde.eclipse/.settings/org.eclipse.jdt.core.prefs
+++ b/org.apache.ivyde.eclipse/.settings/org.eclipse.jdt.core.prefs
@@ -1,21 +1,3 @@
-#        ***************************************************************
-#        * Licensed to the Apache Software Foundation (ASF) under one
-#        * or more contributor license agreements.  See the NOTICE file
-#        * distributed with this work for additional information
-#        * regarding copyright ownership.  The ASF licenses this file
-#        * to you under the Apache License, Version 2.0 (the
-#        * "License"); you may not use this file except in compliance
-#        * with the License.  You may obtain a copy of the License at
-#        *
-#        *   http://www.apache.org/licenses/LICENSE-2.0
-#        *
-#        * Unless required by applicable law or agreed to in writing,
-#        * software distributed under the License is distributed on an
-#        * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#        * KIND, either express or implied.  See the License for the
-#        * specific language governing permissions and limitations
-#        * under the License.
-#        ***************************************************************
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
@@ -95,7 +77,12 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/META-INF/MANIFEST.MF b/org.apache.ivyde.eclipse/META-INF/MANIFEST.MF
index f354d8e..94b6ae8 100644
--- a/org.apache.ivyde.eclipse/META-INF/MANIFEST.MF
+++ b/org.apache.ivyde.eclipse/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Apache IvyDE
-Bundle-SymbolicName: org.apache.ivyde.eclipse; singleton:=true
-Bundle-Version: 2.3.0.qualifier
+Bundle-SymbolicName: org.apache.ivyde.eclipse;singleton:=true
+Bundle-Version: 2.3.1.qualifier
 Bundle-ClassPath: ivyde-eclipse.jar
 Bundle-Activator: org.apache.ivyde.internal.eclipse.IvyPlugin
 Bundle-Vendor: Apache Software Foundation
@@ -33,6 +33,11 @@ Require-Bundle: org.apache.xerces;bundle-version="[2.9.0,3.0.0)";resolution:=opt
  org.eclipse.debug.core;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.jdt.launching;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.debug.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)"
+ org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.equinox.security;bundle-version="[1.1.100,2.0.0)",
+ org.eclipse.core.databinding;bundle-version="[1.4.1,2.0.0)",
+ org.eclipse.core.databinding.property;bundle-version="[1.4.100,2.0.0)",
+ org.eclipse.core.databinding.beans;bundle-version="[1.2.200,2.0.0)",
+ org.eclipse.jface.databinding;bundle-version="[1.6.0,2.0.0)"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/build.properties
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/build.properties b/org.apache.ivyde.eclipse/build.properties
index bf2f878..0cf07a1 100644
--- a/org.apache.ivyde.eclipse/build.properties
+++ b/org.apache.ivyde.eclipse/build.properties
@@ -33,8 +33,8 @@ debug.mode=on
 deprecation.mode=on
 test.fork=on
 test.haltonfailure=off
-javacSource = 1.4
-javacTarget = 1.4
+javacSource = 1.6
+javacTarget = 1.6
 jars.compile.order = ivyde-eclipse.jar
 src.includes = plugin.xml,\
                src/,\

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/plugin.xml
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/plugin.xml b/org.apache.ivyde.eclipse/plugin.xml
index 0c08d7e..99903b1 100644
--- a/org.apache.ivyde.eclipse/plugin.xml
+++ b/org.apache.ivyde.eclipse/plugin.xml
@@ -144,6 +144,12 @@
             id="org.apache.ivyde.eclipse.ui.preferences.AdvancedSetupPreferencePage"
             name="Advanced">
       </page>
+      <page
+            category="org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage"
+            class="org.apache.ivyde.internal.eclipse.ui.preferences.SecuritySetupPreferencePage"
+            id="org.apache.ivyde.eclipse.ui.preferences.SecuritySetupPreferencePage"
+            name="Security">
+      </page>
    </extension>
    <extension
          point="org.eclipse.core.runtime.preferences">
@@ -506,5 +512,4 @@
          </describer>
       </content-type>
    </extension>
-
 </plugin>

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/GUIfactoryHelper.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/GUIfactoryHelper.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/GUIfactoryHelper.java
new file mode 100644
index 0000000..69cafd6
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/GUIfactoryHelper.java
@@ -0,0 +1,83 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse;
+
+import org.apache.ivyde.eclipse.cp.SecuritySetup;
+import org.apache.ivyde.internal.eclipse.ui.components.CustomConfirmationDialog;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+public final class GUIfactoryHelper {
+
+    private static final String SECRET = "******";
+    private GUIfactoryHelper() {
+
+    }
+    
+    public static ColumnLabelProvider buildHostLabelProvider() {
+        return new ColumnLabelProvider() {
+            @Override
+            public String getText(Object element) {
+                return ((SecuritySetup) element).getHost();
+            }
+        };
+    }
+
+    public static ColumnLabelProvider buildRealmLabelProvider() {
+        return new ColumnLabelProvider() {
+            @Override
+            public String getText(Object element) {
+                return ((SecuritySetup) element).getRealm();
+            }
+        };
+    }
+
+    public static ColumnLabelProvider buildUsernameLabelProvider() {
+        return new ColumnLabelProvider() {
+            @Override
+            public String getText(Object element) {
+                return ((SecuritySetup) element).getUserName();
+            }
+        };
+    }
+
+    public static ColumnLabelProvider buildPwdLabelProvider() {
+        return new ColumnLabelProvider() {
+            @Override
+            public String getText(Object element) {
+                return SECRET;
+            }
+        };
+    }
+
+    public static TableViewerColumn buildTableColumn(TableViewer viewer, int width, String header,
+            ColumnLabelProvider provider) {
+        TableViewerColumn col = new TableViewerColumn(viewer, SWT.NONE);
+        col.getColumn().setWidth(width);
+        col.getColumn().setText(header);
+        col.setLabelProvider(provider);
+        return col;
+    }
+    
+    public static CustomConfirmationDialog buildConfirmationDialog(Shell parentShell, String dialogTitle, String dialogMessage){
+        return new CustomConfirmationDialog(parentShell, dialogTitle, dialogMessage);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEsecurityHelper.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEsecurityHelper.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEsecurityHelper.java
new file mode 100644
index 0000000..8d6f47f
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEsecurityHelper.java
@@ -0,0 +1,165 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.ivy.util.url.CredentialsStore;
+import org.apache.ivyde.eclipse.cp.SecuritySetup;
+import org.apache.ivyde.internal.eclipse.IvyPlugin;
+import org.eclipse.equinox.security.storage.ISecurePreferences;
+import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
+import org.eclipse.equinox.security.storage.StorageException;
+
+public final class IvyDEsecurityHelper {
+
+    private static final String IVY_DE_CREDENTIALS_BASE_NODE = "org.apache.ivyde.credentials";
+
+    private static final String HOST_KEY = "host";
+
+    private static final String REALM_KEY = "realm";
+
+    private static final String USERNAME_KEY = "username";
+
+    private static final String PASSWORD_KEY = "pwd";
+
+    private IvyDEsecurityHelper() {
+
+    }
+
+    public static void addCredentialsToIvyCredentialStorage(SecuritySetup setup) {
+        CredentialsStore.INSTANCE.addCredentials(setup.getRealm(), setup.getHost(),
+            setup.getUserName(), setup.getPwd());
+        IvyPlugin.logInfo("Credentials " + setup.toString() + " added to ivyDE credential store");
+    }
+
+    public static void cpyCredentialsFromSecureToIvyStorage() {
+        List<SecuritySetup> credentials = getCredentialsFromSecureStore();
+        for (SecuritySetup entry : credentials) {
+            addCredentialsToIvyCredentialStorage(entry);
+            IvyPlugin.logInfo("Credentials " + entry.toString()
+                    + " from eclipse secure storage copied to ivyDE credential store");
+        }
+    }
+
+    public static void addCredentialsToSecureStorage(SecuritySetup setup) {
+        ISecurePreferences preferences = SecurePreferencesFactory.getDefault();
+        ISecurePreferences baseNode = preferences.node(IVY_DE_CREDENTIALS_BASE_NODE);
+        ISecurePreferences childNode = baseNode.node(setup.getHost());
+        ISecurePreferences childChildNode = childNode.node(setup.getRealm());
+
+        try {
+            childChildNode.put(HOST_KEY, setup.getHost(), false);
+            childChildNode.put(REALM_KEY, setup.getRealm(), false);
+            childChildNode.put(USERNAME_KEY, setup.getUserName(), true);
+            childChildNode.put(PASSWORD_KEY, setup.getPwd(), true);
+            childChildNode.flush();
+            IvyPlugin.logInfo("Credentials " + setup.toString()
+                    + " added to eclipse secure storage");
+        } catch (StorageException e1) {
+            IvyPlugin.logError(e1.getMessage(), e1);
+        } catch (IOException e) {
+            IvyPlugin.logError(e.getMessage(), e);
+        }
+    }
+
+    public static List<SecuritySetup> getCredentialsFromSecureStore() {
+        ISecurePreferences preferences = SecurePreferencesFactory.getDefault();
+        List<SecuritySetup> setupValues = new ArrayList<SecuritySetup>();
+        if (preferences.nodeExists(IVY_DE_CREDENTIALS_BASE_NODE)) {
+            ISecurePreferences node = preferences.node(IVY_DE_CREDENTIALS_BASE_NODE);
+            String[] childNames = node.childrenNames();
+            for (String childName : childNames) {
+                ISecurePreferences childNode = node.node(childName);
+                String[] childChildNames = childNode.childrenNames();
+                for (String childChildName : childChildNames) {
+                    ISecurePreferences childChildNode = childNode.node(childChildName);
+                    try {
+                        SecuritySetup toAdd = new SecuritySetup(
+                            childChildNode.get(HOST_KEY, "localhost"), childChildNode.get(
+                                REALM_KEY, "basic"), childChildNode.get(USERNAME_KEY, null),
+                            childChildNode.get(PASSWORD_KEY, null));
+                        setupValues.add(toAdd);
+                        IvyPlugin.logInfo("Credentials " + toAdd.toString() + " loaded from eclipse secure storage");
+                    } catch (StorageException e1) {
+                        IvyPlugin.logError(e1.getMessage(), e1);
+                    }
+                }
+            }
+        }
+        Collections.sort(setupValues);
+        return setupValues;
+    }
+
+    public static void removeCredentials(SecuritySetup setup) {
+        removeCredentialsFromSecureStore(setup);
+        invalidateIvyCredentials(setup);
+    }
+
+    public static boolean hostExistsInSecureStorage(String host, String realm) {
+        ISecurePreferences preferences = SecurePreferencesFactory.getDefault();
+        if (preferences.nodeExists(IVY_DE_CREDENTIALS_BASE_NODE)) {
+            ISecurePreferences node = preferences.node(IVY_DE_CREDENTIALS_BASE_NODE);
+            if (node.nodeExists(host)) {
+                ISecurePreferences childNode = node.node(host);
+                if (childNode.nodeExists(realm)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private static void removeCredentialsFromSecureStore(SecuritySetup setup) {
+        String host = setup.getHost();
+        String realm = setup.getRealm();
+        ISecurePreferences preferences = SecurePreferencesFactory.getDefault();
+        if (preferences.nodeExists(IVY_DE_CREDENTIALS_BASE_NODE)) {
+            ISecurePreferences node = preferences.node(IVY_DE_CREDENTIALS_BASE_NODE);
+            if (node.nodeExists(host)) {
+                ISecurePreferences childNode = node.node(host);
+                if (childNode.nodeExists(realm)) {
+                    childNode.node(realm).removeNode();
+                    try {
+                        node.flush();
+                        IvyPlugin.logInfo("Credentials " + setup.toString()
+                                + "' removed from eclipse secure storage");
+                    } catch (IOException e) {
+                        // TODO Auto-generated catch block
+                        IvyPlugin.logError(e.getMessage(), e);
+                    }
+                }
+            }
+        }
+    }
+
+    private static void invalidateIvyCredentials(SecuritySetup setup) {
+        // need to invalidate => on credentialStore just add-ops allowed
+        CredentialsStore.INSTANCE.addCredentials(setup.getHost(), setup.getRealm(), null, null);
+        IvyPlugin.logInfo("Credentials " + setup
+                + " invalidated on ivyDE credential store: Removed on next eclipse startup.");
+    }
+
+    public static boolean credentialsInSecureStorage() {
+        return SecurePreferencesFactory.getDefault().nodeExists(IVY_DE_CREDENTIALS_BASE_NODE);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SecuritySetup.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SecuritySetup.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SecuritySetup.java
new file mode 100644
index 0000000..66d165a
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cp/SecuritySetup.java
@@ -0,0 +1,183 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse.cp;
+
+public class SecuritySetup implements Comparable<SecuritySetup> {
+
+    private String id = "";
+
+    private String host = "";
+
+    private String realm = "";
+
+    private String userName = "";
+
+    private String pwd = "";
+
+    public SecuritySetup() {
+
+    }
+
+    /**
+     * @param host
+     * @param realm
+     * @param userName
+     * @param pwd
+     */
+    public SecuritySetup(String host, String realm, String userName, String pwd) {
+        this.id=host+"@"+realm;
+        this.host = host;
+        this.realm = realm;
+        this.userName = userName;
+        this.pwd = pwd;
+    }
+
+    public void setAllValues(SecuritySetup toSet){
+        this.id=toSet.getHost()+"@"+toSet.getRealm();
+        this.host = toSet.getHost();
+        this.realm = toSet.getRealm();
+        this.userName = toSet.getUserName();
+        this.pwd = toSet.getPwd(); 
+    }
+    
+    /**
+     * @return the id
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     *            the id to set
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the host
+     */
+    public String getHost() {
+        return host;
+    }
+
+    /**
+     * @param host
+     *            the host to set
+     */
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    /**
+     * @return the realm
+     */
+    public String getRealm() {
+        return realm;
+    }
+
+    /**
+     * @param realm
+     *            the realm to set
+     */
+    public void setRealm(String realm) {
+        this.realm = realm;
+    }
+
+    /**
+     * @return the userName
+     */
+    public String getUserName() {
+        return userName;
+    }
+
+    /**
+     * @param userName
+     *            the userName to set
+     */
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    /**
+     * @return the pwd
+     */
+    public String getPwd() {
+        return pwd;
+    }
+
+    /**
+     * @param pwd
+     *            the pwd to set
+     */
+    public void setPwd(String pwd) {
+        this.pwd = pwd;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((host == null) ? 0 : host.hashCode());
+        result = prime * result + ((realm == null) ? 0 : realm.hashCode());
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        SecuritySetup other = (SecuritySetup) obj;
+        if (host == null) {
+            if (other.host != null)
+                return false;
+        } else if (!host.equals(other.host))
+            return false;
+        if (realm == null) {
+            if (other.realm != null)
+                return false;
+        } else if (!realm.equals(other.realm))
+            return false;
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "[storageId: '" + this.host + "@" + this.realm + "', host='" + this.host + "', realm='"
+                + this.realm + "', user='" + this.userName + "', password='******']";
+    }
+
+    public int compareTo(SecuritySetup o) {
+        return this.host.compareTo(o.getHost());
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java
index 9ef70d7..2919e6d 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java
@@ -29,6 +29,7 @@ import java.util.regex.Pattern;
 
 import org.apache.ivy.Ivy;
 import org.apache.ivyde.common.ivyfile.IvyFileResourceListener;
+import org.apache.ivyde.eclipse.IvyDEsecurityHelper;
 import org.apache.ivyde.eclipse.cp.IvyClasspathContainer;
 import org.apache.ivyde.eclipse.cp.IvyClasspathContainerHelper;
 import org.apache.ivyde.internal.eclipse.cpcontainer.IvyAttachementManager;
@@ -136,6 +137,13 @@ public class IvyPlugin extends AbstractUIPlugin {
         this.bundleContext = context;
         logInfo("starting IvyDE plugin");
 
+        if (IvyDEsecurityHelper.credentialsInSecureStorage()) {
+            IvyDEsecurityHelper.cpyCredentialsFromSecureToIvyStorage();
+            logInfo("Credentials loaded from secure storage");            
+        }else{
+            logInfo("No credentials stored in secure storage");
+        }
+
         Matcher matcher = IVY_VERSION_PATTERN.matcher(Ivy.getIvyVersion());
         if (matcher.matches()) {
             ivyVersionMajor = Integer.parseInt(matcher.group(1));
@@ -166,8 +174,8 @@ public class IvyPlugin extends AbstractUIPlugin {
                         prefStoreChanged();
                     }
                 } catch (JavaModelException e) {
-                    MessageDialog.openError(IvyPlugin.getDefault().getWorkbench()
-                            .getActiveWorkbenchWindow().getShell(),
+                    MessageDialog.openError(
+                        IvyPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(),
                         "Unable to trigger the update the IvyDE classpath containers",
                         e.getMessage());
                 }
@@ -198,8 +206,8 @@ public class IvyPlugin extends AbstractUIPlugin {
         ivyMarkerManager = new IvyMarkerManager();
 
         File stateLocation = getStateLocation().toFile();
-        ivyAttachementManager = new IvyAttachementManager(new File(stateLocation,
-                "attachements.properties"));
+        ivyAttachementManager = new IvyAttachementManager(
+                new File(stateLocation, "attachements.properties"));
         File containersStateDir = new File(stateLocation, "cpstates");
         if (!containersStateDir.exists()) {
             containersStateDir.mkdirs();
@@ -211,8 +219,8 @@ public class IvyPlugin extends AbstractUIPlugin {
             Class.forName("org.apache.ivy.osgi.core.ManifestParser");
             osgiAvailable = true;
             try {
-                Class.forName("org.apache.ivy.osgi.core.BundleInfo").getDeclaredMethod(
-                    "getClasspath");
+                Class.forName("org.apache.ivy.osgi.core.BundleInfo")
+                        .getDeclaredMethod("getClasspath", new Class[]{});
                 osgiClasspathAvailable = true;
             } catch (Exception e) {
                 osgiClasspathAvailable = false;
@@ -221,7 +229,6 @@ public class IvyPlugin extends AbstractUIPlugin {
             osgiAvailable = false;
             osgiClasspathAvailable = false;
         }
-
         logInfo("IvyDE plugin started");
     }
 
@@ -405,7 +412,7 @@ public class IvyPlugin extends AbstractUIPlugin {
      * @return the adapted object
      */
 
-    public static/* <T> T */Object adapt(Object object, Class/* <T> */type) {
+    public static/* <T> T */Object adapt(Object object, Class/* <T> */ type) {
         if (type.isInstance(object)) {
             return /* (T) */object;
         } else if (object instanceof IAdaptable) {

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/controller/SecuritySetupController.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/controller/SecuritySetupController.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/controller/SecuritySetupController.java
new file mode 100644
index 0000000..6ea12b2
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/controller/SecuritySetupController.java
@@ -0,0 +1,245 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.controller;
+
+import org.apache.ivyde.eclipse.GUIfactoryHelper;
+import org.apache.ivyde.eclipse.IvyDEsecurityHelper;
+import org.apache.ivyde.eclipse.cp.SecuritySetup;
+import org.apache.ivyde.internal.eclipse.ui.SecuritySetupEditor;
+import org.apache.ivyde.internal.eclipse.ui.components.SecuritySetupDialog;
+import org.apache.ivyde.internal.eclipse.validator.BaseValidator;
+import org.apache.ivyde.internal.eclipse.validator.IValidationReaction;
+import org.apache.ivyde.internal.eclipse.validator.impl.HostValidator;
+import org.apache.ivyde.internal.eclipse.validator.impl.IdValidator;
+import org.apache.ivyde.internal.eclipse.validator.impl.PasswordValidator;
+import org.apache.ivyde.internal.eclipse.validator.impl.RealmValidator;
+import org.apache.ivyde.internal.eclipse.validator.impl.UserNameValidator;
+import org.apache.ivyde.internal.eclipse.validator.reaction.GeneralValidationReaction;
+import org.apache.ivyde.internal.eclipse.validator.reaction.NopValidationReaction;
+import org.eclipse.core.databinding.AggregateValidationStatus;
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.UpdateValueStrategy;
+import org.eclipse.core.databinding.ValidationStatusProvider;
+import org.eclipse.core.databinding.beans.PojoProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Widget;
+
+public class SecuritySetupController {
+
+    private SecuritySetupEditor setupEditorGUI;
+
+    private SecuritySetupDialog addDialog;
+
+    private MessageDialog confirmationDialog;
+
+    private SecuritySetup currentSelection = new SecuritySetup();
+    private SecuritySetup currentSelectionOldVal = new SecuritySetup();
+    
+    private String selectionHost;
+
+    private String selectionRealm;
+
+    private String selectionUserName;
+
+    private boolean addOperation = true;
+
+    private DataBindingContext ctx = new DataBindingContext();
+
+    /**
+     * @param setupEditorGUI
+     * @param addDialog
+     */
+    public SecuritySetupController(SecuritySetupEditor setupEditorGUI) {
+        this.setupEditorGUI = setupEditorGUI;
+        addDialog = new SecuritySetupDialog(setupEditorGUI.getShell());
+    }
+
+    public void addHandlers() {
+        setupEditorGUI.getAddBtn().addSelectionListener(this.createAddBtnSelectionAdapter());
+        setupEditorGUI.getEditBtn().addSelectionListener(this.createEditBtnSelectionAdapter());
+        setupEditorGUI.getDeleteBtn().addSelectionListener(this.createDelBtnSelectionAdapter());
+        setupEditorGUI.getTableViewer().addSelectionChangedListener(
+            this.createSelectionChangedListener());
+    }
+
+    private SelectionListener createAddBtnSelectionAdapter() {
+        return new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                addOperation = true;
+                currentSelection = new SecuritySetup();
+                addDialog.create();
+                initDialog();
+                if (addDialog.open() == Window.OK) {
+                    IvyDEsecurityHelper.addCredentialsToSecureStorage(currentSelection);
+                    IvyDEsecurityHelper.addCredentialsToIvyCredentialStorage(currentSelection);
+                    // TODO: using init to reload directly from secure storage or use an
+                    // intermediate-container?
+                    setupEditorGUI.init(IvyDEsecurityHelper.getCredentialsFromSecureStore());
+                } else {
+                    // TODO: do something?
+                }
+                addDialog.close();
+            }
+        };
+    }
+
+    private SelectionListener createEditBtnSelectionAdapter() {
+        return new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                addOperation = false;
+                addDialog.create();
+                initDialog();
+                // initDialog(currentSelection);
+                if (addDialog.open() == Window.OK) {
+                    IvyDEsecurityHelper.removeCredentials(new SecuritySetup(selectionHost,
+                            selectionRealm, selectionUserName, ""));
+                    IvyDEsecurityHelper.addCredentialsToSecureStorage(currentSelection);
+                    IvyDEsecurityHelper.addCredentialsToIvyCredentialStorage(currentSelection);
+                    // TODO: using init to reload directly from secure storage or use an
+                    // intermediate-container?
+                    setupEditorGUI.init(IvyDEsecurityHelper.getCredentialsFromSecureStore());
+                    setupEditorGUI.getEditBtn().setEnabled(false);
+                    setupEditorGUI.getDeleteBtn().setEnabled(false);
+                } else {
+                    currentSelection.setAllValues(currentSelectionOldVal);
+                }
+                addDialog.close();
+            }
+        };
+    }
+
+    private SelectionListener createDelBtnSelectionAdapter() {
+        return new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                confirmationDialog = GUIfactoryHelper.buildConfirmationDialog(
+                    setupEditorGUI.getShell(), "Confirmation",
+                    "Remove selected credentials from secure storage?");
+                if (confirmationDialog.open() == Window.OK) {
+                    currentSelection.setHost(selectionHost);
+                    currentSelection.setRealm(selectionRealm);
+                    IvyDEsecurityHelper.removeCredentials(new SecuritySetup(selectionHost,
+                            selectionRealm, selectionUserName, ""));
+                    setupEditorGUI.init(IvyDEsecurityHelper.getCredentialsFromSecureStore());
+                    setupEditorGUI.getEditBtn().setEnabled(false);
+                    setupEditorGUI.getDeleteBtn().setEnabled(false);
+                }
+                confirmationDialog.close();
+            }
+        };
+    }
+
+    private ISelectionChangedListener createSelectionChangedListener() {
+        return new ISelectionChangedListener() {
+            @Override
+            public void selectionChanged(final SelectionChangedEvent event) {
+                IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+                currentSelection = (SecuritySetup) selection.getFirstElement();
+                setupEditorGUI.getEditBtn().setEnabled(true);
+                setupEditorGUI.getDeleteBtn().setEnabled(true);
+                if (currentSelection != null) {
+                    selectionHost = currentSelection.getHost();
+                    selectionRealm = currentSelection.getRealm();
+                    selectionUserName = currentSelection.getUserName();
+                    currentSelectionOldVal = new SecuritySetup(selectionHost, selectionRealm,
+                            selectionUserName, currentSelection.getPwd());
+                } else {
+                    currentSelection = new SecuritySetup();
+                }
+            }
+        };
+    }
+
+    private void createHostDataBinder(String selectedHost, String selectedRealm,
+            boolean isAddOperation) {
+        IValidationReaction generalValidationReaction = new GeneralValidationReaction(
+                this.addDialog.getOkButton(), this.addDialog.getErrorLabel(),
+                this.addDialog.getErrorIcon());
+        IValidationReaction nopValidationReaction = new NopValidationReaction();
+
+        BaseValidator hostValidator = new HostValidator(generalValidationReaction);
+        BaseValidator realmValidator = new RealmValidator(generalValidationReaction);
+        BaseValidator idValidator = new IdValidator(generalValidationReaction, isAddOperation,
+                selectedHost, selectedRealm);
+        BaseValidator userNameValidator = new UserNameValidator(nopValidationReaction);
+        BaseValidator passwordValidator = new PasswordValidator(nopValidationReaction);
+
+        this.addDataBinder(this.addDialog.getIdText(), idValidator, SecuritySetup.class, "id",
+            this.currentSelection, true);
+        this.addDataBinder(this.addDialog.getHostText(), hostValidator, SecuritySetup.class,
+            "host", this.currentSelection, true);
+        this.addDataBinder(this.addDialog.getRealmText(), realmValidator, SecuritySetup.class,
+            "realm", this.currentSelection, true);
+        this.addDataBinder(this.addDialog.getUserNameText(), userNameValidator,
+            SecuritySetup.class, "userName", this.currentSelection, true);
+        this.addDataBinder(this.addDialog.getPwdText(), passwordValidator, SecuritySetup.class,
+            "pwd", this.currentSelection, true);
+    }
+
+    private void addDataBinder(Widget toObserve, IValidator validator, Class<?> observableClass,
+            String propertyName, Object observedProperty, boolean textDecorationEnabled) {
+        IObservableValue textObservable = WidgetProperties.text(SWT.Modify).observe(toObserve);
+        UpdateValueStrategy strategy = new UpdateValueStrategy();
+        strategy.setBeforeSetValidator(validator);
+
+        ValidationStatusProvider binding = this.ctx.bindValue(textObservable,
+            PojoProperties.value(observableClass, propertyName).observe(observedProperty),
+            strategy, null);
+        if (textDecorationEnabled) {
+            ControlDecorationSupport.create(binding, SWT.LEFT);
+        }
+        final IObservableValue errorObservable = WidgetProperties.text().observe(
+            this.addDialog.getErrorLabel());
+
+        ctx.bindValue(errorObservable, new AggregateValidationStatus(ctx.getBindings(),
+                AggregateValidationStatus.MAX_SEVERITY), null, null);
+
+    }
+
+    private void initDialog() {
+        this.createHostDataBinder(this.selectionHost, this.selectionRealm, this.addOperation);
+
+        addDialog.getHostText().addModifyListener(createModifyListener());
+        addDialog.getRealmText().addModifyListener(createModifyListener());
+    }
+
+    private ModifyListener createModifyListener() {
+        return new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                addDialog.getIdText().setText(
+                    addDialog.getHostText().getText() + "@" + addDialog.getRealmText().getText());
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/SecuritySetupContainer.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/SecuritySetupContainer.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/SecuritySetupContainer.java
new file mode 100644
index 0000000..3ee3aac
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/SecuritySetupContainer.java
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.cpcontainer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ivyde.eclipse.cp.SecuritySetup;
+@Deprecated
+//TODO: really needed?
+public final class SecuritySetupContainer {
+
+    public static final SecuritySetupContainer INSTANCE = new SecuritySetupContainer();
+
+    private static List<SecuritySetup> credentials = new ArrayList<SecuritySetup>();
+
+    private SecuritySetupContainer() {
+
+    }
+    
+    //test-data
+    static{
+        credentials = new ArrayList<SecuritySetup>();
+        credentials.add(new SecuritySetup("localhost","nexus","admin","secret"));
+        credentials.add(new SecuritySetup("arctis","nexus3","adminArctis","secret"));
+        credentials.add(new SecuritySetup("remote","nexus repo","adminRemote","secret"));        
+    }
+    
+    public static void addEntry(SecuritySetup entry) {
+        credentials.add(entry);
+    }
+
+    public static void removeEntry(SecuritySetup entry) {
+        credentials.remove(entry);
+    }
+
+    public static List<SecuritySetup> getAllCredentials() {
+        return credentials;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/SecuritySetupEditor.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/SecuritySetupEditor.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/SecuritySetupEditor.java
new file mode 100644
index 0000000..c32b3c7
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/SecuritySetupEditor.java
@@ -0,0 +1,128 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.ui;
+
+import java.util.List;
+
+import org.apache.ivyde.eclipse.GUIfactoryHelper;
+import org.apache.ivyde.eclipse.cp.SecuritySetup;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Table;
+
+public class SecuritySetupEditor extends Composite {
+    
+    private TableViewer tableViewer;
+    private Group credentialsGroup;
+    private Button addBtn;
+    private Button editBtn;
+    private Button deleteBtn;
+    private Table table;
+    
+    public SecuritySetupEditor(Composite parent, int style) {
+        super(parent, style);
+        setLayout(new GridLayout());
+                
+        credentialsGroup = new Group(this, style);
+        credentialsGroup.setText("Credentials");
+        credentialsGroup.setLayout(new GridLayout(2, false));
+        credentialsGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false,1,1));
+
+        tableViewer = new TableViewer(credentialsGroup,
+                SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
+
+        GUIfactoryHelper.buildTableColumn(tableViewer, 100, "Host", GUIfactoryHelper.buildHostLabelProvider());
+        GUIfactoryHelper.buildTableColumn(tableViewer, 175, "Realm", GUIfactoryHelper.buildRealmLabelProvider());
+        GUIfactoryHelper.buildTableColumn(tableViewer, 100, "Username", GUIfactoryHelper.buildUsernameLabelProvider());
+        GUIfactoryHelper.buildTableColumn(tableViewer, 100, "Pwd", GUIfactoryHelper.buildPwdLabelProvider());
+                
+        // make lines and header visible
+        table = tableViewer.getTable();
+        table.setParent(credentialsGroup);
+        table.setHeaderVisible(true);
+        table.setLinesVisible(true);
+
+        GridData tableGD = new GridData(GridData.FILL, GridData.FILL, true, false,1,3);
+        tableGD.heightHint=200;
+        table.setLayoutData(tableGD);
+        
+        addBtn = new Button(credentialsGroup, SWT.PUSH);
+        addBtn.setText("Add...");
+        addBtn.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false,1,1));
+        
+        editBtn = new Button(credentialsGroup, SWT.PUSH);
+        editBtn.setText("Edit...");
+        editBtn.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false,1,1));
+        editBtn.setEnabled(false);
+        
+        deleteBtn = new Button(credentialsGroup, SWT.PUSH);
+        deleteBtn.setText("Remove");                
+        deleteBtn.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false,1,1));        
+        deleteBtn.setEnabled(false);
+    }
+
+    public void init(List<SecuritySetup> setup) {
+       this.tableViewer.setContentProvider(ArrayContentProvider.getInstance());
+       this.tableViewer.setInput(setup);
+    }
+
+    public void setEnabled(boolean enabled) {       
+        super.setEnabled(enabled);
+        credentialsGroup.setEnabled(enabled);
+        addBtn.setEnabled(enabled);
+        editBtn.setEnabled(enabled);
+        deleteBtn.setEnabled(enabled);
+        table.setEnabled(enabled);        
+    }
+
+    /**
+     * @return the addBtn
+     */
+    public Button getAddBtn() {
+        return addBtn;
+    }
+
+    /**
+     * @return the editBtn
+     */
+    public Button getEditBtn() {
+        return editBtn;
+    }
+
+    /**
+     * @return the deleteBtn
+     */
+    public Button getDeleteBtn() {
+        return deleteBtn;
+    }
+
+    /**
+     * @return the tableViewer
+     */
+    public TableViewer getTableViewer() {
+        return tableViewer;
+    }
+    
+    
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/CustomConfirmationDialog.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/CustomConfirmationDialog.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/CustomConfirmationDialog.java
new file mode 100644
index 0000000..108cc6a
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/CustomConfirmationDialog.java
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.ui.components;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Shell;
+
+public class CustomConfirmationDialog extends MessageDialog{
+
+    public CustomConfirmationDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage,
+            String dialogMessage, int dialogImageType, int defaultIndex,
+            String[] dialogButtonLabels) {
+        super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels,
+                defaultIndex);
+    }
+    
+    public CustomConfirmationDialog(Shell parentShell, String dialogTitle, String dialogMessage){
+        super(parentShell, dialogTitle, null,
+            dialogMessage, MessageDialog.CONFIRM, new String[] { "Ok",
+                "Cancel"}, 0);
+    }
+    
+    @Override
+    public Point getInitialSize(){
+        return new Point(400, 150);        
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/SecuritySetupDialog.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/SecuritySetupDialog.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/SecuritySetupDialog.java
new file mode 100644
index 0000000..50c4d4e
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/SecuritySetupDialog.java
@@ -0,0 +1,225 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.ui.components;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class SecuritySetupDialog extends Dialog {
+
+    public static final String TOOLTIP_HOST = "The host";
+
+    public static final String TOOLTIP_REALM = "The realm for authentication";
+
+    public static final String TOOLTIP_USERNAME = "The username";
+
+    public static final String TOOLTIP_PASSWORD = "The password";
+
+    private Text idText;
+
+    private Text hostText;
+
+    private Text realmText;
+
+    private Text userNameText;
+
+    private Text pwdText;
+
+    private Label idLabel;
+
+    private Label hostLabel;
+
+    private Label realmLabel;
+
+    private Label userNameLabel;
+
+    private Label pwdLabel;
+
+    private Label errorLabel;
+
+    private Label errorIcon;
+
+    public SecuritySetupDialog(Shell parentShell) {
+        super(parentShell);
+    }
+
+    @Override
+    protected Control createDialogArea(Composite parent) {
+
+        Composite errorContainer = (Composite) super.createDialogArea(parent);
+        GridLayout errorLayout = new GridLayout(2, false);
+        errorContainer.setLayout(errorLayout);
+
+        errorIcon = new Label(errorContainer, SWT.NONE);
+        errorIcon.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR));
+        // errorIcon.setLayoutData(new GridData(20,20));
+
+        errorLabel = new Label(errorContainer, SWT.NONE);
+        errorLabel.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
+
+        Label separator = new Label(errorContainer, SWT.HORIZONTAL | SWT.SEPARATOR);
+        separator.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false, 2, 1));
+
+        Composite container = (Composite) super.createDialogArea(parent);
+        GridLayout layout = new GridLayout(2, false);
+        // layout.marginRight = 5;
+        // layout.marginLeft = 10;
+        container.setLayout(layout);
+
+        idLabel = new Label(container, SWT.NONE);
+        idLabel.setText("Id:");
+
+        idText = new Text(container, SWT.NONE);
+        idText.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
+        idText.setEditable(false);
+        idText.setEnabled(false);
+
+        hostLabel = new Label(container, SWT.NONE);
+        hostLabel.setText("Host:");
+
+        hostText = new Text(container, SWT.SINGLE | SWT.BORDER);
+        hostText.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
+        hostText.setToolTipText(TOOLTIP_HOST);
+
+        realmLabel = new Label(container, SWT.NONE);
+        realmLabel.setText("Realm:");
+
+        realmText = new Text(container, SWT.SINGLE | SWT.BORDER);
+        realmText.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
+        realmText.setToolTipText(TOOLTIP_REALM);
+
+        userNameLabel = new Label(container, SWT.NONE);
+        userNameLabel.setText("Username:");
+
+        userNameText = new Text(container, SWT.SINGLE | SWT.BORDER);
+        userNameText.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
+        userNameText.setToolTipText(TOOLTIP_USERNAME);
+
+        pwdLabel = new Label(container, SWT.NONE);
+        pwdLabel.setText("Password:");
+
+        pwdText = new Text(container, SWT.PASSWORD | SWT.BORDER);
+        pwdText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+        pwdText.setToolTipText(TOOLTIP_PASSWORD);
+
+        return container;
+    }
+
+    // overriding this methods allows you to set the
+    // title of the custom dialog
+    @Override
+    protected void configureShell(Shell newShell) {
+        super.configureShell(newShell);
+        // newShell.setText("Add");
+    }
+
+    @Override
+    protected Point getInitialSize() {
+        return new Point(370, 280);
+    }
+
+    public void setEnabled(boolean enabled) {
+
+        // super.setEnabled(enabled);
+        idLabel.setEnabled(true);
+        idText.setEnabled(true);
+        hostLabel.setEnabled(enabled);
+        hostText.setEnabled(enabled);
+        realmLabel.setEnabled(enabled);
+        realmText.setEnabled(enabled);
+        userNameLabel.setEnabled(enabled);
+        userNameText.setEnabled(enabled);
+        pwdLabel.setEnabled(enabled);
+        pwdText.setEnabled(enabled);
+
+        errorIcon.setEnabled(true);
+        errorLabel.setEnabled(true);
+
+    }
+
+    public Button getOkButton() {
+        return super.getButton(IDialogConstants.OK_ID);
+    }
+
+    @Override
+    protected void okPressed() {
+        // TODO: Do something?
+        super.okPressed();
+    }
+
+    /**
+     * @return the hostText
+     */
+    public Text getHostText() {
+        return hostText;
+    }
+
+    /**
+     * @return the realmText
+     */
+    public Text getRealmText() {
+        return realmText;
+    }
+
+    /**
+     * @return the userNameText
+     */
+    public Text getUserNameText() {
+        return userNameText;
+    }
+
+    /**
+     * @return the pwdText
+     */
+    public Text getPwdText() {
+        return pwdText;
+    }
+
+    /**
+     * @return the idText
+     */
+    public Text getIdText() {
+        return idText;
+    }
+
+    /**
+     * @return the errorLabel
+     */
+    public Label getErrorLabel() {
+        return errorLabel;
+    }
+
+    /**
+     * @return the errorIcon
+     */
+    public Label getErrorIcon() {
+        return errorIcon;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/preferences/SecuritySetupPreferencePage.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/preferences/SecuritySetupPreferencePage.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/preferences/SecuritySetupPreferencePage.java
new file mode 100644
index 0000000..b37407b
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/preferences/SecuritySetupPreferencePage.java
@@ -0,0 +1,91 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.ui.preferences;
+
+import org.apache.ivyde.eclipse.IvyDEsecurityHelper;
+import org.apache.ivyde.eclipse.cp.SecuritySetup;
+import org.apache.ivyde.internal.eclipse.IvyPlugin;
+import org.apache.ivyde.internal.eclipse.controller.SecuritySetupController;
+import org.apache.ivyde.internal.eclipse.ui.SecuritySetupEditor;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class SecuritySetupPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+    /** the ID of the preference page */
+    public static final String PEREFERENCE_PAGE_ID = "org.apache.ivyde.eclipse.ui.preferences.SecuritySetupPreferencePage";
+
+    private SecuritySetupEditor securitySetupComposite;
+
+    private SecuritySetupController buttonController;
+
+    public SecuritySetupPreferencePage() {
+        setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
+    }
+
+    public void init(IWorkbench workbench) {
+        setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
+    }
+
+    protected Control createContents(Composite parent) {
+        securitySetupComposite = new SecuritySetupEditor(parent, SWT.NONE);
+        securitySetupComposite
+                .setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+
+        buttonController = new SecuritySetupController(securitySetupComposite);
+        buttonController.addHandlers();
+
+        securitySetupComposite.init(IvyDEsecurityHelper.getCredentialsFromSecureStore());
+
+        return securitySetupComposite;
+    }
+
+    /*
+     * NOTE: The table containing the credentials is directly coupled with the eclipse
+     * secure-storage: 
+     * - all operations are performed immediately on the secure-storage 
+     * - performOk(), performApply() and performDefaults() won't have any additional effects: They just
+     * redo performed operations (for the sake of completeness)
+     */
+
+    @Override
+    public boolean performOk() {
+        // TODO: Do what? => directly coupled with secure-storage
+        IvyDEsecurityHelper.cpyCredentialsFromSecureToIvyStorage();
+        return true;
+    }
+
+    @Override
+    protected void performApply() {
+        // TODO: Do what? => directly coupled with secure-storage
+        IvyDEsecurityHelper.cpyCredentialsFromSecureToIvyStorage();
+        super.performApply();
+    }
+
+    @Override
+    protected void performDefaults() {
+        // TODO: Do nothing? => directly coupled with secure-storage...
+        securitySetupComposite.init(IvyDEsecurityHelper.getCredentialsFromSecureStore());
+        super.performDefaults();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/BaseValidator.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/BaseValidator.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/BaseValidator.java
new file mode 100644
index 0000000..945018d
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/BaseValidator.java
@@ -0,0 +1,58 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.validator;
+
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.runtime.IStatus;
+
+public abstract class BaseValidator implements IValidator {
+
+    private IValidationReaction reaction;
+
+    private IStatus validationStatus;
+
+    public static final String EMPTY_ERROR = "The property '$entry' cannot be empty";
+
+    public static final String EXISTING_ENTRY_ERROR = "An entry with that host and realm already exists";
+    
+    public static final String VALID_MESSAGE = "Valid ivy credentials: Press 'OK' to save them";
+
+    public abstract boolean doValidation(Object validatedObject);
+
+    @Override
+    public IStatus validate(Object value) {
+        if (doValidation(value)) {
+            this.reaction.ok();
+        } else {
+            this.reaction.error();
+        }
+        return this.validationStatus;
+    }
+
+    /**
+     * @param exclusion
+     * @param reaction
+     */
+    public BaseValidator(IValidationReaction reaction) {
+        this.reaction = reaction;
+    }
+
+    public void setValidationStatus(IStatus validationStatus) {
+        this.validationStatus = validationStatus;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/IValidationReaction.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/IValidationReaction.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/IValidationReaction.java
new file mode 100644
index 0000000..bb8adb9
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/IValidationReaction.java
@@ -0,0 +1,25 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.validator;
+
+
+public interface IValidationReaction {
+
+    public void ok();
+    public void error();        
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/HostValidator.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/HostValidator.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/HostValidator.java
new file mode 100644
index 0000000..3e5046f
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/HostValidator.java
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.validator.impl;
+
+import org.apache.ivyde.internal.eclipse.validator.BaseValidator;
+import org.apache.ivyde.internal.eclipse.validator.IValidationReaction;
+import org.eclipse.core.databinding.validation.ValidationStatus;
+import org.eclipse.core.runtime.IStatus;
+
+public class HostValidator extends BaseValidator {
+
+    /**
+     * @param reaction
+     */
+    public HostValidator(IValidationReaction reaction) {
+        super(reaction);
+    }
+
+    @Override
+    public boolean doValidation(Object validatedObject) {
+        String host = (String) validatedObject;
+        boolean valid = !host.equals("");
+        IStatus validationStatus = valid ? ValidationStatus.ok() : ValidationStatus.error(EMPTY_ERROR.replace("$entry", "Host"));
+        super.setValidationStatus(validationStatus);        
+        return !host.equals("");
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/IdValidator.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/IdValidator.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/IdValidator.java
new file mode 100644
index 0000000..6a5cdf9
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/IdValidator.java
@@ -0,0 +1,80 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.validator.impl;
+
+import org.apache.ivyde.eclipse.IvyDEsecurityHelper;
+import org.apache.ivyde.internal.eclipse.validator.BaseValidator;
+import org.apache.ivyde.internal.eclipse.validator.IValidationReaction;
+import org.eclipse.core.databinding.validation.ValidationStatus;
+import org.eclipse.core.runtime.IStatus;
+
+public class IdValidator extends BaseValidator {
+
+    private boolean isAddOperation;
+
+    private String prevHostVal;
+
+    private String prevRealmVal;
+
+    /**
+     * @param reaction
+     * @param isAddOperation
+     * @param prevHostVal
+     * @param prevRealmVal
+     */
+    public IdValidator(IValidationReaction reaction, boolean isAddOperation, String prevHostVal,
+            String prevRealmVal) {
+        super(reaction);
+        this.isAddOperation = isAddOperation;
+        this.prevHostVal = prevHostVal;
+        this.prevRealmVal = prevRealmVal;
+    }
+
+    @Override
+    public boolean doValidation(Object validatedObject) {
+        String id = (String) validatedObject;
+        String[] hostRealm = id.split("@");
+        boolean valid = true;
+        String message = VALID_MESSAGE;
+        IStatus validationStatus;
+        if (id.equals("") || id.equals("@")) {
+            message = "Properties 'Host' and 'Realm' cannot be empty";
+            valid = false;
+        } else if (id.indexOf("@") == 0) {
+            message = EMPTY_ERROR.replace("$entry", "Host");
+            valid = false;
+        } else if (id.indexOf("@") == id.length() - 1) {
+            message = EMPTY_ERROR.replace("$entry", "Realm");
+            valid = false;
+        } else if (!isAddOperation && prevHostVal.equals(hostRealm[0])
+                && prevRealmVal.equals(hostRealm[1])) {
+            valid = true;
+        } else if (IvyDEsecurityHelper.hostExistsInSecureStorage(hostRealm[0], hostRealm[1])) {
+            message = EXISTING_ENTRY_ERROR;
+            valid = false;
+        }
+
+        if (valid) {
+            validationStatus = ValidationStatus.info(message);
+        } else {
+            validationStatus = ValidationStatus.error(message);
+        }
+        super.setValidationStatus(validationStatus);
+        return valid;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/PasswordValidator.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/PasswordValidator.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/PasswordValidator.java
new file mode 100644
index 0000000..88d18df
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/PasswordValidator.java
@@ -0,0 +1,36 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.validator.impl;
+
+import org.apache.ivyde.internal.eclipse.validator.BaseValidator;
+import org.apache.ivyde.internal.eclipse.validator.IValidationReaction;
+import org.eclipse.core.databinding.validation.ValidationStatus;
+
+public class PasswordValidator extends BaseValidator {
+
+    public PasswordValidator(IValidationReaction reaction) {
+        super(reaction);
+    }
+
+    @Override
+    public boolean doValidation(Object validatedObject) {
+        // TODO Validation here?
+        super.setValidationStatus(ValidationStatus.ok());
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/RealmValidator.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/RealmValidator.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/RealmValidator.java
new file mode 100644
index 0000000..0bcf5be
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/RealmValidator.java
@@ -0,0 +1,43 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.validator.impl;
+
+import org.apache.ivyde.internal.eclipse.validator.BaseValidator;
+import org.apache.ivyde.internal.eclipse.validator.IValidationReaction;
+import org.eclipse.core.databinding.validation.ValidationStatus;
+import org.eclipse.core.runtime.IStatus;
+
+public class RealmValidator extends BaseValidator {
+
+    /**
+     * @param reaction
+     */
+    public RealmValidator(IValidationReaction reaction) {
+        super(reaction);
+    }
+
+    @Override
+    public boolean doValidation(Object validatedObject) {
+        String realm = (String) validatedObject;
+        boolean valid = !realm.equals("");
+        IStatus validationStatus = valid ? ValidationStatus.ok() : ValidationStatus
+                .error(EMPTY_ERROR.replace("$entry", "Realm"));
+        super.setValidationStatus(validationStatus);
+        return !realm.equals("");
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/86138a1b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/UserNameValidator.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/UserNameValidator.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/UserNameValidator.java
new file mode 100644
index 0000000..5d9c4c4
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/UserNameValidator.java
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.internal.eclipse.validator.impl;
+
+import org.apache.ivyde.internal.eclipse.validator.BaseValidator;
+import org.apache.ivyde.internal.eclipse.validator.IValidationReaction;
+import org.eclipse.core.databinding.validation.ValidationStatus;
+
+public class UserNameValidator extends BaseValidator {
+
+    /**
+     * @param reaction
+     */
+    public UserNameValidator(IValidationReaction reaction) {
+        super(reaction);
+    }
+
+    @Override
+    public boolean doValidation(Object validatedObject) {
+        // TODO Validation here?
+        super.setValidationStatus(ValidationStatus.ok());
+        return true;
+    }
+}