application-http.properties 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. ############################################################################
  2. # Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################
  16. #spring.profiles.active=http #
  17. ############################################################################
  18. #server port
  19. server.port =8080
  20. #session default 1800
  21. #1800s =30m
  22. #28800s=8h
  23. server.servlet.session.timeout =1800
  24. #server context path
  25. server.servlet.context-path =/maxkey
  26. #nacos discovery
  27. spring.cloud.nacos.discovery.enabled =${NACOS_DISCOVERY_ENABLED:false}
  28. spring.cloud.nacos.discovery.instance-enabled =false
  29. spring.cloud.nacos.discovery.server-addr =${NACOS_DISCOVERY_SERVER_ADDR:127.0.0.1:8848}
  30. ############################################################################
  31. #domain name configuration #
  32. ############################################################################
  33. maxkey.server.scheme =http
  34. maxkey.server.basedomain =${SERVER_DOMAIN:maxkey.top}
  35. maxkey.server.domain =sso.${maxkey.server.basedomain}
  36. maxkey.server.name =${maxkey.server.scheme}://${maxkey.server.domain}
  37. maxkey.server.uri =${maxkey.server.name}:${server.port}${server.servlet.context-path}
  38. #default.uri
  39. maxkey.server.default.uri =${maxkey.server.uri}/appList
  40. maxkey.server.mgt.uri =${maxkey.server.name}:9527/maxkey-mgt/login
  41. maxkey.server.authz.uri =${maxkey.server.name}:${server.port}${server.servlet.context-path}
  42. #InMemory 0 , Redis 2
  43. maxkey.server.persistence =${SERVER_PERSISTENCE:0}
  44. #identity
  45. maxkey.server.kafka.support =${SERVER_KAFKA_SUPPORT:false}
  46. #issuer name
  47. maxkey.app.issuer =CN=ConSec,CN=COM,CN=SH
  48. ############################################################################
  49. #Login configuration #
  50. ############################################################################
  51. #enable captcha
  52. maxkey.login.captcha =${LOGIN_CAPTCHA:true}
  53. #text or arithmetic
  54. maxkey.login.captcha.type =${LOGIN_CAPTCHA_TYPE:text}
  55. #enable two factor,use one time password
  56. maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
  57. #TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud
  58. maxkey.login.mfa.type =${LOGIN_MFA_TYPE:TimeBasedOtpAuthn}
  59. #enable social sign on
  60. maxkey.login.socialsignon =${LOGIN_SOCIAL_ENABLED:true}
  61. #Enable kerberos/SPNEGO
  62. maxkey.login.kerberos =false
  63. #wsFederation
  64. maxkey.login.wsfederation =false
  65. #remeberme
  66. maxkey.login.remeberme =${LOGIN_REMEBERME:true}
  67. #validity
  68. maxkey.login.remeberme.validity =0
  69. #JWT support
  70. maxkey.login.jwt =${LOGIN_JWT:true}
  71. maxkey.login.jwt.issuer =${LOGIN_JWT_ISSUER:${maxkey.server.authz.uri}}
  72. #to default application web site
  73. maxkey.login.default.uri =appList
  74. maxkey.ipaddress.whitelist =false
  75. #notices show
  76. maxkey.notices.visible =false
  77. ############################################################################
  78. #ssl configuration #
  79. ############################################################################
  80. #server.ssl.key-store=maxkeyserver.keystore
  81. #server.ssl.key-alias=maxkey
  82. #server.ssl.enabled=true
  83. #server.ssl.key-store-password=maxkey
  84. #server.ssl.key-store-type=JKS
  85. ############################################################################
  86. #database configuration
  87. # supported database
  88. # mysql
  89. # highgo
  90. # postgresql
  91. ############################################################################
  92. spring.datasource.type =com.alibaba.druid.pool.DruidDataSource
  93. #mysql
  94. spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
  95. spring.datasource.username =${DATABASE_USER:root}
  96. spring.datasource.password =${DATABASE_PWD:maxkey}
  97. spring.datasource.url =jdbc:mysql://${DATABASE_HOST:localhost}:${DATABASE_PORT:3306}/${DATABASE_NAME:maxkey}?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
  98. #highgo
  99. #spring.datasource.driver-class-name=com.highgo.jdbc.Driver
  100. #spring.datasource.username=highgo
  101. #spring.datasource.password=High@123
  102. #spring.datasource.url=jdbc:highgo://192.168.56.107:5866/highgo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
  103. #postgresql
  104. #spring.datasource.driver-class-name=org.postgresql.Driver
  105. #spring.datasource.username=root
  106. #spring.datasource.password=maxkey!
  107. #spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
  108. #mybatis
  109. mybatis.dialect =mysql
  110. mybatis.type-aliases-package =org.maxkey.entity,org.maxkey.entity.apps,
  111. mybatis.mapper-locations =classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
  112. mybatis.table-column-snowflake-datacenter-id =1
  113. mybatis.table-column-snowflake-machine-id =1
  114. mybatis.table-column-escape =false
  115. mybatis.table-column-case =lowercase
  116. ############################################################################
  117. #redis server configuration #
  118. ############################################################################
  119. spring.redis.host =${REDIS_HOST:127.0.0.1}
  120. spring.redis.port =${REDIS_PORT:6379}
  121. spring.redis.password =${REDIS_PWD:password}
  122. spring.redis.timeout =10000
  123. spring.redis.jedis.pool.max-wait =1000
  124. spring.redis.jedis.pool.max-idle =200
  125. spring.redis.lettuce.pool.max-active =-1
  126. spring.redis.lettuce.pool.min-idle =0
  127. ############################################################################
  128. #mail configuration #
  129. ############################################################################
  130. spring.mail.default-encoding =utf-8
  131. spring.mail.host =${MAIL_HOST:smtp.163.com}
  132. spring.mail.port =${MAIL_PORT:465}
  133. spring.mail.username =${MAIL_USER:maxkey@163.com}
  134. spring.mail.password =${MAIL_PWD:password}
  135. spring.mail.protocol =smtp
  136. spring.mail.properties.ssl =true
  137. spring.mail.properties.sender =${MAIL_SENDER:maxkey@163.com}
  138. spring.mail.properties.mailotp.message.subject =MaxKey One Time PassWord
  139. spring.mail.properties.mailotp.message.template ={0} You Token is {1} , it validity in {2} minutes.
  140. spring.mail.properties.mailotp.message.type =html
  141. spring.mail.properties.mailotp.message.validity =300
  142. ############################################################################
  143. #Spring Session for Cluster configuration #
  144. ############################################################################
  145. # Session store type.
  146. spring.session.store-type =none
  147. #spring.session.store-type=redis
  148. # Session timeout. If a duration suffix is not specified, seconds is used.
  149. #server.servlet.session.timeout=1800
  150. # Sessions flush mode.
  151. #spring.session.redis.flush-mode=on_save
  152. # Namespace for keys used to store sessions.
  153. #spring.session.redis.namespace=spring:session
  154. ############################################################################
  155. #Kafka for connectors configuration #
  156. ############################################################################
  157. spring.kafka.bootstrap-servers =${KAFKA_SERVERS:localhost:9092}
  158. # retries
  159. spring.kafka.producer.retries =0
  160. # acks
  161. spring.kafka.producer.acks =1
  162. # batch-size
  163. spring.kafka.producer.batch-size =16384
  164. # linger.ms
  165. spring.kafka.producer.properties.linger.ms =0
  166. # buffer-memory
  167. spring.kafka.producer.buffer-memory =33554432
  168. # serializer
  169. spring.kafka.producer.key-serializer =org.apache.kafka.common.serialization.StringSerializer
  170. spring.kafka.producer.value-serializer =org.apache.kafka.common.serialization.StringSerializer
  171. # partitioner
  172. #spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner
  173. ############################################################################
  174. #SMS Message Login configuration #
  175. #aliyun yunxin tencentcloud #
  176. ############################################################################
  177. #default
  178. maxkey.otp.sms.provider =${SMS_PROVIDER:yunxin}
  179. #aliyun
  180. maxkey.otp.sms.aliyun.accesskeyid =${SMS_ALIYUN_ACCESSKEYID:94395d754eb55693043f5d6a2b772ef4}
  181. maxkey.otp.sms.aliyun.accesssecret =${SMS_ALIYUN_ACCESSSECRET:05d5485357bc}
  182. maxkey.otp.sms.aliyun.templatecode =${SMS_ALIYUN_TEMPLATECODE:14860095}
  183. maxkey.otp.sms.aliyun.signname =${SMS_ALIYUN_SIGNNAME:maxkey}
  184. #yunxin
  185. maxkey.otp.sms.yunxin.appkey =${SMS_YUNXIN_APPKEY:94395d754eb55693043f5d6a2b772ef3}
  186. maxkey.otp.sms.yunxin.appsecret =${SMS_YUNXIN_APPSECRET:05d5485357bc}
  187. maxkey.otp.sms.yunxin.templateid =${SMS_YUNXIN_TEMPLATEID:14860099}
  188. #tencentcloud
  189. maxkey.otp.sms.tencentcloud.secretid =${SMS_TENCENTCLOUD_SECRETID:94395d754eb55693043f5d6a2b772ef4}
  190. maxkey.otp.sms.tencentcloud.secretkey =${SMS_TENCENTCLOUD_SECRETKEY:05d5485357bc}
  191. maxkey.otp.sms.tencentcloud.smssdkappid =${SMS_TENCENTCLOUD_SMSSDKAPPID:1486220095}
  192. maxkey.otp.sms.tencentcloud.templateid =${SMS_TENCENTCLOUD_TEMPLATEID:14860095}
  193. maxkey.otp.sms.tencentcloud.sign =${SMS_TENCENTCLOUD_SIGN:1486009522}
  194. ############################################################################
  195. #Time-based One-Time Password configuration #
  196. ############################################################################
  197. maxkey.otp.policy.type =totp
  198. maxkey.otp.policy.digits =6
  199. maxkey.otp.policy.issuer =${OTP_POLICY_ISSUER:MaxKey}
  200. maxkey.otp.policy.domain =${maxkey.server.domain}
  201. maxkey.otp.policy.period =30
  202. ############################################################################
  203. #LDAP Login support configuration #
  204. ############################################################################
  205. maxkey.login.ldap.enable =${LDAP_ENABLE:false}
  206. maxkey.login.ldap.jit =false
  207. #openldap,activedirectory,normal
  208. maxkey.login.ldap.product =${LDAP_PRODUCT:openldap}
  209. maxkey.login.ldap.ssl =${LDAP_SSL:false}
  210. maxkey.login.ldap.providerurl =${LDAP_PROVIDERURL:ldap://localhost:389}
  211. maxkey.login.ldap.principal =${LDAP_PRINCIPAL:cn=Manager,dc=maxcrc,dc=com}
  212. maxkey.login.ldap.credentials =${LDAP_CREDENTIALS:secret}
  213. maxkey.login.ldap.basedn =${LDAP_BASEDN:dc=maxcrc,dc=com}
  214. maxkey.login.ldap.filter =(uid=%s)
  215. maxkey.login.ldap.truststore =${LDAP_TRUSTSTORE:maxkey}
  216. maxkey.login.ldap.truststorepassword =${LDAP_TRUSTSTORE_PASSWORD:maxkey}
  217. #activedirectory effective
  218. maxkey.login.ldap.activedirectory.domain =${LDAP_AD_DOMAIN:MAXKEY.ORG}
  219. ############################################################################
  220. #Kerberos Login configuration #
  221. #short name of user domain must be in upper case,eg:MAXKEY #
  222. ############################################################################
  223. maxkey.login.kerberos.default.userdomain =MAXKEY
  224. #short name of user domain must be in upper case,eg:MAXKEY.ORG
  225. maxkey.login.kerberos.default.fulluserdomain =MAXKEY.ORG
  226. #last 8Bit crypto for Kerberos web Authentication
  227. maxkey.login.kerberos.default.crypto =846KZSzYq56M6d5o
  228. #Kerberos Authentication server RUL
  229. maxkey.login.kerberos.default.redirecturi =http://sso.maxkey.top/kerberos/authn/
  230. ############################################################################
  231. #HTTPHEADER Login configuration #
  232. ############################################################################
  233. maxkey.login.httpheader.enable =false
  234. maxkey.login.httpheader.headername =header-user
  235. # iv-user is for IBM Security Access Manager
  236. #config.httpheader.headername=iv-user
  237. ############################################################################
  238. #BASIC Login support configuration #
  239. ############################################################################
  240. maxkey.login.basic.enable =false
  241. #############################################################################
  242. #WsFederation Login support configuration
  243. #identifier: the identifer for the ADFS server
  244. #url: the login url for ADFS
  245. #principal: the name of the attribute/assertion returned by ADFS that contains the principal's username.
  246. #relyingParty: the identifier of the CAS Server as it has been configured in ADFS.
  247. #tolerance: (optional) the amount of drift to allow when validating the timestamp on the token. Default: 10000 (ms)
  248. #attributeMutator: (optional) a class (defined by you) that can modify the attributes/assertions returned by the ADFS server
  249. #signingCertificate: ADFS's signing certificate used to validate the token/assertions issued by ADFS.
  250. ############################################################################
  251. maxkey.login.wsfederation.identifier =http://adfs.maxkey.top/adfs/services/trust
  252. maxkey.login.wsfederation.url =https://adfs.maxkey.top/adfs/ls/
  253. maxkey.login.wsfederation.principal =upn
  254. maxkey.login.wsfederation.relyingParty =urn:federation:connsec
  255. maxkey.login.wsfederation.signingCertificate =adfs-signing.crt
  256. maxkey.login.wsfederation.tolerance =10000
  257. maxkey.login.wsfederation.upn.suffix =maxkey.org
  258. maxkey.login.wsfederation.logoutUrl =https://adfs.maxkey.top/adfs/ls/?wa=wsignout1.0
  259. #############################################################################
  260. #OIDC V1.0 METADATA configuration #
  261. #############################################################################
  262. maxkey.oidc.metadata.issuer =${maxkey.server.authz.uri}
  263. maxkey.oidc.metadata.authorizationEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/authorize
  264. maxkey.oidc.metadata.tokenEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/token
  265. maxkey.oidc.metadata.userinfoEndpoint =${maxkey.server.authz.uri}/api/connect/userinfo
  266. #############################################################################
  267. #SAML V2.0 configuration #
  268. #############################################################################
  269. #saml common
  270. maxkey.saml.v20.max.parser.pool.size =2
  271. maxkey.saml.v20.assertion.validity.time.ins.seconds =90
  272. maxkey.saml.v20.replay.cache.life.in.millis =14400000
  273. maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds =90
  274. maxkey.saml.v20.issue.instant.check.validity.time.in.seconds =300
  275. #saml Identity Provider keystore
  276. maxkey.saml.v20.idp.keystore.password =maxkey
  277. maxkey.saml.v20.idp.keystore.private.key.password =maxkey
  278. maxkey.saml.v20.idp.keystore =classpath\:config/samlServerKeystore.jks
  279. #keystore Identity Provider for security
  280. maxkey.saml.v20.idp.issuing.entity.id =maxkey.top
  281. maxkey.saml.v20.idp.issuer =${maxkey.server.authz.uri}/saml
  282. maxkey.saml.v20.idp.receiver.endpoint =https\://sso.maxkey.top/
  283. #Saml v20 Identity Provider METADATA
  284. maxkey.saml.v20.metadata.orgName =MaxKeyTop
  285. maxkey.saml.v20.metadata.orgDisplayName =MaxKeyTop
  286. maxkey.saml.v20.metadata.orgURL =https://www.maxkey.top
  287. maxkey.saml.v20.metadata.contactType =technical
  288. maxkey.saml.v20.metadata.company =MaxKeyTop
  289. maxkey.saml.v20.metadata.givenName =maxkey
  290. maxkey.saml.v20.metadata.surName =maxkey
  291. maxkey.saml.v20.metadata.emailAddress =maxkeysupport@163.com
  292. maxkey.saml.v20.metadata.telephoneNumber =4008981111
  293. #saml RelayParty keystore
  294. maxkey.saml.v20.sp.keystore.password =maxkey
  295. maxkey.saml.v20.sp.keystore.private.key.password =maxkey
  296. maxkey.saml.v20.sp.keystore =classpath\:config/samlClientKeystore.jks
  297. maxkey.saml.v20.sp.issuing.entity.id =client.maxkey.org
  298. ############################################################################
  299. #Management endpoints configuration #
  300. ############################################################################
  301. management.security.enabled =false
  302. #management.endpoints.jmx.exposure.include=health,info
  303. #management.endpoints.web.exposure.include=metrics,health,info,env,prometheus
  304. management.endpoints.web.exposure.include =*
  305. management.endpoint.health.show-details =ALWAYS
  306. #Spring Boot Admin Client
  307. spring.boot.admin.client.url =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
  308. management.health.redis.enabled =false
  309. management.health.mail.enabled =false
  310. ############################################################################
  311. #Do not modify the following configuration
  312. ############################################################################
  313. #springfox.documentation.swagger.v2.path=/api-docs #
  314. #Swagger Configure Properties #
  315. ############################################################################
  316. maxkey.swagger.enable =true
  317. maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  318. maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  319. maxkey.swagger.version =${application.formatted-version}
  320. ############################################################################
  321. #freemarker configuration #
  322. ############################################################################
  323. spring.freemarker.template-loader-path =classpath:/templates/views
  324. spring.freemarker.cache =false
  325. spring.freemarker.charset =UTF-8
  326. spring.freemarker.check-template-location =true
  327. spring.freemarker.content-type =text/html
  328. spring.freemarker.expose-request-attributes =false
  329. spring.freemarker.expose-session-attributes =false
  330. spring.freemarker.request-context-attribute =request
  331. spring.freemarker.suffix =.ftl
  332. ############################################################################
  333. #static resources configuration #
  334. ############################################################################
  335. spring.mvc.static-path-pattern =/static/**
  336. spring.messages.basename =classpath:messages/message
  337. spring.messages.encoding =UTF-8
  338. ############################################################################
  339. #server servlet encoding configuration #
  340. ############################################################################
  341. #encoding
  342. #server.servlet.encoding.charset=UTF-8
  343. #server.servlet.encoding.enabled=true
  344. #server.servlet.encoding.force=true
  345. ############################################################################
  346. #Servlet multipart configuration #
  347. ############################################################################
  348. spring.servlet.multipart.enabled =true
  349. spring.servlet.multipart.max-file-size =4194304