airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [1/2] airavata git commit: Depcreating unused credential store web-app - AIRAVATA-1829
Date Tue, 08 Sep 2015 23:35:34 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 4fa124229 -> ddc76d600


http://git-wip-us.apache.org/repos/asf/airavata/blob/ddc76d60/modules/credential-store/credential-store-webapp/src/main/webapp/gateway/logout.jsp
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/webapp/gateway/logout.jsp
b/modules/credential-store/credential-store-webapp/src/main/webapp/gateway/logout.jsp
deleted file mode 100644
index 63d90be..0000000
--- a/modules/credential-store/credential-store-webapp/src/main/webapp/gateway/logout.jsp
+++ /dev/null
@@ -1,35 +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.
-  --%>
-<%@ page import="org.apache.airavata.sample.gateway.SampleGateway" %><%
-    session.removeAttribute("userName");
-    session.removeAttribute(SampleGateway.GATEWAY_SESSION);
-    session.invalidate();
-%>
-
-<html>
-<head>
-    <script language=javascript>
-        function redirect(){
-            window.location = "../index.jsp";
-        }
-    </script>
-</head>
-<body onload="redirect()">
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/ddc76d60/modules/credential-store/credential-store-webapp/src/main/webapp/gateway/user.jsp
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/webapp/gateway/user.jsp
b/modules/credential-store/credential-store-webapp/src/main/webapp/gateway/user.jsp
deleted file mode 100644
index 1fd1957..0000000
--- a/modules/credential-store/credential-store-webapp/src/main/webapp/gateway/user.jsp
+++ /dev/null
@@ -1,102 +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.
-  --%>
-
-<%@ page import="org.apache.airavata.sample.gateway.SampleGateway" %>
-<%--
-  Created by IntelliJ IDEA.
-  User: thejaka
-  Date: 7/31/13
-  Time: 5:08 PM
-  To change this template use File | Settings | File Templates.
---%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%
-    String loginScreen = request.getParameter("loginScreen");
-
-    String user = (String)session.getAttribute("userName");
-    boolean authenticate = false;
-
-    if (loginScreen != null && loginScreen.equals("true")) {
-        SampleGateway sampleGateway = null;
-        sampleGateway = (SampleGateway) session.getAttribute(SampleGateway.GATEWAY_SESSION);
-
-        if (sampleGateway == null) {
-            sampleGateway = new SampleGateway(session.getServletContext());
-        }
-
-        session.setAttribute(SampleGateway.GATEWAY_SESSION, sampleGateway);
-
-        user = request.getParameter("username");
-        String password = request.getParameter("password");
-
-        authenticate = sampleGateway.authenticate(user, password);
-    } else {
-        authenticate = true;
-    }
-
-%>
-<html>
-
-<head>
-    <title>Manage</title>
-</head>
-<body>
-
-<table width="100%" border="0">
-    <tr bgcolor="#999999"><td align="right"><a href="user.jsp"><font
color="#f5f5f5">Home</font> </a> <a href="logout.jsp"><font color="#f5f5f5">Logout</font></a></td></tr>
-</table>
-
-<h1>Sample Gateway</h1>
-
-<%
-    if (authenticate) {
-
-        session.setAttribute("userName", user);
-
-        if (SampleGateway.isAdmin(user)) {
-%>
-<h1>Administration</h1>
-<p>
-    This page allows administration functionality.
-<ol>
-    <li><a href="acs.jsp">Retrieve Credentials</a></li>
-    <li><a href="list_users.jsp">List Users</a></li>
-</ol>
-</p>
-
-
-<%
-     } else {
-%>
-
-<p> You are a normal user. Click <a href="job.jsp">here</a> to configure
and run "Echo" workflow on a GRID machine.</p>
-
-<%
-     }
-    } else {
-%>
-
-<h1>Authentication failed</h1>
-
-<%
-    }
-%>
-
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/ddc76d60/modules/credential-store/credential-store-webapp/src/main/webapp/images/airavata-logo-2.png
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/webapp/images/airavata-logo-2.png
b/modules/credential-store/credential-store-webapp/src/main/webapp/images/airavata-logo-2.png
deleted file mode 100644
index 4baf51b..0000000
Binary files a/modules/credential-store/credential-store-webapp/src/main/webapp/images/airavata-logo-2.png
and /dev/null differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/ddc76d60/modules/credential-store/credential-store-webapp/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/webapp/index.jsp b/modules/credential-store/credential-store-webapp/src/main/webapp/index.jsp
deleted file mode 100644
index 1bf0ed6..0000000
--- a/modules/credential-store/credential-store-webapp/src/main/webapp/index.jsp
+++ /dev/null
@@ -1,26 +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.
---%>
-
-<html>
-<body>
-<img src="images/airavata-logo-2.png">
-<h2>Airavata Credential Store</h2>
-<p>Welcome to Airavata Credential Store Web Application</p>
-
-<p><a href="user-store/add.jsp"><b>Manage Local User Store</b></a></p>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/ddc76d60/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/add.jsp
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/add.jsp
b/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/add.jsp
deleted file mode 100644
index f37684d..0000000
--- a/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/add.jsp
+++ /dev/null
@@ -1,142 +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.
---%>
-<%@ page import="org.apache.airavata.credentialstore.local.LocalUserStore" %>
-
-<html>
-
-<head>
-    <script language="javascript" type="text/javascript">
-        function validatePassword(fld1name, regString) {
-            var stringValue = document.getElementsByName(fld1name)[0].value;
-            var errorMessage = "";
-            if(regString != "null" && !stringValue.match(new RegExp(regString))){
-                errorMessage = "Password does not meet minimum requirements. Password length
must be at least 6 " +
-                        "characters.";
-                return errorMessage;
-            }else if(regString != "null" && stringValue == ''){
-                return errorMessage;
-            }
-
-            if (stringValue == '') {
-                errorMessage = "Empty passwords are not allowed. Please enter a valid password";
-                return errorMessage;
-            }
-
-            return errorMessage;
-        }
-
-        function validateUsername(fld1name) {
-            var stringValue = document.getElementsByName(fld1name)[0].value;
-            var errorMessage = "";
-
-            if (stringValue == '') {
-                errorMessage = "Empty user names are not allowed. Please enter a valid user
name.";
-                return errorMessage;
-            }
-
-            return errorMessage;
-        }
-
-        function checkPasswordsMatching(fld1name, fld2name) {
-
-            var stringValue1 = document.getElementsByName(fld1name)[0].value;
-            var stringValue2 = document.getElementsByName(fld2name)[0].value;
-            var errorMessage = "";
-
-            if (stringValue1 != stringValue2) {
-                errorMessage = "Confirm password does not match with the password. Please
re-enter passwords.";
-                return errorMessage;
-            }
-
-            return errorMessage;
-
-        }
-
-        function validate() {
-            var reason = "";
-
-            reason = validateUsername("username");
-
-            if (reason != "") {
-                alert(reason);
-                return false;
-            }
-
-            reason = validatePassword("newPassword", <%=LocalUserStore.getPasswordRegularExpression()%>);
-
-            if (reason != "") {
-                alert(reason);
-                document.getElementsByName("newPassword")[0].clear();
-                return false;
-            }
-
-            reason = checkPasswordsMatching("newPassword", "confirmPassword");
-
-            if (reason != "") {
-                alert(reason);
-                document.getElementsByName("newPassword")[0].clear();
-                document.getElementsByName("confirmPassword")[0].clear();
-                return false;
-            }
-
-            return true;
-        }
-
-        function doProcess() {
-            if (validate() == true) {
-                document.registration.submit();
-            }
-        }
-
-
-    </script>
-</head>
-
-<body>
-<img src="../images/airavata-logo-2.png">
-<h2>Airavata Credential Store - Local User Store</h2>
-<p><b>Manage Local User Store - Add New User</b></p>
-
-<form action="index.jsp" name="registration" method="POST">
-
-    <input type="hidden" name="operation" value="addUser">
-    <table>
-        <tr>
-            <td>User Name</td>
-            <td><input type="text" name="username" maxlength="150"></td>
-        </tr>
-        <tr>
-            <td>Password</td>
-            <td><input type="password" name="newPassword"/></td>
-        </tr>
-        <tr>
-            <td>Re-Type Password</td>
-            <td><input type="password" name="confirmPassword"/></td>
-        </tr>
-    </table>
-
-    <table>
-        <tr>
-            <td><input type="button" value="Add" onclick= 'doProcess()'></td>
-            <td><a href="index.jsp"><input type="button" value="Cancel" name="Cancel"/>
</a> </td>
-        </tr>
-    </table>
-
-</form>
-
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/ddc76d60/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/index.jsp
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/index.jsp
b/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/index.jsp
deleted file mode 100644
index 732c0c7..0000000
--- a/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/index.jsp
+++ /dev/null
@@ -1,138 +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.
---%>
-
-<%@ page import = "org.apache.airavata.credentialstore.local.LocalUserStore" %>
-<%@ page import="org.apache.airavata.credentialstore.basic.BasicAccessAuthenticator" %>
-<%@ page import="org.apache.airavata.credentialstore.session.HttpAuthenticatorFilter"
%>
-<%@ page import="java.util.List" %>
-<%@ page import="org.apache.airavata.common.utils.Constants" %>
-<%
-
-    LocalUserStore localUserStore = (LocalUserStore)session.getAttribute("LocalUserStore");
-
-    if (localUserStore == null) {
-
-        String operatingUser = (String) session.getAttribute(Constants.USER_IN_SESSION);
-
-        if (operatingUser == null || !operatingUser.equals("admin")) {
-            HttpAuthenticatorFilter.sendUnauthorisedError(response, "Insufficient privileges
to perform user operations." +
-                    " Only admin user is allowed to perform user operations.");
-
-            return;
-        }
-
-        localUserStore = new LocalUserStore(application);
-
-        session.setAttribute("LocalUserStore", localUserStore);
-    }
-
-    String operation = request.getParameter("operation");
-    if (operation != null) {
-        if (operation.equals("addUser")) {
-            String userName = request.getParameter("username");
-            String password = request.getParameter("newPassword");
-
-            localUserStore.addUser(userName, password);
-        } else if (operation.equals("deleteUser")) {
-            String[] usersToDelete = request.getParameterValues("user-id");
-
-            for (String deleteUser : usersToDelete) {
-                localUserStore.deleteUser(deleteUser);
-            }
-        }
-    }
-
-    List<String> allUsers = localUserStore.getUsers();
-
-%>
-
-<html>
-<head>
-    <script language="javascript" type="text/javascript">
-
-        function validate() {
-            var checkSelected = false;
-            for (var i = 0; i < <%=allUsers.size()%>; i++) {
-                if (document.main["user-id"][i].checked) {
-                    checkSelected = true;
-                }
-            }
-            if (checkSelected) {
-                var answer = confirm("Are you sure you want to delete selected users from
the system ?");
-                if (answer) {
-                    return true;
-                }
-            } else {
-                alert("Select at least one user to delete.");
-            }
-            return false;
-        }
-
-        function doProcess() {
-            if (validate() == true) {
-                document.main.submit();
-            }
-        }
-
-    </script>
-</head>
-<body>
-<img src="../images/airavata-logo-2.png">
-<h2>Airavata REST API - Local User Store</h2>
-<p><b>Manage Local User Store</b></p>
-
-
-<form action="index.jsp" name="main" method="POST">
-    <table>
-        <tr>
-            <td>&nbsp;</td>
-            <td>All Users</td>
-        </tr>
-        <%
-            for (String user : allUsers) {
-        %>
-
-        <tr>
-            <td><input type="checkbox" name="user-id" value="<%=user%>"></td>
-            <td><%=user%>
-            </td>
-            <td><a href="password.jsp?username=<%=user%>">Change Password</a></td>
-        </tr>
-
-        <%
-            }
-        %>
-    </table>
-
-    <br>
-
-    <table width="100">
-        <tr>
-            <td>
-                <a href="add.jsp"><input type="button" value="Add" name="Add"/></a>
-            </td>
-            <td>&nbsp;</td>
-            <input type="hidden" name="operation" value="deleteUser">
-            <td><input type="button" value="Delete" onclick="doProcess()"></td>
-        </tr>
-    </table>
-
-</form>
-
-
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/ddc76d60/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/password.jsp
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/password.jsp
b/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/password.jsp
deleted file mode 100644
index 9a316ee..0000000
--- a/modules/credential-store/credential-store-webapp/src/main/webapp/user-store/password.jsp
+++ /dev/null
@@ -1,157 +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.
---%>
-
-<%@ page import="org.apache.airavata.credentialstore.local.LocalUserStore" %>
-
-<%
-    String userName = request.getParameter("username");
-    if (userName == null) {
-        response.sendRedirect("index.jsp");
-    }
-
-    String password = request.getParameter("newPassword");
-    String confirmPassword = request.getParameter("confirmPassword");
-
-    if (password != null && confirmPassword != null && password.equals(confirmPassword))
{
-        LocalUserStore localUserStore = (LocalUserStore)session.getAttribute("LocalUserStore");
-        localUserStore.changePasswordByAdmin(userName, password);
-
-        response.sendRedirect("password.jsp?message=\"Password successfully change for user
"
-                + userName + "\"&username=" + userName);
-    }
-
-%>
-
-<html>
-<head>
-    <script language="javascript" type="text/javascript">
-        function validatePassword(fld1name, regString) {
-            var stringValue = document.getElementsByName(fld1name)[0].value;
-            var errorMessage = "";
-            if(regString != "null" && !stringValue.match(new RegExp(regString))){
-                errorMessage = "Password does not meet minimum requirements. Password length
must be at least 6 " +
-                        "characters.";
-                return errorMessage;
-            }else if(regString != "null" && stringValue == ''){
-                return errorMessage;
-            }
-
-            if (stringValue == '') {
-                errorMessage = "Empty passwords are not allowed. Please enter a valid password";
-                return errorMessage;
-            }
-
-            return errorMessage;
-        }
-
-        function validateUsername(fld1name) {
-            var stringValue = document.getElementsByName(fld1name)[0].value;
-            var errorMessage = "";
-
-            if (stringValue == '') {
-                errorMessage = "Empty user names are not allowed. Please enter a valid user
name.";
-                return errorMessage;
-            }
-
-            return errorMessage;
-        }
-
-        function checkPasswordsMatching(fld1name, fld2name) {
-
-            var stringValue1 = document.getElementsByName(fld1name)[0].value;
-            var stringValue2 = document.getElementsByName(fld2name)[0].value;
-            var errorMessage = "";
-
-            if (stringValue1 != stringValue2) {
-                errorMessage = "Confirm password does not match with the password. Please
re-enter passwords.";
-                return errorMessage;
-            }
-
-            return errorMessage;
-
-        }
-
-        function validate() {
-            var reason = "";
-
-            reason = validatePassword("newPassword", <%=LocalUserStore.getPasswordRegularExpression()%>);
-
-            if (reason != "") {
-                alert(reason);
-                document.getElementsByName("newPassword")[0].clear();
-                return false;
-            }
-
-            reason = checkPasswordsMatching("newPassword", "confirmPassword");
-
-            if (reason != "") {
-                alert(reason);
-                document.getElementsByName("newPassword")[0].clear();
-                document.getElementsByName("confirmPassword")[0].clear();
-                return false;
-            }
-
-            return true;
-        }
-
-        function doProcess() {
-            if (validate() == true) {
-                document.passwordForm.submit();
-            }
-        }
-
-        function displayMessage() {
-            var msg = <%=request.getParameter("message")%>;
-            if (msg != null) {
-                alert(msg);
-            }
-        }
-
-
-    </script>
-</head>
-
-<body onload="displayMessage()">
-<img src="../images/airavata-logo-2.png">
-<h2>Airavata REST API - Local User Store</h2>
-<p><b>Manage Local User Store - Change Password of user - <%=userName%></b></p>
-
-<form action="password.jsp" name="passwordForm" method="POST">
-
-    <input type="hidden" name="username" value="<%=userName%>">
-    <table>
-        <tr>
-            <td>New Password</td>
-            <td><input type="password" name="newPassword"/></td>
-        </tr>
-        <tr>
-            <td>Re-Type Password</td>
-            <td><input type="password" name="confirmPassword"/></td>
-        </tr>
-    </table>
-
-    <table>
-        <tr>
-            <td><input type="button" value="Change" onclick= 'doProcess()'></td>
-            <td><a href="index.jsp"><input type="button" value="Cancel" name="Cancel"/>
</a> </td>
-        </tr>
-    </table>
-
-</form>
-
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/ddc76d60/modules/credential-store/pom.xml
----------------------------------------------------------------------
diff --git a/modules/credential-store/pom.xml b/modules/credential-store/pom.xml
index 3c4ec0e..550b153 100644
--- a/modules/credential-store/pom.xml
+++ b/modules/credential-store/pom.xml
@@ -26,7 +26,6 @@
     <modules>
         <module>credential-store-service</module>
         <module>credential-store-stubs</module>
-        <module>credential-store-webapp</module>
     </modules>
 
     <properties>


Mime
View raw message