This commit is contained in:
Crystal.Sea
2021-09-24 14:37:15 +08:00
parent 5f4c44ec59
commit 2fdd018239
114 changed files with 451 additions and 812 deletions

View File

@@ -18,7 +18,7 @@
application.title =MaxKey
#for dynamic service discovery
spring.application.name =maxkey-monitor
application.formatted-version =v2.9.0 GA
application.formatted-version =v3.0.0 GA
#nacos
spring.cloud.nacos.discovery.enabled =${NACOS_DISCOVERY_ENABLED:false}
spring.cloud.nacos.discovery.instance-enabled =false

View File

@@ -25,7 +25,6 @@ import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.maxkey.util.StringUtils;
import org.maxkey.web.WebConstants;
@@ -47,7 +46,6 @@ public class SingleSignOnFilter implements Filter {
ServletResponse response, FilterChain chain)throws IOException, ServletException {
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
HttpServletResponse httpServletResponse = (HttpServletResponse) response;
HttpSession session = httpServletRequest.getSession();
// 浠巗ession涓幏鍙栧瓨鏀剧殑appid
String appId = (String) session.getAttribute(WebConstants.SINGLE_SIGN_ON_APP_ID);

View File

@@ -21,11 +21,7 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.mybatis.jpa.persistence.JpaPageResults;
import org.maxkey.entity.HistoryLogin;
import org.maxkey.entity.HistoryLoginApps;
import org.maxkey.entity.HistoryLogs;
import org.maxkey.persistence.service.HistoryLoginAppsService;
import org.maxkey.persistence.service.HistoryLoginService;
import org.maxkey.persistence.service.HistorySystemLogsService;
import org.maxkey.util.DateUtils;
import org.maxkey.web.WebContext;
import org.slf4j.Logger;

View File

@@ -21,7 +21,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.maxkey.authn.SigninPrincipal;
import org.maxkey.authz.endpoint.AuthorizeBaseEndpoint;
import org.maxkey.entity.HistoryLoginApps;
import org.maxkey.entity.UserInfo;
import org.maxkey.entity.apps.Apps;

View File

@@ -20,7 +20,6 @@ package org.maxkey.web.interceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.maxkey.entity.UserInfo;
import org.maxkey.web.WebConstants;
import org.maxkey.web.WebContext;
import org.slf4j.Logger;
@@ -38,7 +37,6 @@ public class PreLoginAppAdapter implements AsyncHandlerInterceptor {
HttpServletResponse response, Object handler)
throws Exception {
_logger.debug("preHandle");
UserInfo userInfo = WebContext.getUserInfo();
String redirect_uri = request.getRequestURL().toString();
String appId = getAppIdFromRequestUrl(request);
_logger.debug("preHandle app Id " + appId);
@@ -47,6 +45,7 @@ public class PreLoginAppAdapter implements AsyncHandlerInterceptor {
return true;
}
/*
* UserInfo userInfo = WebContext.getUserInfo();
* if(userInfo.getProtectedAppsMap().get(appId)!=null){
*
* request.setAttribute("redirect_uri",redirect_uri);

View File

@@ -16,7 +16,7 @@
#MaxKey Title and Version #
############################################################################
application.title =MaxKey
application.formatted-version =v2.9.0 GA
application.formatted-version =v3.0.0 GA
#for dynamic service discovery
spring.application.name =maxkey
############################################################################

View File

@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<title>MaxKey</title>
<title><@locale code="global.title"/></title>
<base href="<@base />"/>
<link rel="shortcut icon" type="image/x-icon" href="<@base />/static/images/favicon.ico"/>
<link type="text/css" rel="stylesheet" href="<@base url="/style.css"/>" />

View File

@@ -27,8 +27,6 @@ import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class DynamicGroupsJob implements Job , Serializable {
/**
*

View File

@@ -17,7 +17,6 @@
package org.maxkey.web.api.endpoint;
import org.maxkey.crypto.password.PasswordReciprocal;
import org.maxkey.entity.UserInfo;
import org.maxkey.password.onetimepwd.AbstractOtpAuthn;
import org.maxkey.persistence.service.UserInfoService;

View File

@@ -17,8 +17,6 @@
package org.maxkey.web.apps.contorller;
import java.util.List;
import org.maxkey.constants.ConstantsOperateMessage;
import org.maxkey.constants.ConstantsProtocols;
import org.maxkey.crypto.ReciprocalUtils;

View File

@@ -17,8 +17,6 @@
package org.maxkey.web.apps.contorller;
import java.util.List;
import org.maxkey.constants.ConstantsOperateMessage;
import org.maxkey.constants.ConstantsProtocols;
import org.maxkey.crypto.ReciprocalUtils;

View File

@@ -17,8 +17,6 @@
package org.maxkey.web.apps.contorller;
import java.util.List;
import org.maxkey.constants.ConstantsOperateMessage;
import org.maxkey.constants.ConstantsProtocols;
import org.maxkey.crypto.ReciprocalUtils;

View File

@@ -17,8 +17,6 @@
package org.maxkey.web.apps.contorller;
import java.util.List;
import org.maxkey.authz.oauth2.provider.client.JdbcClientDetailsService;
import org.maxkey.constants.ConstantsOperateMessage;
import org.maxkey.constants.ConstantsProtocols;

View File

@@ -30,7 +30,6 @@ import org.maxkey.configuration.ApplicationConfig;
import org.maxkey.constants.ConstantsOperateMessage;
import org.maxkey.constants.ConstantsProtocols;
import org.maxkey.crypto.ReciprocalUtils;
import org.maxkey.crypto.cert.NameUtil;
import org.maxkey.crypto.cert.X509CertUtils;
import org.maxkey.crypto.keystore.KeyStoreLoader;
import org.maxkey.crypto.keystore.KeyStoreUtil;
@@ -182,7 +181,7 @@ public class SAML20DetailsController extends BaseAppContorller {
samlDetails.setCertSubject(samlDetails.getTrustCert().getSubjectDN().getName());
samlDetails.setCertExpiration(samlDetails.getTrustCert().getNotAfter().toString());
samlDetails.setCertIssuer(NameUtil.getCommonName(samlDetails.getTrustCert().getIssuerX500Principal()));
samlDetails.setCertIssuer(X509CertUtils.getCommonName(samlDetails.getTrustCert().getIssuerX500Principal()));
KeyStore keyStore = KeyStoreUtil.clone(idpKeyStoreLoader.getKeyStore(),idpKeyStoreLoader.getKeystorePassword());

View File

@@ -21,7 +21,6 @@ import org.apache.mybatis.jpa.persistence.JpaPageResults;
import org.maxkey.constants.ConstantsOperateMessage;
import org.maxkey.entity.GroupMember;
import org.maxkey.entity.Groups;
import org.maxkey.entity.UserInfo;
import org.maxkey.persistence.service.GroupMemberService;
import org.maxkey.persistence.service.GroupsService;
import org.maxkey.web.WebContext;

View File

@@ -16,7 +16,7 @@
#MaxKey Title and Version #
############################################################################
application.title =MaxKey-Mgt
application.formatted-version =v2.9.0 GA
application.formatted-version =v3.0.0 GA
#for dynamic service discovery
spring.application.name =maxkey-mgt
############################################################################

View File

@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<title>MaxKey</title>
<title><@locale code="global.title"/></title>
<base href="<@base />"/>
<link rel="shortcut icon" type="image/x-icon" href="<@base />/static/images/favicon.ico"/>
<link type="text/css" rel="stylesheet" href="<@base url="/style.css"/>" />

View File

@@ -90,11 +90,10 @@ header .header-container .nav-left>li, .header .header-container .nav-right>li {
}
.sidenav-fold-toggler{
text-align: inherit;
}
[class^=lni-], [class*=" lni-"] {
font-family: lineicons!important;
speak: none;
font-style: normal;
font-weight: 400;
font-variant: normal;
@@ -251,7 +250,7 @@ header .header-container .nav-left>li, .header .header-container .nav-right>li {
text-shadow: 0 1px 0 #fff;
border-bottom: 1px solid #e5e5e5;
min-width: 100%;
align:left;
text-align:left;
height:60px;
margin-bottom: 1px;
}
@@ -272,6 +271,7 @@ header .header-container .nav-left>li, .header .header-container .nav-right>li {
}
#nav_third{
/*border-top: 1px solid #e5e5e5;*/
text-align: inherit;
}
#mainFrame{
@@ -280,7 +280,7 @@ header .header-container .nav-left>li, .header .header-container .nav-right>li {
margin-right: auto;
display: block;
width:990px;
align:center;
text-align:center
}
#footer{
@@ -465,14 +465,13 @@ header .header-container .nav-left>li, .header .header-container .nav-right>li {
.switch_tab{
list-style: none;
border: 0;
cellspacing:0;
border-collapse:collapse
}
.switch_tab_class{
float:left;
height:36px;
text-align: center;
display: inline-block;
}
.switch_tab_class a{
@@ -496,7 +495,7 @@ header .header-container .nav-left>li, .header .header-container .nav-right>li {
#tableform{
border: 1px solid #e9eeed;
cellspacing:0;
border-collapse:collapse
}
.login_form_table{