mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 17:38:32 +08:00
v1.3 RC
This commit is contained in:
parent
b7db556e23
commit
fe2d3ed797
@ -5,94 +5,90 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@PropertySource("classpath:/config/applicationLogin.properties")
|
@PropertySource("classpath:/config/applicationConfig.properties")
|
||||||
public class LoginConfig {
|
public class LoginConfig {
|
||||||
@Value("${config.login.captcha}")
|
@Value("${config.login.captcha}")
|
||||||
boolean captcha;
|
boolean captcha;
|
||||||
@Value("${config.login.onetimepwd}")
|
@Value("${config.login.onetimepwd}")
|
||||||
boolean oneTimePwd;
|
boolean oneTimePwd;
|
||||||
@Value("${config.login.socialsignon}")
|
@Value("${config.login.socialsignon}")
|
||||||
boolean socialSignOn;
|
boolean socialSignOn;
|
||||||
@Value("${config.login.kerberos}")
|
@Value("${config.login.kerberos}")
|
||||||
boolean kerberos;
|
boolean kerberos;
|
||||||
@Value("${config.login.remeberme}")
|
@Value("${config.login.remeberme}")
|
||||||
boolean remeberMe;
|
boolean remeberMe;
|
||||||
@Value("${config.login.wsfederation}")
|
@Value("${config.login.wsfederation}")
|
||||||
boolean wsFederation;
|
boolean wsFederation;
|
||||||
@Value("${config.login.default.uri}")
|
@Value("${config.login.default.uri}")
|
||||||
String defaultUri;
|
String defaultUri;
|
||||||
|
|
||||||
|
/**
|
||||||
/**
|
* .
|
||||||
*
|
*/
|
||||||
*/
|
public LoginConfig() {
|
||||||
public LoginConfig() {
|
// TODO Auto-generated constructor stub
|
||||||
// TODO Auto-generated constructor stub
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCaptcha() {
|
public boolean isCaptcha() {
|
||||||
return captcha;
|
return captcha;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCaptcha(boolean captcha) {
|
public void setCaptcha(boolean captcha) {
|
||||||
this.captcha = captcha;
|
this.captcha = captcha;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isOneTimePwd() {
|
||||||
|
return oneTimePwd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOneTimePwd(boolean oneTimePwd) {
|
||||||
|
this.oneTimePwd = oneTimePwd;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isOneTimePwd() {
|
public boolean isSocialSignOn() {
|
||||||
return oneTimePwd;
|
return socialSignOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOneTimePwd(boolean oneTimePwd) {
|
public void setSocialSignOn(boolean socialSignOn) {
|
||||||
this.oneTimePwd = oneTimePwd;
|
this.socialSignOn = socialSignOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSocialSignOn() {
|
public boolean isKerberos() {
|
||||||
return socialSignOn;
|
return kerberos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSocialSignOn(boolean socialSignOn) {
|
public void setKerberos(boolean kerberos) {
|
||||||
this.socialSignOn = socialSignOn;
|
this.kerberos = kerberos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isKerberos() {
|
public String getDefaultUri() {
|
||||||
return kerberos;
|
return defaultUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKerberos(boolean kerberos) {
|
public void setDefaultUri(String defaultUri) {
|
||||||
this.kerberos = kerberos;
|
this.defaultUri = defaultUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDefaultUri() {
|
public boolean isRemeberMe() {
|
||||||
return defaultUri;
|
return remeberMe;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDefaultUri(String defaultUri) {
|
public void setRemeberMe(boolean remeberMe) {
|
||||||
this.defaultUri = defaultUri;
|
this.remeberMe = remeberMe;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRemeberMe() {
|
public boolean isWsFederation() {
|
||||||
return remeberMe;
|
return wsFederation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRemeberMe(boolean remeberMe) {
|
public void setWsFederation(boolean wsFederation) {
|
||||||
this.remeberMe = remeberMe;
|
this.wsFederation = wsFederation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWsFederation() {
|
|
||||||
return wsFederation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWsFederation(boolean wsFederation) {
|
@Override
|
||||||
this.wsFederation = wsFederation;
|
public String toString() {
|
||||||
}
|
return "LoginConfig [captcha=" + captcha + ", oneTimePwd=" + oneTimePwd + ", socialSignOn=" + socialSignOn
|
||||||
|
+ ", kerberos=" + kerberos + ", remeberMe=" + remeberMe + ", wsFederation=" + wsFederation
|
||||||
@Override
|
+ ", defaultUri=" + defaultUri + "]";
|
||||||
public String toString() {
|
}
|
||||||
return "LoginConfig [captcha=" + captcha + ", oneTimePwd=" + oneTimePwd
|
|
||||||
+ ", socialSignOn=" + socialSignOn + ", kerberos=" + kerberos
|
|
||||||
+ ", remeberMe=" + remeberMe + ", wsFederation=" + wsFederation
|
|
||||||
+ ", defaultUri=" + defaultUri + "]";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,144 +32,154 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
|
|||||||
*/
|
*/
|
||||||
public class InitApplicationContext extends HttpServlet {
|
public class InitApplicationContext extends HttpServlet {
|
||||||
private static final Logger _logger = LoggerFactory.getLogger(InitApplicationContext.class);
|
private static final Logger _logger = LoggerFactory.getLogger(InitApplicationContext.class);
|
||||||
|
private static final long serialVersionUID = -797399138268601444L;
|
||||||
ApplicationContext applicationContext;
|
ApplicationContext applicationContext;
|
||||||
|
Properties properties;
|
||||||
/**
|
|
||||||
*
|
@Override
|
||||||
|
public String getServletInfo() {
|
||||||
|
return super.getServletInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(ServletConfig config) throws ServletException {
|
||||||
|
super.init(config);
|
||||||
|
|
||||||
|
// List Environment Variables
|
||||||
|
listEnvVars();
|
||||||
|
|
||||||
|
listProperties();
|
||||||
|
|
||||||
|
// List DatabaseMetaData Variables
|
||||||
|
listDataBaseVariables();
|
||||||
|
|
||||||
|
// load caches
|
||||||
|
loadCaches();
|
||||||
|
|
||||||
|
// Show License
|
||||||
|
showLicense();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* InitApplicationContext.
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -797399138268601444L;
|
public InitApplicationContext() {
|
||||||
|
this.applicationContext = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
public InitApplicationContext(ConfigurableApplicationContext applicationContext) {
|
||||||
public String getServletInfo() {
|
this.applicationContext = applicationContext;
|
||||||
return super.getServletInfo();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
public void loadCaches() {
|
||||||
public void init(ServletConfig config) throws ServletException {
|
_logger.info(
|
||||||
super.init(config);
|
"----------------------------------------------------------------------------------------------------");
|
||||||
|
_logger.info("Load Caches ");
|
||||||
//List Environment Variables
|
|
||||||
listEnvVars();
|
|
||||||
|
|
||||||
listProperties();
|
|
||||||
|
|
||||||
//List DatabaseMetaData Variables
|
|
||||||
listDataBaseVariables();
|
|
||||||
|
|
||||||
//load caches
|
|
||||||
loadCaches();
|
|
||||||
|
|
||||||
//Show License
|
|
||||||
showLicense();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
try {
|
||||||
*
|
if (applicationContext.containsBean("cacheFactory")) {
|
||||||
*/
|
CacheFactory cacheFactory = applicationContext.getBean("cacheFactory", CacheFactory.class);
|
||||||
public InitApplicationContext() {
|
cacheFactory.start();
|
||||||
this.applicationContext=WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
|
}
|
||||||
}
|
} catch (BeansException e) {
|
||||||
|
e.printStackTrace();
|
||||||
public InitApplicationContext(ConfigurableApplicationContext applicationContext) {
|
}
|
||||||
this.applicationContext=applicationContext;
|
_logger.info(
|
||||||
}
|
"----------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
public void loadCaches(){
|
}
|
||||||
_logger.info("----------------------------------------------------------------------------------------------------");
|
|
||||||
_logger.info("Load Caches ");
|
public void listDataBaseVariables() {
|
||||||
|
if (applicationContext.containsBean("dataSource")) {
|
||||||
try {
|
try {
|
||||||
if(applicationContext.containsBean("cacheFactory")){
|
_logger.debug(
|
||||||
CacheFactory cacheFactory=applicationContext.getBean("cacheFactory", CacheFactory.class);
|
"----------------------------------------------------------------------------------------------------");
|
||||||
cacheFactory.start();
|
_logger.debug("List DatabaseMetaData Variables ");
|
||||||
}
|
Connection connection = ((javax.sql.DataSource) applicationContext.getBean("dataSource"))
|
||||||
} catch (BeansException e) {
|
.getConnection();
|
||||||
e.printStackTrace();
|
|
||||||
}
|
java.sql.DatabaseMetaData databaseMetaData = connection.getMetaData();
|
||||||
_logger.info("----------------------------------------------------------------------------------------------------");
|
_logger.debug("DatabaseProductName : " + databaseMetaData.getDatabaseProductName());
|
||||||
|
_logger.debug("DatabaseProductVersion: " + databaseMetaData.getDatabaseProductVersion());
|
||||||
}
|
_logger.debug("DatabaseMajorVersion : " + databaseMetaData.getDatabaseMajorVersion());
|
||||||
public void listDataBaseVariables(){
|
_logger.debug("DatabaseMinorVersion : " + databaseMetaData.getDatabaseMinorVersion());
|
||||||
if(applicationContext.containsBean("dataSource")){
|
_logger.debug("supportsTransactions : " + databaseMetaData.supportsTransactions());
|
||||||
try {
|
_logger.debug("DefaultTransaction : " + databaseMetaData.getDefaultTransactionIsolation());
|
||||||
_logger.debug("----------------------------------------------------------------------------------------------------");
|
_logger.debug("MaxConnections : " + databaseMetaData.getMaxConnections());
|
||||||
_logger.debug("List DatabaseMetaData Variables ");
|
_logger.debug("");
|
||||||
Connection connection = ((javax.sql.DataSource)applicationContext.getBean("dataSource")).getConnection();
|
_logger.debug("JDBCMajorVersion : " + databaseMetaData.getJDBCMajorVersion());
|
||||||
|
_logger.debug("JDBCMinorVersion : " + databaseMetaData.getJDBCMinorVersion());
|
||||||
java.sql.DatabaseMetaData databaseMetaData = connection.getMetaData();
|
_logger.debug("DriverName : " + databaseMetaData.getDriverName());
|
||||||
_logger.debug("DatabaseProductName : " + databaseMetaData.getDatabaseProductName());
|
_logger.debug("DriverVersion : " + databaseMetaData.getDriverVersion());
|
||||||
_logger.debug("DatabaseProductVersion: " + databaseMetaData.getDatabaseProductVersion());
|
_logger.debug("");
|
||||||
_logger.debug("DatabaseMajorVersion : " + databaseMetaData.getDatabaseMajorVersion());
|
_logger.debug("DBMS URL : " + databaseMetaData.getURL());
|
||||||
_logger.debug("DatabaseMinorVersion : " + databaseMetaData.getDatabaseMinorVersion());
|
_logger.debug("UserName : " + databaseMetaData.getUserName());
|
||||||
_logger.debug("supportsTransactions : " + databaseMetaData.supportsTransactions());
|
_logger.debug(
|
||||||
_logger.debug("DefaultTransaction : " + databaseMetaData.getDefaultTransactionIsolation());
|
"----------------------------------------------------------------------------------------------------");
|
||||||
_logger.debug("MaxConnections : " + databaseMetaData.getMaxConnections());
|
} catch (SQLException e) {
|
||||||
_logger.debug("");
|
e.printStackTrace();
|
||||||
_logger.debug("JDBCMajorVersion : " + databaseMetaData.getJDBCMajorVersion());
|
}
|
||||||
_logger.debug("JDBCMinorVersion : " + databaseMetaData.getJDBCMinorVersion());
|
}
|
||||||
_logger.debug("DriverName : " + databaseMetaData.getDriverName());
|
}
|
||||||
_logger.debug("DriverVersion : " + databaseMetaData.getDriverVersion());
|
|
||||||
_logger.debug("");
|
// propertySourcesPlaceholderConfigurer
|
||||||
_logger.debug("DBMS URL : " + databaseMetaData.getURL());
|
public void listProperties() {
|
||||||
_logger.debug("UserName : " + databaseMetaData.getUserName());
|
if (applicationContext.containsBean("propertySourcesPlaceholderConfigurer")) {
|
||||||
_logger.debug("----------------------------------------------------------------------------------------------------");
|
_logger.debug(
|
||||||
} catch (SQLException e) {
|
"----------------------------------------------------------------------------------------------------");
|
||||||
e.printStackTrace();
|
_logger.debug("List Properties Variables ");
|
||||||
}
|
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = ((PropertySourcesPlaceholderConfigurer) applicationContext
|
||||||
}
|
.getBean("propertySourcesPlaceholderConfigurer"));
|
||||||
}
|
properties = (Properties) propertySourcesPlaceholderConfigurer.getAppliedPropertySources()
|
||||||
|
.get(PropertySourcesPlaceholderConfigurer.LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME).getSource();
|
||||||
//propertySourcesPlaceholderConfigurer
|
Set<Object> keyValue = properties.keySet();
|
||||||
public void listProperties(){
|
SortedSet<String> keyValueSet = new TreeSet<String>();
|
||||||
if(applicationContext.containsBean("propertySourcesPlaceholderConfigurer")){
|
// sort key
|
||||||
_logger.debug("----------------------------------------------------------------------------------------------------");
|
for (Iterator<Object> it = keyValue.iterator(); it.hasNext();) {
|
||||||
_logger.debug("List Properties Variables ");
|
String key = (String) it.next();
|
||||||
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = ((PropertySourcesPlaceholderConfigurer)applicationContext.getBean("propertySourcesPlaceholderConfigurer"));
|
keyValueSet.add(key);
|
||||||
Properties properties=(Properties)propertySourcesPlaceholderConfigurer.getAppliedPropertySources().get(PropertySourcesPlaceholderConfigurer.LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME).getSource();
|
}
|
||||||
Set<Object> keyValue = properties.keySet();
|
// out
|
||||||
SortedSet<String> keyValueSet=new TreeSet<String>();
|
for (Iterator<String> it = keyValueSet.iterator(); it.hasNext();) {
|
||||||
//sort key
|
String key = (String) it.next();
|
||||||
for (Iterator<Object> it = keyValue.iterator(); it.hasNext();){
|
_logger.debug(key + " = " + properties.get(key));
|
||||||
String key = (String) it.next();
|
}
|
||||||
keyValueSet.add(key);
|
_logger.debug(
|
||||||
}
|
"----------------------------------------------------------------------------------------------------");
|
||||||
//out
|
}
|
||||||
for (Iterator<String> it = keyValueSet.iterator(); it.hasNext();){
|
}
|
||||||
String key = (String) it.next();
|
|
||||||
_logger.debug(key + " = " + properties.get(key));
|
public void listEnvVars() {
|
||||||
}
|
_logger.debug(
|
||||||
_logger.debug("----------------------------------------------------------------------------------------------------");
|
"----------------------------------------------------------------------------------------------------");
|
||||||
}
|
_logger.debug("List Environment Variables ");
|
||||||
}
|
Map<String, String> map = System.getenv();
|
||||||
|
SortedSet<String> keyValueSet = new TreeSet<String>();
|
||||||
public void listEnvVars() {
|
for (Iterator<String> itr = map.keySet().iterator(); itr.hasNext();) {
|
||||||
_logger.debug("----------------------------------------------------------------------------------------------------");
|
String key = itr.next();
|
||||||
_logger.debug("List Environment Variables ");
|
keyValueSet.add(key);
|
||||||
Map<String, String> map = System.getenv();
|
}
|
||||||
SortedSet<String> keyValueSet = new TreeSet<String>();
|
// out
|
||||||
for (Iterator<String> itr = map.keySet().iterator(); itr.hasNext();) {
|
for (Iterator<String> it = keyValueSet.iterator(); it.hasNext();) {
|
||||||
String key = itr.next();
|
String key = (String) it.next();
|
||||||
keyValueSet.add(key);
|
_logger.debug(key + " = " + map.get(key));
|
||||||
}
|
}
|
||||||
// out
|
_logger.debug("APP_HOME" + " = " + PathUtils.getInstance().getAppPath());
|
||||||
for (Iterator<String> it = keyValueSet.iterator(); it.hasNext();) {
|
_logger.debug(
|
||||||
String key = (String) it.next();
|
"----------------------------------------------------------------------------------------------------");
|
||||||
_logger.debug(key + " = " + map.get(key));
|
}
|
||||||
}
|
|
||||||
_logger.debug("APP_HOME" + " = " + PathUtils.getInstance().getAppPath());
|
public void showLicense() {
|
||||||
_logger.debug("----------------------------------------------------------------------------------------------------");
|
_logger.info(
|
||||||
}
|
"----------------------------------------------------------------------------------------------------");
|
||||||
|
_logger.info("+ Single Sign On ( SSO ) ");
|
||||||
public void showLicense(){
|
_logger.info("+ MaxKey Version "+properties.getProperty("application.formatted-version"));
|
||||||
_logger.info("----------------------------------------------------------------------------------------------------");
|
_logger.info("");
|
||||||
_logger.info("+ Single Sign On ( SSO ) ");
|
_logger.info("+ Apache License 2.0");
|
||||||
_logger.info("+ MaxKey Version v1.3 GA");
|
_logger.info("+ https://shimingxy.github.io/MaxKey/");
|
||||||
_logger.info("");
|
_logger.info("+ email:shimingxy@163.com");
|
||||||
_logger.info("+ Apache License 2.0");
|
_logger.info(
|
||||||
_logger.info("+ https://github.com/shimingxy/MaxKey");
|
"----------------------------------------------------------------------------------------------------");
|
||||||
_logger.info("+ email:shimingxy@163.com");
|
}
|
||||||
_logger.info("----------------------------------------------------------------------------------------------------");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,7 +63,27 @@ config.email.smtpHost=smtp.exmail.qq.com
|
|||||||
config.email.port=25
|
config.email.port=25
|
||||||
config.email.senderMail=test@maxkey.org
|
config.email.senderMail=test@maxkey.org
|
||||||
config.email.ssl=false
|
config.email.ssl=false
|
||||||
|
############################################################################
|
||||||
|
# Login configuration
|
||||||
|
#enable captcha
|
||||||
|
config.login.captcha=true
|
||||||
|
#enable two factor,use one time password
|
||||||
|
config.login.onetimepwd=true
|
||||||
|
#enable social sign on
|
||||||
|
config.login.socialsignon=true
|
||||||
|
#Enable kerberos/SPNEGO
|
||||||
|
config.login.kerberos=true
|
||||||
|
#wsFederation
|
||||||
|
config.login.wsfederation=false
|
||||||
|
#remeberme
|
||||||
|
config.login.remeberme=true
|
||||||
|
#validity
|
||||||
|
config.login.remeberme.validity=
|
||||||
|
#default.uri
|
||||||
|
#to appList page
|
||||||
|
config.login.default.uri=appList
|
||||||
|
|
||||||
|
config.ipaddress.whitelist=false
|
||||||
############################################################################
|
############################################################################
|
||||||
# SAML V2.0 configuration
|
# SAML V2.0 configuration
|
||||||
# saml common
|
# saml common
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# MaxKey
|
|
||||||
############################################################################
|
|
||||||
# Login configuration
|
|
||||||
#enable captcha
|
|
||||||
config.login.captcha=true
|
|
||||||
#enable two factor,use one time password
|
|
||||||
config.login.onetimepwd=true
|
|
||||||
#enable social sign on
|
|
||||||
config.login.socialsignon=true
|
|
||||||
#Enable kerberos/SPNEGO
|
|
||||||
config.login.kerberos=true
|
|
||||||
#wsFederation
|
|
||||||
config.login.wsfederation=false
|
|
||||||
#remeberme
|
|
||||||
config.login.remeberme=true
|
|
||||||
#validity
|
|
||||||
config.login.remeberme.validity=
|
|
||||||
#default.uri
|
|
||||||
#to appList page
|
|
||||||
config.login.default.uri=appList
|
|
||||||
|
|
||||||
config.ipaddress.whitelist=false
|
|
||||||
@ -26,9 +26,8 @@
|
|||||||
<bean id="propertySourcesPlaceholderConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
|
<bean id="propertySourcesPlaceholderConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
|
||||||
<property name="locations">
|
<property name="locations">
|
||||||
<list>
|
<list>
|
||||||
<value>classpath:config/applicationConfig.properties</value>
|
<value>classpath:config/applicationConfig.properties</value>
|
||||||
<value>classpath:config/applicationLogin.properties</value>
|
<value>classpath:application.properties</value>
|
||||||
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<property name="ignoreUnresolvablePlaceholders" value="true"/>
|
<property name="ignoreUnresolvablePlaceholders" value="true"/>
|
||||||
|
|||||||
@ -76,4 +76,179 @@ config.redis.port=6379
|
|||||||
#password
|
#password
|
||||||
config.redis.password=password
|
config.redis.password=password
|
||||||
|
|
||||||
config.redis.timeout=10000
|
config.redis.timeout=10000
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# Login configuration
|
||||||
|
#enable captcha
|
||||||
|
config.login.captcha=true
|
||||||
|
#enable two factor,use one time password
|
||||||
|
config.login.onetimepwd=true
|
||||||
|
#enable social sign on
|
||||||
|
config.login.socialsignon=true
|
||||||
|
#Enable kerberos/SPNEGO
|
||||||
|
config.login.kerberos=true
|
||||||
|
#wsFederation
|
||||||
|
config.login.wsfederation=false
|
||||||
|
#remeberme
|
||||||
|
config.login.remeberme=true
|
||||||
|
#validity
|
||||||
|
config.login.remeberme.validity=
|
||||||
|
|
||||||
|
#to default application web site
|
||||||
|
config.login.default.uri=appList
|
||||||
|
|
||||||
|
config.ipaddress.whitelist=false
|
||||||
|
############################################################################
|
||||||
|
# Kerberos Login configuration
|
||||||
|
############################################################################
|
||||||
|
#short name of user domain must be in upper case,eg:MAXKEY
|
||||||
|
config.support.kerberos.default.userdomain=MAXKEY
|
||||||
|
#short name of user domain must be in upper case,eg:MAXKEY.ORG
|
||||||
|
config.support.kerberos.default.fulluserdomain=MAXKEY.ORG
|
||||||
|
#last 8Bit crypto for Kerberos web Authentication
|
||||||
|
config.support.kerberos.default.crypto=846KZSzYq56M6d5o
|
||||||
|
#Kerberos Authentication server RUL
|
||||||
|
config.support.kerberos.default.redirecturi=http://sso.maxkey.org/kerberos/authn/
|
||||||
|
############################################################################
|
||||||
|
# HTTPHEADER Login configuration
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
config.support.httpheader.enable=false
|
||||||
|
|
||||||
|
config.support.httpheader.headername=header-user
|
||||||
|
|
||||||
|
# iv-user is for IBM Security Access Manager
|
||||||
|
#config.httpheader.headername=iv-user
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# BASIC Login support configuration
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
config.support.basic.enable=false
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# WsFederation Login support configuration
|
||||||
|
#identifier: the identifer for the ADFS server
|
||||||
|
#url: the login url for ADFS
|
||||||
|
#principal: the name of the attribute/assertion returned by ADFS that contains the principal's username.
|
||||||
|
#relyingParty: the identifier of the CAS Server as it has been configured in ADFS.
|
||||||
|
#tolerance: (optional) the amount of drift to allow when validating the timestamp on the token. Default: 10000 (ms)
|
||||||
|
#attributeMutator: (optional) a class (defined by you) that can modify the attributes/assertions returned by the ADFS server
|
||||||
|
#signingCertificate: ADFS's signing certificate used to validate the token/assertions issued by ADFS.
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
config.support.wsfederation.identifier=http://adfs.maxkey.org/adfs/services/trust
|
||||||
|
config.support.wsfederation.url=https://adfs.maxkey.org/adfs/ls/
|
||||||
|
config.support.wsfederation.principal=upn
|
||||||
|
config.support.wsfederation.relyingParty=urn:federation:connsec
|
||||||
|
config.support.wsfederation.signingCertificate=adfs-signing.crt
|
||||||
|
config.support.wsfederation.tolerance=10000
|
||||||
|
config.support.wsfederation.upn.suffix=maxkey.org
|
||||||
|
config.support.wsfederation.logoutUrl=https://adfs.maxkey.org/adfs/ls/?wa=wsignout1.0
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
config.oidc.metadata.issuer=${config.server.name}/maxkey
|
||||||
|
config.oidc.metadata.authorizationEndpoint=${config.server.name}/maxkey/oauth/v20/authorize
|
||||||
|
config.oidc.metadata.tokenEndpoint=${config.server.name}/maxkey/oauth/v20/token
|
||||||
|
config.oidc.metadata.userinfoEndpoint=${config.server.name}/maxkey/api/connect/userinfo
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# Social Sign On Configuration #
|
||||||
|
#you config client.id & client.secret only
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
#sina weibo
|
||||||
|
config.socialsignon.sinaweibo.provider=sinaweibo
|
||||||
|
config.socialsignon.sinaweibo.provider.name=\u65B0\u6D6A\u5FAE\u535A
|
||||||
|
config.socialsignon.sinaweibo.icon=images/social/sinaweibo.png
|
||||||
|
config.socialsignon.sinaweibo.client.id=3379757634
|
||||||
|
config.socialsignon.sinaweibo.client.secret=1adfdf9800299037bcab9d1c238664ba
|
||||||
|
config.socialsignon.sinaweibo.account.id=id
|
||||||
|
config.socialsignon.sinaweibo.sortorder=1
|
||||||
|
|
||||||
|
#Google
|
||||||
|
config.socialsignon.google.provider=google
|
||||||
|
config.socialsignon.google.provider.name=Google
|
||||||
|
config.socialsignon.google.icon=images/social/google.png
|
||||||
|
config.socialsignon.google.client.id=519914515488.apps.googleusercontent.com
|
||||||
|
config.socialsignon.google.client.secret=3aTW3Iw7e11QqMnHxciCaXTt
|
||||||
|
config.socialsignon.google.account.id=id
|
||||||
|
config.socialsignon.google.sortorder=2
|
||||||
|
|
||||||
|
#QQ
|
||||||
|
config.socialsignon.qq.provider=qq
|
||||||
|
config.socialsignon.qq.provider.name=QQ
|
||||||
|
config.socialsignon.qq.icon=images/social/qq.png
|
||||||
|
config.socialsignon.qq.client.id=101225363
|
||||||
|
config.socialsignon.qq.client.secret=8577d75e0eb4a91ac549cc8be3371bfd
|
||||||
|
config.socialsignon.qq.account.id=openid
|
||||||
|
config.socialsignon.qq.sortorder=4
|
||||||
|
|
||||||
|
#dingtalk
|
||||||
|
config.socialsignon.dingtalk.provider=dingtalk
|
||||||
|
config.socialsignon.dingtalk.provider.name=dingtalk
|
||||||
|
config.socialsignon.dingtalk.icon=images/social/dingtalk.png
|
||||||
|
config.socialsignon.dingtalk.client.id=dingoawf2jyiwh2uzqnphg
|
||||||
|
config.socialsignon.dingtalk.client.secret=Crm7YJbMKfRlvG2i1SHpg4GHVpqF_oXiEjhmRQyiSiuzNRWpbFh9i0UjDTfhOoN9
|
||||||
|
config.socialsignon.dingtalk.account.id=openid
|
||||||
|
config.socialsignon.dingtalk.sortorder=5
|
||||||
|
|
||||||
|
#Microsoft
|
||||||
|
config.socialsignon.microsoft.provider=microsoft
|
||||||
|
config.socialsignon.microsoft.provider.name=Microsoft
|
||||||
|
config.socialsignon.microsoft.icon=images/social/live.png
|
||||||
|
config.socialsignon.microsoft.client.id=24aa73b6-7928-4e64-bd64-d8682e650f95
|
||||||
|
config.socialsignon.microsoft.client.secret=PF[_AthtjVrtWVO2mNy@CJxY1@Z8FNf5
|
||||||
|
config.socialsignon.microsoft.account.id=id
|
||||||
|
config.socialsignon.microsoft.sortorder=6
|
||||||
|
|
||||||
|
#facebook
|
||||||
|
config.socialsignon.facebook.provider=facebook
|
||||||
|
config.socialsignon.facebook.provider.name=facebook
|
||||||
|
config.socialsignon.facebook.icon=images/social/facebook.png
|
||||||
|
config.socialsignon.facebook.client.id=appKey
|
||||||
|
config.socialsignon.facebook.client.secret=appSecret
|
||||||
|
config.socialsignon.facebook.account.id=id
|
||||||
|
config.socialsignon.facebook.sortorder=7
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
# SAML V2.0 configuration
|
||||||
|
#saml common
|
||||||
|
config.saml.v20.max.parser.pool.size=2
|
||||||
|
config.saml.v20.assertion.validity.time.ins.seconds=90
|
||||||
|
config.saml.v20.replay.cache.life.in.millis=14400000
|
||||||
|
config.saml.v20.issue.instant.check.clock.skew.in.seconds=90
|
||||||
|
config.saml.v20.issue.instant.check.validity.time.in.seconds=300
|
||||||
|
|
||||||
|
|
||||||
|
#saml idp keystore
|
||||||
|
config.saml.v20.idp.keystore.password=maxkey
|
||||||
|
config.saml.v20.idp.keystore.private.key.password=maxkey
|
||||||
|
config.saml.v20.idp.keystore=classpath\:config/samlServerKeystore.jks
|
||||||
|
#keystore id for sec
|
||||||
|
config.saml.v20.idp.issuing.entity.id=maxkey.org
|
||||||
|
config.saml.v20.idp.issuer=https://sso.maxkey.org/maxkey/saml
|
||||||
|
|
||||||
|
config.saml.v20.idp.receiver.endpoint=https\://sso.maxkey.org/
|
||||||
|
|
||||||
|
#saml sp keystore
|
||||||
|
config.saml.v20.sp.keystore.password=maxkey
|
||||||
|
config.saml.v20.sp.keystore.private.key.password=maxkey
|
||||||
|
config.saml.v20.sp.keystore=classpath\:config/samlClientKeystore.jks
|
||||||
|
config.saml.v20.sp.issuing.entity.id=client.maxkey.org
|
||||||
|
|
||||||
|
#Saml v20 Metadata
|
||||||
|
config.saml.v20.metadata.orgName=maxkey
|
||||||
|
config.saml.v20.metadata.orgDisplayName=maxkey
|
||||||
|
config.saml.v20.metadata.orgURL=https://github.com/shimingxy/MaxKey
|
||||||
|
config.saml.v20.metadata.contactType=technical
|
||||||
|
config.saml.v20.metadata.company=maxkey
|
||||||
|
config.saml.v20.metadata.givenName=maxkey
|
||||||
|
config.saml.v20.metadata.surName=maxkey
|
||||||
|
config.saml.v20.metadata.emailAddress=shimingxy@163.com
|
||||||
|
config.saml.v20.metadata.telephoneNumber=4008981111
|
||||||
@ -1,139 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# MaxKey
|
|
||||||
############################################################################
|
|
||||||
# Login configuration
|
|
||||||
#enable captcha
|
|
||||||
config.login.captcha=true
|
|
||||||
#enable two factor,use one time password
|
|
||||||
config.login.onetimepwd=true
|
|
||||||
#enable social sign on
|
|
||||||
config.login.socialsignon=true
|
|
||||||
#Enable kerberos/SPNEGO
|
|
||||||
config.login.kerberos=true
|
|
||||||
#wsFederation
|
|
||||||
config.login.wsfederation=false
|
|
||||||
#remeberme
|
|
||||||
config.login.remeberme=true
|
|
||||||
#validity
|
|
||||||
config.login.remeberme.validity=
|
|
||||||
|
|
||||||
#to default application web site
|
|
||||||
config.login.default.uri=appList
|
|
||||||
|
|
||||||
config.ipaddress.whitelist=false
|
|
||||||
############################################################################
|
|
||||||
# Kerberos Login configuration
|
|
||||||
############################################################################
|
|
||||||
#short name of user domain must be in upper case,eg:MAXKEY
|
|
||||||
config.support.kerberos.default.userdomain=MAXKEY
|
|
||||||
#short name of user domain must be in upper case,eg:MAXKEY.ORG
|
|
||||||
config.support.kerberos.default.fulluserdomain=MAXKEY.ORG
|
|
||||||
#last 8Bit crypto for Kerberos web Authentication
|
|
||||||
config.support.kerberos.default.crypto=846KZSzYq56M6d5o
|
|
||||||
#Kerberos Authentication server RUL
|
|
||||||
config.support.kerberos.default.redirecturi=http://sso.maxkey.org/kerberos/authn/
|
|
||||||
############################################################################
|
|
||||||
# HTTPHEADER Login configuration
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
config.support.httpheader.enable=false
|
|
||||||
|
|
||||||
config.support.httpheader.headername=header-user
|
|
||||||
|
|
||||||
# iv-user is for IBM Security Access Manager
|
|
||||||
#config.httpheader.headername=iv-user
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
# BASIC Login support configuration
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
config.support.basic.enable=false
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
# WsFederation Login support configuration
|
|
||||||
#identifier: the identifer for the ADFS server
|
|
||||||
#url: the login url for ADFS
|
|
||||||
#principal: the name of the attribute/assertion returned by ADFS that contains the principal's username.
|
|
||||||
#relyingParty: the identifier of the CAS Server as it has been configured in ADFS.
|
|
||||||
#tolerance: (optional) the amount of drift to allow when validating the timestamp on the token. Default: 10000 (ms)
|
|
||||||
#attributeMutator: (optional) a class (defined by you) that can modify the attributes/assertions returned by the ADFS server
|
|
||||||
#signingCertificate: ADFS's signing certificate used to validate the token/assertions issued by ADFS.
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
config.support.wsfederation.identifier=http://adfs.maxkey.org/adfs/services/trust
|
|
||||||
config.support.wsfederation.url=https://adfs.maxkey.org/adfs/ls/
|
|
||||||
config.support.wsfederation.principal=upn
|
|
||||||
config.support.wsfederation.relyingParty=urn:federation:connsec
|
|
||||||
config.support.wsfederation.signingCertificate=adfs-signing.crt
|
|
||||||
config.support.wsfederation.tolerance=10000
|
|
||||||
config.support.wsfederation.upn.suffix=maxkey.org
|
|
||||||
config.support.wsfederation.logoutUrl=https://adfs.maxkey.org/adfs/ls/?wa=wsignout1.0
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
config.oidc.metadata.issuer=${config.server.name}/maxkey
|
|
||||||
config.oidc.metadata.authorizationEndpoint=${config.server.name}/maxkey/oauth/v20/authorize
|
|
||||||
config.oidc.metadata.tokenEndpoint=${config.server.name}/maxkey/oauth/v20/token
|
|
||||||
config.oidc.metadata.userinfoEndpoint=${config.server.name}/maxkey/api/connect/userinfo
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
# Social Sign On Configuration #
|
|
||||||
#you config client.id & client.secret only
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#sina weibo
|
|
||||||
config.socialsignon.sinaweibo.provider=sinaweibo
|
|
||||||
config.socialsignon.sinaweibo.provider.name=\u65B0\u6D6A\u5FAE\u535A
|
|
||||||
config.socialsignon.sinaweibo.icon=images/social/sinaweibo.png
|
|
||||||
config.socialsignon.sinaweibo.client.id=3379757634
|
|
||||||
config.socialsignon.sinaweibo.client.secret=1adfdf9800299037bcab9d1c238664ba
|
|
||||||
config.socialsignon.sinaweibo.account.id=id
|
|
||||||
config.socialsignon.sinaweibo.sortorder=1
|
|
||||||
|
|
||||||
#Google
|
|
||||||
config.socialsignon.google.provider=google
|
|
||||||
config.socialsignon.google.provider.name=Google
|
|
||||||
config.socialsignon.google.icon=images/social/google.png
|
|
||||||
config.socialsignon.google.client.id=519914515488.apps.googleusercontent.com
|
|
||||||
config.socialsignon.google.client.secret=3aTW3Iw7e11QqMnHxciCaXTt
|
|
||||||
config.socialsignon.google.account.id=id
|
|
||||||
config.socialsignon.google.sortorder=2
|
|
||||||
|
|
||||||
#QQ
|
|
||||||
config.socialsignon.qq.provider=qq
|
|
||||||
config.socialsignon.qq.provider.name=QQ
|
|
||||||
config.socialsignon.qq.icon=images/social/qq.png
|
|
||||||
config.socialsignon.qq.client.id=101225363
|
|
||||||
config.socialsignon.qq.client.secret=8577d75e0eb4a91ac549cc8be3371bfd
|
|
||||||
config.socialsignon.qq.account.id=openid
|
|
||||||
config.socialsignon.qq.sortorder=4
|
|
||||||
|
|
||||||
#dingtalk
|
|
||||||
config.socialsignon.dingtalk.provider=dingtalk
|
|
||||||
config.socialsignon.dingtalk.provider.name=dingtalk
|
|
||||||
config.socialsignon.dingtalk.icon=images/social/dingtalk.png
|
|
||||||
config.socialsignon.dingtalk.client.id=dingoawf2jyiwh2uzqnphg
|
|
||||||
config.socialsignon.dingtalk.client.secret=Crm7YJbMKfRlvG2i1SHpg4GHVpqF_oXiEjhmRQyiSiuzNRWpbFh9i0UjDTfhOoN9
|
|
||||||
config.socialsignon.dingtalk.account.id=openid
|
|
||||||
config.socialsignon.dingtalk.sortorder=5
|
|
||||||
|
|
||||||
#Microsoft
|
|
||||||
config.socialsignon.microsoft.provider=microsoft
|
|
||||||
config.socialsignon.microsoft.provider.name=Microsoft
|
|
||||||
config.socialsignon.microsoft.icon=images/social/live.png
|
|
||||||
config.socialsignon.microsoft.client.id=24aa73b6-7928-4e64-bd64-d8682e650f95
|
|
||||||
config.socialsignon.microsoft.client.secret=PF[_AthtjVrtWVO2mNy@CJxY1@Z8FNf5
|
|
||||||
config.socialsignon.microsoft.account.id=id
|
|
||||||
config.socialsignon.microsoft.sortorder=6
|
|
||||||
|
|
||||||
#facebook
|
|
||||||
config.socialsignon.facebook.provider=facebook
|
|
||||||
config.socialsignon.facebook.provider.name=facebook
|
|
||||||
config.socialsignon.facebook.icon=images/social/facebook.png
|
|
||||||
config.socialsignon.facebook.client.id=appKey
|
|
||||||
config.socialsignon.facebook.client.secret=appSecret
|
|
||||||
config.socialsignon.facebook.account.id=id
|
|
||||||
config.socialsignon.facebook.sortorder=7
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# MaxKey
|
|
||||||
############################################################################
|
|
||||||
# SAML V2.0 configuration
|
|
||||||
#saml common
|
|
||||||
config.saml.v20.max.parser.pool.size=2
|
|
||||||
config.saml.v20.assertion.validity.time.ins.seconds=90
|
|
||||||
config.saml.v20.replay.cache.life.in.millis=14400000
|
|
||||||
config.saml.v20.issue.instant.check.clock.skew.in.seconds=90
|
|
||||||
config.saml.v20.issue.instant.check.validity.time.in.seconds=300
|
|
||||||
|
|
||||||
|
|
||||||
#saml idp keystore
|
|
||||||
config.saml.v20.idp.keystore.password=maxkey
|
|
||||||
config.saml.v20.idp.keystore.private.key.password=maxkey
|
|
||||||
config.saml.v20.idp.keystore=classpath\:config/samlServerKeystore.jks
|
|
||||||
#keystore id for sec
|
|
||||||
config.saml.v20.idp.issuing.entity.id=maxkey.org
|
|
||||||
config.saml.v20.idp.issuer=https://sso.maxkey.org/maxkey/saml
|
|
||||||
|
|
||||||
config.saml.v20.idp.receiver.endpoint=https\://sso.maxkey.org/
|
|
||||||
|
|
||||||
#saml sp keystore
|
|
||||||
config.saml.v20.sp.keystore.password=maxkey
|
|
||||||
config.saml.v20.sp.keystore.private.key.password=maxkey
|
|
||||||
config.saml.v20.sp.keystore=classpath\:config/samlClientKeystore.jks
|
|
||||||
config.saml.v20.sp.issuing.entity.id=client.maxkey.org
|
|
||||||
|
|
||||||
#Saml v20 Metadata
|
|
||||||
config.saml.v20.metadata.orgName=maxkey
|
|
||||||
config.saml.v20.metadata.orgDisplayName=maxkey
|
|
||||||
config.saml.v20.metadata.orgURL=https://github.com/shimingxy/MaxKey
|
|
||||||
config.saml.v20.metadata.contactType=technical
|
|
||||||
config.saml.v20.metadata.company=maxkey
|
|
||||||
config.saml.v20.metadata.givenName=maxkey
|
|
||||||
config.saml.v20.metadata.surName=maxkey
|
|
||||||
config.saml.v20.metadata.emailAddress=shimingxy@163.com
|
|
||||||
config.saml.v20.metadata.telephoneNumber=4008981111
|
|
||||||
@ -23,8 +23,7 @@
|
|||||||
<property name="locations">
|
<property name="locations">
|
||||||
<list>
|
<list>
|
||||||
<value>classpath:config/applicationConfig.properties</value>
|
<value>classpath:config/applicationConfig.properties</value>
|
||||||
<value>classpath:config/applicationLogin.properties</value>
|
<value>classpath:application.properties</value>
|
||||||
<value>classpath:config/applicationSaml.properties</value>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<property name="ignoreUnresolvablePlaceholders" value="true"/>
|
<property name="ignoreUnresolvablePlaceholders" value="true"/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user