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/07/11 20:52:30 UTC

[1/7] ant-ivyde git commit: Add support for storing securely credentials (thanks to Alexander Blaas)

Repository: ant-ivyde
Updated Branches:
  refs/heads/master 0d36b49d5 -> e5088bb1f


Add support for storing securely credentials (thanks to Alexander Blaas)


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

Branch: refs/heads/master
Commit: df5fead546bd8a55126ebc12ad4dae1875f8cf99
Parents: 45d03ba
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Wed Jun 14 23:41:15 2017 +0200
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Sun Jul 2 12:16:47 2017 +0200

----------------------------------------------------------------------
 org.apache.ivyde.eclipse/META-INF/MANIFEST.MF   |   7 +-
 org.apache.ivyde.eclipse/plugin.xml             |   7 +-
 .../apache/ivyde/eclipse/GUIfactoryHelper.java  |  85 +++++++
 .../ivyde/eclipse/IvyDEsecurityHelper.java      | 167 +++++++++++++
 .../apache/ivyde/eclipse/cp/SecuritySetup.java  | 183 ++++++++++++++
 .../ivyde/internal/eclipse/IvyPlugin.java       |  16 +-
 .../controller/SecuritySetupController.java     | 247 +++++++++++++++++++
 .../cpcontainer/SecuritySetupContainer.java     |  55 +++++
 .../eclipse/ui/SecuritySetupEditor.java         | 128 ++++++++++
 .../ui/components/CustomConfirmationDialog.java |  43 ++++
 .../ui/components/SecuritySetupDialog.java      | 225 +++++++++++++++++
 .../SecuritySetupPreferencePage.java            |  91 +++++++
 .../eclipse/validator/BaseValidator.java        |  58 +++++
 .../eclipse/validator/IValidationReaction.java  |  25 ++
 .../eclipse/validator/impl/HostValidator.java   |  43 ++++
 .../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     |  60 +++++
 .../reaction/NopValidationReaction.java         |  34 +++
 21 files changed, 1666 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/df5fead5/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..9113a35 100644
--- a/org.apache.ivyde.eclipse/META-INF/MANIFEST.MF
+++ b/org.apache.ivyde.eclipse/META-INF/MANIFEST.MF
@@ -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/df5fead5/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/df5fead5/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..70fa1c3
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/GUIfactoryHelper.java
@@ -0,0 +1,85 @@
+/*
+ *  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/df5fead5/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..b54ece7
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEsecurityHelper.java
@@ -0,0 +1,167 @@
+/*
+ *  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/df5fead5/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..ae8f95b
--- /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/df5fead5/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..3ae72c7 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));
@@ -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;

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/df5fead5/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..21913dc
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/controller/SecuritySetupController.java
@@ -0,0 +1,247 @@
+/*
+ *  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/df5fead5/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/df5fead5/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/df5fead5/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..7189a79
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/components/CustomConfirmationDialog.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.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/df5fead5/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/df5fead5/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/df5fead5/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..b1c87bd
--- /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/df5fead5/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..94d2204
--- /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/df5fead5/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..6d476d8
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/impl/HostValidator.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 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/df5fead5/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/df5fead5/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/df5fead5/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..4dcfd67
--- /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/df5fead5/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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/df5fead5/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/reaction/GeneralValidationReaction.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/reaction/GeneralValidationReaction.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/reaction/GeneralValidationReaction.java
new file mode 100644
index 0000000..0020bdf
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/reaction/GeneralValidationReaction.java
@@ -0,0 +1,60 @@
+/*
+ *  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.reaction;
+
+import org.apache.ivyde.internal.eclipse.validator.IValidationReaction;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Label;
+
+public class GeneralValidationReaction implements IValidationReaction {
+
+    private Button okButton;
+
+    private Label errorLabel;
+
+    private Label errorIcon;
+
+    @Override
+    public void ok() {
+        this.okButton.setEnabled(true);
+        // this.errorIcon.setVisible(false);
+        // this.errorLabel.setVisible(false);
+        this.errorIcon.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO));
+    }
+
+    /**
+     * @param okButton
+     * @param errorLabel
+     * @param errorIcon
+     */
+    public GeneralValidationReaction(Button okButton, Label errorLabel, Label errorIcon) {
+        this.okButton = okButton;
+        this.errorLabel = errorLabel;
+        this.errorIcon = errorIcon;
+    }
+
+    @Override
+    public void error() {
+        this.okButton.setEnabled(false);
+        this.errorIcon.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR));
+        // this.errorLabel.setText("Insert credentials");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/df5fead5/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/reaction/NopValidationReaction.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/reaction/NopValidationReaction.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/reaction/NopValidationReaction.java
new file mode 100644
index 0000000..9bf63af
--- /dev/null
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/validator/reaction/NopValidationReaction.java
@@ -0,0 +1,34 @@
+/*
+ *  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.reaction;
+
+import org.apache.ivyde.internal.eclipse.validator.IValidationReaction;
+
+public class NopValidationReaction implements IValidationReaction {
+
+    @Override
+    public void ok() {
+        // Do nothing ;-)
+    }
+
+    @Override
+    public void error() {
+        // Do nothing ;-)
+    }
+
+}


[6/7] ant-ivyde git commit: Add the new doc about security in the toc.json

Posted by hi...@apache.org.
Add the new doc about security in the toc.json


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

Branch: refs/heads/master
Commit: ed330e92ff346fdb996a347f1b0638a3a9fc4a6c
Parents: fc1eb9d
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Tue Jul 11 22:41:42 2017 +0200
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Tue Jul 11 22:41:42 2017 +0200

----------------------------------------------------------------------
 doc/src/credentialsExtension.adoc | 92 ----------------------------------
 doc/src/security.adoc             | 88 ++++++++++++++++++++++++++++++++
 doc/src/toc.json                  |  7 +++
 3 files changed, 95 insertions(+), 92 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/ed330e92/doc/src/credentialsExtension.adoc
----------------------------------------------------------------------
diff --git a/doc/src/credentialsExtension.adoc b/doc/src/credentialsExtension.adoc
deleted file mode 100644
index efaf6c4..0000000
--- a/doc/src/credentialsExtension.adoc
+++ /dev/null
@@ -1,92 +0,0 @@
-////
-   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.
-////
-
-== [[security]]Security
-
-This preference section allows you to manage credentials, which the ivy dependency manager needs to access protected repositories. The credentials are directly stored into the Eclipse Secure storage and loaded during the ivyDE-plugin's startup. This preference page allows you to manage your ivy credentials safely without the need to "publish" them in plain-text inside your build-files.
-
-== [[general]]General workflow
-
-The ivyDE credentials extension allows you - as already mentioned - to protect your ivy credentials by using the Eclipse Secure storage. The credential entries are only maintained by the Eclipse secure storage itself: Every operation (add/edit/remove) is directly performed on the Eclipse secure storage without any intermediate caches. At the ivyDE plugin's startup, the Eclipse Secure storage is accessed (this operation requires you to insert your password if your Eclipse Secure storage is password-protected) and all the credential entries - which are related to the ivy dependency manager - are loaded and copied to the internal ivy credential manager (where ivy looks for credentials in case of protected repositories).
-
-Please note that this "credential-copying" is directly done after the ivyDE plugin's startup. If your ivy-configuration files, respectively, your build-files also contain credentials pointing to the same repository (same host@realm combination as already stored in the Eclipse Secure storage), the credentials inside the Eclipse Secure storage may be overwritten due to the fact, that credentials specified within the mentioned alternative locations may be added to the internal ivy credential manager after the "credential-copying" was performed. 
-
-.General:
-
-== [[credentialsOverview]]Overview
-
-In this view all your credentials related to the ivy dependency manager are listed. The credentials consist of:
-
-* Host: The host of your protected repository.
-
-* Realm: The realm of your protected repository.
-
-* Username: The username which grants access to the protected repository.
-
-* Pwd: The password to identify yourself.
-
-You can either add new credentials or edit/remove existing ones (see next sections).
-
-image::images/sec_security_preferences.png[]
-
-== [[addCredentials]]Add new credentials
-
-Click on the "Add..." button to add new credentials:
-
-image::images/sec_add_credentials_empty.png[]
-
-A new dialog appears where you can insert a new credential entry. The properties "Host" and "Realm" are required because they are used to identify an artifact-repository and thus also a credential entry within the Eclipse secure storage. The property "Id" is read-only and shows you the repository's identifier (host@realm).
-
-image::images/sec_add_credentials_filled.png[]
-
-If the inserted host@realm combination is unique and not already existing, the credential entry can be saved (stored directly to the Eclipse Secure storage). Press "OK" to save, "Cancel" otherwise.
-
-The added credential entry is now visible within the overview and can be edited or removed:
-
-image::images/sec_add_credentials_overview.png[]
-
-Adding a new credential entry having the same identifier is not permitted (as mentioned before):
-
-image::images/sec_add_credentials_duplicate.png[]
-
-The ivy dependency manager allows multiple repositories for the same host, but their realm has to be unique on that host:
-
-image::images/sec_add_credentials_duplicate_resolved.png[]
-
-== [[editCredentials]]Edit existing credentials
-
-Once credentials are added to the Eclipse Secure storage, they can be edited. To edit a credential entry, select the desired entry (row) listed in the overview and press "Edit...":
-
-image::images/sec_edit_credentials_init.png[]
-
-Afterwards the edit dialog appears. Press "OK" to save your changes or "Cancel" to discard your changes:
-
-image::images/sec_edit_credentials_completed.png[]
-
-If you saved your changes, the credential entry inside the Eclipse Secure storage is updated and the credential overview is refreshed:
-
-image::images/sec_edit_credentials_overview.png[]
-
-== [[editCredentials]]Remove existing credentials
-
-In the credentials overview press "Remove" to delete the selected credential entry. Press "OK" to confirm or "Cancel" to abort the operation:
-
-image::images/sec_remove_credentials.png[]
-
-Please note that the internal ivyDE credentials manager (currently) does not permit to delete credentials once they are loaded at startup. If you delete credentials entries, the corresponding entries in the internal ivyDE credentials manager are invalidated (password and username are nulled). After Eclipse is restarted, the the internal ivyDE credentials manager is rebuild.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/ed330e92/doc/src/security.adoc
----------------------------------------------------------------------
diff --git a/doc/src/security.adoc b/doc/src/security.adoc
new file mode 100644
index 0000000..c8d3e8c
--- /dev/null
+++ b/doc/src/security.adoc
@@ -0,0 +1,88 @@
+////
+   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.
+////
+
+This preference section allows you to manage credentials, which the ivy dependency manager needs to access protected repositories. The credentials are directly stored into the Eclipse Secure storage and loaded during the ivyDE-plugin's startup. This preference page allows you to manage your ivy credentials safely without the need to "publish" them in plain-text inside your build-files.
+
+== [[general]]General workflow
+
+The ivyDE credentials extension allows you - as already mentioned - to protect your ivy credentials by using the Eclipse Secure storage. The credential entries are only maintained by the Eclipse secure storage itself: Every operation (add/edit/remove) is directly performed on the Eclipse secure storage without any intermediate caches. At the ivyDE plugin's startup, the Eclipse Secure storage is accessed (this operation requires you to insert your password if your Eclipse Secure storage is password-protected) and all the credential entries - which are related to the ivy dependency manager - are loaded and copied to the internal ivy credential manager (where ivy looks for credentials in case of protected repositories).
+
+Please note that this "credential-copying" is directly done after the ivyDE plugin's startup. If your ivy-configuration files, respectively, your build-files also contain credentials pointing to the same repository (same host@realm combination as already stored in the Eclipse Secure storage), the credentials inside the Eclipse Secure storage may be overwritten due to the fact, that credentials specified within the mentioned alternative locations may be added to the internal ivy credential manager after the "credential-copying" was performed. 
+
+== [[credentialsOverview]]Overview
+
+In this view all your credentials related to the ivy dependency manager are listed. The credentials consist of:
+
+* Host: The host of your protected repository.
+
+* Realm: The realm of your protected repository.
+
+* Username: The username which grants access to the protected repository.
+
+* Pwd: The password to identify yourself.
+
+You can either add new credentials or edit/remove existing ones (see next sections).
+
+image::images/sec_security_preferences.png[]
+
+== [[addCredentials]]Add new credentials
+
+Click on the "Add..." button to add new credentials:
+
+image::images/sec_add_credentials_empty.png[]
+
+A new dialog appears where you can insert a new credential entry. The properties "Host" and "Realm" are required because they are used to identify an artifact-repository and thus also a credential entry within the Eclipse secure storage. The property "Id" is read-only and shows you the repository's identifier (host@realm).
+
+image::images/sec_add_credentials_filled.png[]
+
+If the inserted host@realm combination is unique and not already existing, the credential entry can be saved (stored directly to the Eclipse Secure storage). Press "OK" to save, "Cancel" otherwise.
+
+The added credential entry is now visible within the overview and can be edited or removed:
+
+image::images/sec_add_credentials_overview.png[]
+
+Adding a new credential entry having the same identifier is not permitted (as mentioned before):
+
+image::images/sec_add_credentials_duplicate.png[]
+
+The ivy dependency manager allows multiple repositories for the same host, but their realm has to be unique on that host:
+
+image::images/sec_add_credentials_duplicate_resolved.png[]
+
+== [[editCredentials]]Edit existing credentials
+
+Once credentials are added to the Eclipse Secure storage, they can be edited. To edit a credential entry, select the desired entry (row) listed in the overview and press "Edit...":
+
+image::images/sec_edit_credentials_init.png[]
+
+Afterwards the edit dialog appears. Press "OK" to save your changes or "Cancel" to discard your changes:
+
+image::images/sec_edit_credentials_completed.png[]
+
+If you saved your changes, the credential entry inside the Eclipse Secure storage is updated and the credential overview is refreshed:
+
+image::images/sec_edit_credentials_overview.png[]
+
+== [[editCredentials]]Remove existing credentials
+
+In the credentials overview press "Remove" to delete the selected credential entry. Press "OK" to confirm or "Cancel" to abort the operation:
+
+image::images/sec_remove_credentials.png[]
+
+Please note that the internal ivyDE credentials manager (currently) does not permit to delete credentials once they are loaded at startup. If you delete credentials entries, the corresponding entries in the internal ivyDE credentials manager are invalidated (password and username are nulled). After Eclipse is restarted, the the internal ivyDE credentials manager is rebuild.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/ed330e92/doc/src/toc.json
----------------------------------------------------------------------
diff --git a/doc/src/toc.json b/doc/src/toc.json
index f1d47b6..74dc35f 100644
--- a/doc/src/toc.json
+++ b/doc/src/toc.json
@@ -162,6 +162,13 @@
                 ]
             },
             {
+              "id":"security",
+              "title":"Security",
+              "children": [
+
+                ]
+            },
+            {
               "id":"console",
               "title":"Ivy Console",
               "children": [


[7/7] ant-ivyde git commit: Update the release notes for the new Security panel

Posted by hi...@apache.org.
Update the release notes for the new Security panel


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

Branch: refs/heads/master
Commit: e5088bb1f62ec6d9b83af4ab1a8e77a52c102b38
Parents: ed330e9
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Tue Jul 11 22:48:26 2017 +0200
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Tue Jul 11 22:48:26 2017 +0200

----------------------------------------------------------------------
 doc/src/release-notes.adoc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/e5088bb1/doc/src/release-notes.adoc
----------------------------------------------------------------------
diff --git a/doc/src/release-notes.adoc b/doc/src/release-notes.adoc
index 5ba05c8..033c94d 100644
--- a/doc/src/release-notes.adoc
+++ b/doc/src/release-notes.adoc
@@ -34,7 +34,7 @@ The Apache IvyDE Eclipse plugin integrates Apache Ivy's dependency management in
 
 Major changes in this release:
 
-!!!! TODO !!!!
+IvyDE can now manage credentials stored in a secured store. Rather than putting passwords for HTTP Authentication in a property file, IvyDE allow you to use the secure storage capability of Eclipse and your OS to store them. See the new "Security" panel in the global preferences of IvyDE.
 
 Compatibility:
 !!!! TODO !!!!
@@ -86,6 +86,7 @@ Committers:
 Contributors:
 
 * Daniel Becheanu
+* Alexander Blaas
 * Peter Blstak
 * Clint Burghduff
 * Peter Chanthamynavong
@@ -124,6 +125,7 @@ List of changes since link:/ivy/ivyde/history/2.2.0.final/release-notes.html[Apa
     
 * NEW: add support for OSGi 'Bundle-Classpath' directive (Ivy 2.4.0-rc1 is required)
 * NEW: basic support for the workspace resolver to find OSGi bundles managed by Ivy in the workspace (Ivy 2.4.0-rc2 is required)
+* NEW: Add support for storing securely credentials (thanks to Alexander Blaas)
     
 ////
  samples


[5/7] ant-ivyde git commit: This closes #6

Posted by hi...@apache.org.
This closes #6


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

Branch: refs/heads/master
Commit: fc1eb9db47b769da37f8e5ee01d5212ab3500299
Parents: dbd94b3 675f141
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Tue Jul 11 22:29:00 2017 +0200
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Tue Jul 11 22:29:00 2017 +0200

----------------------------------------------------------------------
 doc/src/credentialsExtension.adoc               |  92 +++++++++++++++++++
 .../images/sec_add_credentials_duplicate.png    | Bin 0 -> 80887 bytes
 .../sec_add_credentials_duplicate_resolved.png  | Bin 0 -> 83558 bytes
 doc/src/images/sec_add_credentials_empty.png    | Bin 0 -> 75105 bytes
 doc/src/images/sec_add_credentials_filled.png   | Bin 0 -> 80880 bytes
 doc/src/images/sec_add_credentials_overview.png | Bin 0 -> 51728 bytes
 .../images/sec_edit_credentials_completed.png   | Bin 0 -> 89224 bytes
 doc/src/images/sec_edit_credentials_init.png    | Bin 0 -> 54422 bytes
 .../images/sec_edit_credentials_overview.png    | Bin 0 -> 55750 bytes
 doc/src/images/sec_remove_credentials.png       | Bin 0 -> 80841 bytes
 doc/src/images/sec_secure_storage_pwd.png       | Bin 0 -> 17450 bytes
 doc/src/images/sec_security_preferences.png     | Bin 0 -> 48980 bytes
 .../cpcontainer/SecuritySetupContainer.java     |  55 -----------
 13 files changed, 92 insertions(+), 55 deletions(-)
----------------------------------------------------------------------



[3/7] ant-ivyde git commit: asciidoc for credential extension added

Posted by hi...@apache.org.
asciidoc for credential extension added

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

Branch: refs/heads/master
Commit: 675f141ba4edc73a2858c91609a93034f1c8a504
Parents: 6eb38cd
Author: alex-bl <al...@arctis.at>
Authored: Sat Jul 8 16:46:08 2017 +0200
Committer: alex-bl <al...@arctis.at>
Committed: Sat Jul 8 16:46:08 2017 +0200

----------------------------------------------------------------------
 doc/src/credentialsExtension.adoc               |  92 +++++++++++++++++++
 .../images/sec_add_credentials_duplicate.png    | Bin 0 -> 80887 bytes
 .../sec_add_credentials_duplicate_resolved.png  | Bin 0 -> 83558 bytes
 doc/src/images/sec_add_credentials_empty.png    | Bin 0 -> 75105 bytes
 doc/src/images/sec_add_credentials_filled.png   | Bin 0 -> 80880 bytes
 doc/src/images/sec_add_credentials_overview.png | Bin 0 -> 51728 bytes
 .../images/sec_edit_credentials_completed.png   | Bin 0 -> 89224 bytes
 doc/src/images/sec_edit_credentials_init.png    | Bin 0 -> 54422 bytes
 .../images/sec_edit_credentials_overview.png    | Bin 0 -> 55750 bytes
 doc/src/images/sec_remove_credentials.png       | Bin 0 -> 80841 bytes
 doc/src/images/sec_secure_storage_pwd.png       | Bin 0 -> 17450 bytes
 doc/src/images/sec_security_preferences.png     | Bin 0 -> 48980 bytes
 12 files changed, 92 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/credentialsExtension.adoc
----------------------------------------------------------------------
diff --git a/doc/src/credentialsExtension.adoc b/doc/src/credentialsExtension.adoc
new file mode 100644
index 0000000..efaf6c4
--- /dev/null
+++ b/doc/src/credentialsExtension.adoc
@@ -0,0 +1,92 @@
+////
+   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.
+////
+
+== [[security]]Security
+
+This preference section allows you to manage credentials, which the ivy dependency manager needs to access protected repositories. The credentials are directly stored into the Eclipse Secure storage and loaded during the ivyDE-plugin's startup. This preference page allows you to manage your ivy credentials safely without the need to "publish" them in plain-text inside your build-files.
+
+== [[general]]General workflow
+
+The ivyDE credentials extension allows you - as already mentioned - to protect your ivy credentials by using the Eclipse Secure storage. The credential entries are only maintained by the Eclipse secure storage itself: Every operation (add/edit/remove) is directly performed on the Eclipse secure storage without any intermediate caches. At the ivyDE plugin's startup, the Eclipse Secure storage is accessed (this operation requires you to insert your password if your Eclipse Secure storage is password-protected) and all the credential entries - which are related to the ivy dependency manager - are loaded and copied to the internal ivy credential manager (where ivy looks for credentials in case of protected repositories).
+
+Please note that this "credential-copying" is directly done after the ivyDE plugin's startup. If your ivy-configuration files, respectively, your build-files also contain credentials pointing to the same repository (same host@realm combination as already stored in the Eclipse Secure storage), the credentials inside the Eclipse Secure storage may be overwritten due to the fact, that credentials specified within the mentioned alternative locations may be added to the internal ivy credential manager after the "credential-copying" was performed. 
+
+.General:
+
+== [[credentialsOverview]]Overview
+
+In this view all your credentials related to the ivy dependency manager are listed. The credentials consist of:
+
+* Host: The host of your protected repository.
+
+* Realm: The realm of your protected repository.
+
+* Username: The username which grants access to the protected repository.
+
+* Pwd: The password to identify yourself.
+
+You can either add new credentials or edit/remove existing ones (see next sections).
+
+image::images/sec_security_preferences.png[]
+
+== [[addCredentials]]Add new credentials
+
+Click on the "Add..." button to add new credentials:
+
+image::images/sec_add_credentials_empty.png[]
+
+A new dialog appears where you can insert a new credential entry. The properties "Host" and "Realm" are required because they are used to identify an artifact-repository and thus also a credential entry within the Eclipse secure storage. The property "Id" is read-only and shows you the repository's identifier (host@realm).
+
+image::images/sec_add_credentials_filled.png[]
+
+If the inserted host@realm combination is unique and not already existing, the credential entry can be saved (stored directly to the Eclipse Secure storage). Press "OK" to save, "Cancel" otherwise.
+
+The added credential entry is now visible within the overview and can be edited or removed:
+
+image::images/sec_add_credentials_overview.png[]
+
+Adding a new credential entry having the same identifier is not permitted (as mentioned before):
+
+image::images/sec_add_credentials_duplicate.png[]
+
+The ivy dependency manager allows multiple repositories for the same host, but their realm has to be unique on that host:
+
+image::images/sec_add_credentials_duplicate_resolved.png[]
+
+== [[editCredentials]]Edit existing credentials
+
+Once credentials are added to the Eclipse Secure storage, they can be edited. To edit a credential entry, select the desired entry (row) listed in the overview and press "Edit...":
+
+image::images/sec_edit_credentials_init.png[]
+
+Afterwards the edit dialog appears. Press "OK" to save your changes or "Cancel" to discard your changes:
+
+image::images/sec_edit_credentials_completed.png[]
+
+If you saved your changes, the credential entry inside the Eclipse Secure storage is updated and the credential overview is refreshed:
+
+image::images/sec_edit_credentials_overview.png[]
+
+== [[editCredentials]]Remove existing credentials
+
+In the credentials overview press "Remove" to delete the selected credential entry. Press "OK" to confirm or "Cancel" to abort the operation:
+
+image::images/sec_remove_credentials.png[]
+
+Please note that the internal ivyDE credentials manager (currently) does not permit to delete credentials once they are loaded at startup. If you delete credentials entries, the corresponding entries in the internal ivyDE credentials manager are invalidated (password and username are nulled). After Eclipse is restarted, the the internal ivyDE credentials manager is rebuild.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_add_credentials_duplicate.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_add_credentials_duplicate.png b/doc/src/images/sec_add_credentials_duplicate.png
new file mode 100644
index 0000000..775891a
Binary files /dev/null and b/doc/src/images/sec_add_credentials_duplicate.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_add_credentials_duplicate_resolved.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_add_credentials_duplicate_resolved.png b/doc/src/images/sec_add_credentials_duplicate_resolved.png
new file mode 100644
index 0000000..eeaba21
Binary files /dev/null and b/doc/src/images/sec_add_credentials_duplicate_resolved.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_add_credentials_empty.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_add_credentials_empty.png b/doc/src/images/sec_add_credentials_empty.png
new file mode 100644
index 0000000..6d59c12
Binary files /dev/null and b/doc/src/images/sec_add_credentials_empty.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_add_credentials_filled.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_add_credentials_filled.png b/doc/src/images/sec_add_credentials_filled.png
new file mode 100644
index 0000000..482367f
Binary files /dev/null and b/doc/src/images/sec_add_credentials_filled.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_add_credentials_overview.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_add_credentials_overview.png b/doc/src/images/sec_add_credentials_overview.png
new file mode 100644
index 0000000..06535ce
Binary files /dev/null and b/doc/src/images/sec_add_credentials_overview.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_edit_credentials_completed.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_edit_credentials_completed.png b/doc/src/images/sec_edit_credentials_completed.png
new file mode 100644
index 0000000..766aae5
Binary files /dev/null and b/doc/src/images/sec_edit_credentials_completed.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_edit_credentials_init.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_edit_credentials_init.png b/doc/src/images/sec_edit_credentials_init.png
new file mode 100644
index 0000000..1571733
Binary files /dev/null and b/doc/src/images/sec_edit_credentials_init.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_edit_credentials_overview.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_edit_credentials_overview.png b/doc/src/images/sec_edit_credentials_overview.png
new file mode 100644
index 0000000..c09dc28
Binary files /dev/null and b/doc/src/images/sec_edit_credentials_overview.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_remove_credentials.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_remove_credentials.png b/doc/src/images/sec_remove_credentials.png
new file mode 100644
index 0000000..9dce966
Binary files /dev/null and b/doc/src/images/sec_remove_credentials.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_secure_storage_pwd.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_secure_storage_pwd.png b/doc/src/images/sec_secure_storage_pwd.png
new file mode 100644
index 0000000..773059f
Binary files /dev/null and b/doc/src/images/sec_secure_storage_pwd.png differ

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/675f141b/doc/src/images/sec_security_preferences.png
----------------------------------------------------------------------
diff --git a/doc/src/images/sec_security_preferences.png b/doc/src/images/sec_security_preferences.png
new file mode 100644
index 0000000..5003617
Binary files /dev/null and b/doc/src/images/sec_security_preferences.png differ


[4/7] ant-ivyde git commit: Merge branch 'master' into ivyDECredentials-cleaned

Posted by hi...@apache.org.
Merge branch 'master' into ivyDECredentials-cleaned


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

Branch: refs/heads/master
Commit: dbd94b3b9a73f3e279fa72a779fe43d78118863a
Parents: df5fead 0d36b49
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Tue Jul 11 22:18:15 2017 +0200
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Tue Jul 11 22:18:15 2017 +0200

----------------------------------------------------------------------
 build.properties                    | 35 ++++++++++----------
 build.xml                           | 55 +++++++++++++++++---------------
 builder/component/allElements.xml   |  4 +--
 builder/component/customTargets.xml | 16 +++++-----
 builder/maps/ivyde.map              |  4 +--
 5 files changed, 61 insertions(+), 53 deletions(-)
----------------------------------------------------------------------



[2/7] ant-ivyde git commit: deprecated and unused class removed

Posted by hi...@apache.org.
deprecated and unused class removed

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

Branch: refs/heads/master
Commit: 6eb38cd3952e9fd7d7708a4285c7b6777a8c53e4
Parents: df5fead
Author: alex-bl <al...@student.uibk.ac.at>
Authored: Sat Jul 8 16:43:26 2017 +0200
Committer: alex-bl <al...@student.uibk.ac.at>
Committed: Sat Jul 8 16:43:26 2017 +0200

----------------------------------------------------------------------
 .../cpcontainer/SecuritySetupContainer.java     | 55 --------------------
 1 file changed, 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/6eb38cd3/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
deleted file mode 100644
index 3ee3aac..0000000
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/SecuritySetupContainer.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *  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;
-    }
-}