diff --git a/components/application-mgt/org.wso2.carbon.identity.application.mgt.ui/src/main/resources/web/application/configure-service-provider.jsp b/components/application-mgt/org.wso2.carbon.identity.application.mgt.ui/src/main/resources/web/application/configure-service-provider.jsp index a606cfab8264..30f6944d6561 100644 --- a/components/application-mgt/org.wso2.carbon.identity.application.mgt.ui/src/main/resources/web/application/configure-service-provider.jsp +++ b/components/application-mgt/org.wso2.carbon.identity.application.mgt.ui/src/main/resources/web/application/configure-service-provider.jsp @@ -17,28 +17,28 @@ --> <%@page import="org.apache.axis2.context.ConfigurationContext"%> +<%@ page import="org.apache.commons.collections.CollectionUtils"%> +<%@ page import="org.owasp.encoder.Encode"%> <%@ page import="org.wso2.carbon.CarbonConstants"%> <%@ page import="org.wso2.carbon.identity.application.common.model.xsd.IdentityProvider"%> -<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.LocalAuthenticatorConfig"%> -<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.ProvisioningConnectorConfig"%> -<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.RequestPathAuthenticatorConfig"%> +<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationRequestConfig"%> <%@ page - import="org.wso2.carbon.identity.application.mgt.ui.ApplicationBean"%> -<%@ page import="org.wso2.carbon.identity.application.mgt.ui.client.ApplicationManagementServiceClient"%> -<%@ page import="org.wso2.carbon.identity.application.mgt.ui.util.ApplicationMgtUIUtil"%> -<%@page import="org.wso2.carbon.ui.CarbonUIMessage"%> + import="org.wso2.carbon.identity.application.common.model.xsd.LocalAuthenticatorConfig"%> +<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.Property"%> +<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.ProvisioningConnectorConfig"%> +<%@page import="org.wso2.carbon.identity.application.common.model.xsd.RequestPathAuthenticatorConfig"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="carbon" uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar"%> +<%@ page import="org.wso2.carbon.identity.application.mgt.ui.ApplicationBean" %> +<%@ page import="org.wso2.carbon.identity.application.mgt.ui.client.ApplicationManagementServiceClient" %> +<%@page import="org.wso2.carbon.identity.application.mgt.ui.util.ApplicationMgtUIUtil"%> +<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %> <%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %> <%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@page import="java.util.HashMap"%> +<%@ page import="java.util.ArrayList" %> +<%@ page import="java.util.HashMap" %> <%@ page import="java.util.List" %> <%@ page import="java.util.Map" %> -<%@ page import="org.owasp.encoder.Encode" %> -<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationRequestConfig" %> -<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.Property" %> -<%@ page import="org.apache.commons.collections.CollectionUtils" %> -<%@ page import="java.util.ArrayList" %> ', + data: $("#configure-sp-form").serialize(), + success: function () { + $.ajax({ + type: 'POST', + url: postURL, + headers: { + Accept: "text/html" + }, + data: data, + async: false, + success: function (responseText, status) { + if (status == "success") { + location.assign(redirectURLOnSuccess); + } + } + }); + } + }); +} + function onSamlSsoClick() { var spName = document.getElementById("oldSPName").value; if( spName != '') { @@ -1319,7 +1352,9 @@ var roleMappinRowID = -1; class="icon-link" style="background-image: url(../admin/images/edit.gif)">Change Password Delete @@ -1344,6 +1379,7 @@ var roleMappinRowID = -1; standardInboundAuthTypes.add("samlsso"); standardInboundAuthTypes.add("openid"); standardInboundAuthTypes.add("passivests"); + standardInboundAuthTypes.add("kerberos"); if (!CollectionUtils.isEmpty(appBean.getInboundAuthenticators())) { List customAuthenticators = appBean diff --git a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/pom.xml b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/pom.xml index 8f162ea2eac9..d749afc06a3d 100644 --- a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/pom.xml +++ b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/pom.xml @@ -44,6 +44,10 @@ org.wso2.carbon org.wso2.carbon.logging + + org.wso2.carbon + org.wso2.carbon.ui + org.wso2.carbon.identity org.wso2.carbon.directory.server.manager.stub diff --git a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-finish.jsp b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-finish-ajaxprocessor.jsp similarity index 95% rename from components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-finish.jsp rename to components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-finish-ajaxprocessor.jsp index b308db628593..6e893e960e5d 100644 --- a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-finish.jsp +++ b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-finish-ajaxprocessor.jsp @@ -27,6 +27,12 @@ <%@ page import="org.owasp.encoder.Encode" %> <% + String httpMethod = request.getMethod(); + if (!"post".equalsIgnoreCase(httpMethod)) { + response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED); + return; + } + String servicePrincipleName = request.getParameter("serviceName"); String description = request.getParameter("serviceDescription"); String password = request.getParameter("password"); diff --git a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-step1.jsp b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-step1.jsp index 4e050985d77f..2a9c1404c74a 100644 --- a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-step1.jsp +++ b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/add-step1.jsp @@ -136,7 +136,7 @@ function doFinish() { - document.dataForm.action = "add-finish.jsp"; + document.dataForm.action = "add-finish-ajaxprocessor.jsp"; if (doValidation() == true) { document.dataForm.submit(); } @@ -148,7 +148,7 @@
-
+ diff --git a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd-finish.jsp b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd-finish-ajaxprocessor.jsp similarity index 95% rename from components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd-finish.jsp rename to components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd-finish-ajaxprocessor.jsp index 5764fe8a63f3..d9483e539362 100644 --- a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd-finish.jsp +++ b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd-finish-ajaxprocessor.jsp @@ -27,6 +27,12 @@ <%@ page import="org.owasp.encoder.Encode" %> <% + String httpMethod = request.getMethod(); + if (!"post".equalsIgnoreCase(httpMethod)) { + response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED); + return; + } + String servicePrincipleName = request.getParameter("spnName"); String oldPassword = request.getParameter("currentPassword"); String newPassword = request.getParameter("newPassword"); diff --git a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd.jsp b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd.jsp index 05e022bb260f..06ed48b16d2c 100644 --- a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd.jsp +++ b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/change-passwd.jsp @@ -97,11 +97,11 @@
-

<%=Encode.forHml(spnName)%>

+

<%=Encode.forHtml(spnName)%>

+ onsubmit="return doValidation();" action="change-passwd-finish-ajaxprocessor.jsp">
diff --git a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/delete-finish.jsp b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/delete-finish-ajaxprocessor.jsp similarity index 95% rename from components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/delete-finish.jsp rename to components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/delete-finish-ajaxprocessor.jsp index 2d4f7b00dd52..b053f05c2e59 100644 --- a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/delete-finish.jsp +++ b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/delete-finish-ajaxprocessor.jsp @@ -27,6 +27,12 @@ <%@ page import="org.owasp.encoder.Encode" %> <% + String httpMethod = request.getMethod(); + if (!"post".equalsIgnoreCase(httpMethod)) { + response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED); + return; + } + String spName = request.getParameter("spName"); String servicePrincipleName = request.getParameter("spnName"); diff --git a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/index.jsp b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/index.jsp index 75c5e48e4041..dce2739eb5d4 100644 --- a/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/index.jsp +++ b/components/directory-server-manager/org.wso2.carbon.directory.server.manager.ui/src/main/resources/web/servicestore/index.jsp @@ -19,18 +19,18 @@ <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %> <%@page import="org.apache.axis2.context.ConfigurationContext" %> +<%@page import="org.owasp.encoder.Encode" %> <%@page import="org.wso2.carbon.CarbonConstants" %> <%@page import="org.wso2.carbon.directory.common.stub.types.ServerPrinciple" %> -<%@page import="org.wso2.carbon.directory.server.manager.ui.DirectoryServerManagerClient" %> -<%@page import="org.wso2.carbon.ui.CarbonUIMessage"%> +<%@page import="org.wso2.carbon.directory.server.manager.ui.DirectoryServerManagerClient"%> +<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %> <%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %> <%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page import="org.owasp.encoder.Encode" %> - - - + + + @@ -47,11 +47,25 @@ function deleteServicePrinciple(spn) { - function doDelete(){ - var spnName = spn; - location.href = 'delete-finish.jsp?spnName=' + spnName; + function doDelete() { + + $.ajax({ + type: 'POST', + url: 'delete-finish-ajaxprocessor.jsp', + headers: { + Accept: "text/html" + }, + data: 'spnName=' + spn, + async: false, + success: function (responseText, status) { + if (status == "success") { + location.assign("index.jsp"); + } + } + }); } - CARBON.showConfirmationDialog(" \'"+ spn + "\'?", doDelete, null); + + CARBON.showConfirmationDialog('' + spn + '?', doDelete, null); } function changeSpnPassword(spn) { @@ -155,9 +169,15 @@ diff --git a/components/directory-server-manager/org.wso2.carbon.directory.server.manager/src/main/java/org/wso2/carbon/directory/server/manager/internal/LDAPServerManagerConstants.java b/components/directory-server-manager/org.wso2.carbon.directory.server.manager/src/main/java/org/wso2/carbon/directory/server/manager/internal/LDAPServerManagerConstants.java index 36ed77d63b6b..f55a88e56e8e 100644 --- a/components/directory-server-manager/org.wso2.carbon.directory.server.manager/src/main/java/org/wso2/carbon/directory/server/manager/internal/LDAPServerManagerConstants.java +++ b/components/directory-server-manager/org.wso2.carbon.directory.server.manager/src/main/java/org/wso2/carbon/directory/server/manager/internal/LDAPServerManagerConstants.java @@ -26,7 +26,7 @@ public class LDAPServerManagerConstants { public static final String SERVICE_PASSWORD_REGEX_PROPERTY = "ServicePasswordJavaRegEx"; public static final String SERVICE_PRINCIPLE_NAME_REGEX_PROPERTY = "ServiceNameJavaRegEx"; - public static final String DEFAULT_PASSWORD_REGULAR_EXPRESSION = "[\\\\S]{5,30}"; + public static final String DEFAULT_PASSWORD_REGULAR_EXPRESSION = "[\\S]{5,30}"; public static final String DEFAULT_SERVICE_NAME_REGULAR_EXPRESSION = "[a-zA-Z\\d]{2,10}/[a-zA-Z]{2,30}"; public static final String SERVER_PRINCIPAL_ATTRIBUTE_VALUE = "Service"; public static final String SERVER_PRINCIPAL_ATTRIBUTE_NAME = "sn";
<%=Encode.forHtml(principle.getServerName())%> <%=Encode.forHtml(principle.getServerDescription())%> - +   - +