application-http.properties 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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 =${SERVER_PORT:8080}
  20. #session default 1800
  21. #1800s =30m
  22. #28800s=8h
  23. server.servlet.session.timeout =${SERVER_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 none, Kafka ,RocketMQ
  45. maxkey.server.message.queue =${SERVER_MESSAGE_QUEUE:none}
  46. #issuer name
  47. maxkey.app.issuer =CN=ConSec,CN=COM,CN=SH
  48. ############################################################################
  49. #Login configuration #
  50. ############################################################################
  51. #enable two factor,use one time password
  52. maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
  53. #TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud
  54. maxkey.login.mfa.type =${LOGIN_MFA_TYPE:TimeBasedOtpAuthn}
  55. #enable social sign on
  56. maxkey.login.socialsignon =${LOGIN_SOCIAL_ENABLED:true}
  57. #Enable kerberos/SPNEGO
  58. maxkey.login.kerberos =false
  59. #wsFederation
  60. maxkey.login.wsfederation =false
  61. #remeberme
  62. maxkey.login.remeberme =${LOGIN_REMEBERME:true}
  63. #validity
  64. maxkey.login.remeberme.validity =0
  65. #JWT support
  66. maxkey.login.jwt =${LOGIN_JWT:true}
  67. maxkey.login.jwt.issuer =${LOGIN_JWT_ISSUER:${maxkey.server.authz.uri}}
  68. #whitelist
  69. maxkey.ipaddress.whitelist =false
  70. #notices show
  71. maxkey.notices.visible =false
  72. ############################################################################
  73. #ssl configuration #
  74. ############################################################################
  75. #server.ssl.key-store=maxkeyserver.keystore
  76. #server.ssl.key-alias=maxkey
  77. #server.ssl.enabled=true
  78. #server.ssl.key-store-password=maxkey
  79. #server.ssl.key-store-type=JKS
  80. ############################################################################
  81. #database configuration
  82. # supported database
  83. # mysql
  84. # highgo
  85. # postgresql
  86. ############################################################################
  87. spring.datasource.type =com.alibaba.druid.pool.DruidDataSource
  88. #mysql
  89. spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
  90. spring.datasource.username =${DATABASE_USER:root}
  91. spring.datasource.password =${DATABASE_PWD:maxkey}
  92. spring.datasource.url =jdbc:mysql://${DATABASE_HOST:localhost}:${DATABASE_PORT:3306}/${DATABASE_NAME:maxkey}?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
  93. #highgo
  94. #spring.datasource.driver-class-name=com.highgo.jdbc.Driver
  95. #spring.datasource.username=highgo
  96. #spring.datasource.password=High@123
  97. #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
  98. #postgresql
  99. #spring.datasource.driver-class-name=org.postgresql.Driver
  100. #spring.datasource.username=root
  101. #spring.datasource.password=maxkey!
  102. #spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
  103. #mybatis
  104. mybatis.dialect =mysql
  105. mybatis.type-aliases-package =org.maxkey.entity,org.maxkey.entity.apps,
  106. mybatis.mapper-locations =classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
  107. mybatis.table-column-snowflake-datacenter-id =1
  108. mybatis.table-column-snowflake-machine-id =1
  109. mybatis.table-column-escape =false
  110. mybatis.table-column-case =lowercase
  111. ############################################################################
  112. #redis server configuration #
  113. ############################################################################
  114. spring.redis.host =${REDIS_HOST:127.0.0.1}
  115. spring.redis.port =${REDIS_PORT:6379}
  116. spring.redis.password =${REDIS_PWD:password}
  117. spring.redis.timeout =10000
  118. spring.redis.jedis.pool.max-wait =1000
  119. spring.redis.jedis.pool.max-idle =200
  120. spring.redis.lettuce.pool.max-active =-1
  121. spring.redis.lettuce.pool.min-idle =0
  122. ############################################################################
  123. #mail configuration #
  124. ############################################################################
  125. spring.mail.default-encoding =utf-8
  126. spring.mail.host =${MAIL_HOST:smtp.163.com}
  127. spring.mail.port =${MAIL_PORT:465}
  128. spring.mail.username =${MAIL_USER:maxkey@163.com}
  129. spring.mail.password =${MAIL_PWD:password}
  130. spring.mail.protocol =smtp
  131. spring.mail.properties.ssl =true
  132. spring.mail.properties.sender =${MAIL_SENDER:maxkey@163.com}
  133. spring.mail.properties.mailotp.message.subject =MaxKey One Time PassWord
  134. spring.mail.properties.mailotp.message.template ={0} You Token is {1} , it validity in {2} minutes.
  135. spring.mail.properties.mailotp.message.type =html
  136. spring.mail.properties.mailotp.message.validity =300
  137. ############################################################################
  138. #Spring Session for Cluster configuration #
  139. ############################################################################
  140. # Session store type.
  141. spring.session.store-type =none
  142. #spring.session.store-type=redis
  143. # Session timeout. If a duration suffix is not specified, seconds is used.
  144. #server.servlet.session.timeout=1800
  145. # Sessions flush mode.
  146. #spring.session.redis.flush-mode=on_save
  147. # Namespace for keys used to store sessions.
  148. #spring.session.redis.namespace=spring:session
  149. ############################################################################
  150. #Kafka for connectors configuration #
  151. ############################################################################
  152. spring.kafka.bootstrap-servers =${KAFKA_SERVERS:localhost:9092}
  153. # retries
  154. spring.kafka.producer.retries =0
  155. # acks
  156. spring.kafka.producer.acks =1
  157. # batch-size
  158. spring.kafka.producer.batch-size =16384
  159. # linger.ms
  160. spring.kafka.producer.properties.linger.ms =0
  161. # buffer-memory
  162. spring.kafka.producer.buffer-memory =33554432
  163. # serializer
  164. spring.kafka.producer.key-serializer =org.apache.kafka.common.serialization.StringSerializer
  165. spring.kafka.producer.value-serializer =org.apache.kafka.common.serialization.StringSerializer
  166. # partitioner
  167. #spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner
  168. ############################################################################
  169. #RocketMQ for connectors configuration #
  170. ############################################################################
  171. rocketmq.name-server =${ROCKETMQ_SERVERS:localhost:9876}
  172. rocketmq.producer.enable =true
  173. rocketmq.producer.group =maxkey_identity
  174. ############################################################################
  175. #Time-based One-Time Password configuration #
  176. ############################################################################
  177. maxkey.otp.policy.type =totp
  178. maxkey.otp.policy.digits =6
  179. maxkey.otp.policy.issuer =${OTP_POLICY_ISSUER:MaxKey}
  180. maxkey.otp.policy.domain =${maxkey.server.domain}
  181. maxkey.otp.policy.period =30
  182. ############################################################################
  183. #Kerberos Login configuration #
  184. #short name of user domain must be in upper case,eg:MAXKEY #
  185. ############################################################################
  186. maxkey.login.kerberos.default.userdomain =MAXKEY
  187. #short name of user domain must be in upper case,eg:MAXKEY.ORG
  188. maxkey.login.kerberos.default.fulluserdomain =MAXKEY.ORG
  189. #last 8Bit crypto for Kerberos web Authentication
  190. maxkey.login.kerberos.default.crypto =846KZSzYq56M6d5o
  191. #Kerberos Authentication server RUL
  192. maxkey.login.kerberos.default.redirecturi =http://sso.maxkey.top/kerberos/authn/
  193. ############################################################################
  194. #HTTPHEADER Login configuration #
  195. ############################################################################
  196. maxkey.login.httpheader.enable =false
  197. maxkey.login.httpheader.headername =header-user
  198. # iv-user is for IBM Security Access Manager
  199. #config.httpheader.headername=iv-user
  200. ############################################################################
  201. #BASIC Login support configuration #
  202. ############################################################################
  203. maxkey.login.basic.enable =false
  204. #############################################################################
  205. #WsFederation Login support configuration
  206. #identifier: the identifer for the ADFS server
  207. #url: the login url for ADFS
  208. #principal: the name of the attribute/assertion returned by ADFS that contains the principal's username.
  209. #relyingParty: the identifier of the CAS Server as it has been configured in ADFS.
  210. #tolerance: (optional) the amount of drift to allow when validating the timestamp on the token. Default: 10000 (ms)
  211. #attributeMutator: (optional) a class (defined by you) that can modify the attributes/assertions returned by the ADFS server
  212. #signingCertificate: ADFS's signing certificate used to validate the token/assertions issued by ADFS.
  213. ############################################################################
  214. maxkey.login.wsfederation.identifier =http://adfs.maxkey.top/adfs/services/trust
  215. maxkey.login.wsfederation.url =https://adfs.maxkey.top/adfs/ls/
  216. maxkey.login.wsfederation.principal =upn
  217. maxkey.login.wsfederation.relyingParty =urn:federation:connsec
  218. maxkey.login.wsfederation.signingCertificate =adfs-signing.crt
  219. maxkey.login.wsfederation.tolerance =10000
  220. maxkey.login.wsfederation.upn.suffix =maxkey.org
  221. maxkey.login.wsfederation.logoutUrl =https://adfs.maxkey.top/adfs/ls/?wa=wsignout1.0
  222. #############################################################################
  223. #OIDC V1.0 METADATA configuration #
  224. #############################################################################
  225. maxkey.oidc.metadata.issuer =${maxkey.server.authz.uri}
  226. maxkey.oidc.metadata.authorizationEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/authorize
  227. maxkey.oidc.metadata.tokenEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/token
  228. maxkey.oidc.metadata.userinfoEndpoint =${maxkey.server.authz.uri}/api/connect/userinfo
  229. #############################################################################
  230. #SAML V2.0 configuration #
  231. #############################################################################
  232. #saml common
  233. maxkey.saml.v20.max.parser.pool.size =2
  234. maxkey.saml.v20.assertion.validity.time.ins.seconds =90
  235. maxkey.saml.v20.replay.cache.life.in.millis =14400000
  236. maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds =90
  237. maxkey.saml.v20.issue.instant.check.validity.time.in.seconds =300
  238. #saml Identity Provider keystore
  239. maxkey.saml.v20.idp.keystore.password =maxkey
  240. maxkey.saml.v20.idp.keystore.private.key.password =maxkey
  241. maxkey.saml.v20.idp.keystore =classpath\:config/samlServerKeystore.jks
  242. #keystore Identity Provider for security
  243. maxkey.saml.v20.idp.issuing.entity.id =maxkey.top
  244. maxkey.saml.v20.idp.issuer =${maxkey.server.authz.uri}/saml
  245. maxkey.saml.v20.idp.receiver.endpoint =https\://sso.maxkey.top/
  246. #Saml v20 Identity Provider METADATA
  247. maxkey.saml.v20.metadata.orgName =MaxKeyTop
  248. maxkey.saml.v20.metadata.orgDisplayName =MaxKeyTop
  249. maxkey.saml.v20.metadata.orgURL =https://www.maxkey.top
  250. maxkey.saml.v20.metadata.contactType =technical
  251. maxkey.saml.v20.metadata.company =MaxKeyTop
  252. maxkey.saml.v20.metadata.givenName =maxkey
  253. maxkey.saml.v20.metadata.surName =maxkey
  254. maxkey.saml.v20.metadata.emailAddress =maxkeysupport@163.com
  255. maxkey.saml.v20.metadata.telephoneNumber =4008981111
  256. #saml RelayParty keystore
  257. maxkey.saml.v20.sp.keystore.password =maxkey
  258. maxkey.saml.v20.sp.keystore.private.key.password =maxkey
  259. maxkey.saml.v20.sp.keystore =classpath\:config/samlClientKeystore.jks
  260. maxkey.saml.v20.sp.issuing.entity.id =client.maxkey.org
  261. ############################################################################
  262. #Management endpoints configuration #
  263. ############################################################################
  264. management.security.enabled =false
  265. #management.endpoints.jmx.exposure.include=health,info
  266. #management.endpoints.web.exposure.include=metrics,health,info,env,prometheus
  267. management.endpoints.web.exposure.include =*
  268. management.endpoint.health.show-details =ALWAYS
  269. #Spring Boot Admin Client
  270. spring.boot.admin.client.url =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
  271. management.health.redis.enabled =false
  272. management.health.mail.enabled =false
  273. ############################################################################
  274. #Do not modify the following configuration
  275. ############################################################################
  276. #springfox.documentation.swagger.v2.path=/api-docs #
  277. #Swagger Configure Properties #
  278. ############################################################################
  279. maxkey.swagger.enable =true
  280. maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  281. maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  282. maxkey.swagger.version =${application.formatted-version}
  283. ############################################################################
  284. #freemarker configuration #
  285. ############################################################################
  286. spring.freemarker.template-loader-path =classpath:/templates/views
  287. spring.freemarker.cache =false
  288. spring.freemarker.charset =UTF-8
  289. spring.freemarker.check-template-location =true
  290. spring.freemarker.content-type =text/html
  291. spring.freemarker.expose-request-attributes =false
  292. spring.freemarker.expose-session-attributes =false
  293. spring.freemarker.request-context-attribute =request
  294. spring.freemarker.suffix =.ftl
  295. ############################################################################
  296. #static resources configuration #
  297. ############################################################################
  298. spring.mvc.static-path-pattern =/static/**
  299. spring.messages.basename =classpath:messages/message
  300. spring.messages.encoding =UTF-8
  301. ############################################################################
  302. #server servlet encoding configuration #
  303. ############################################################################
  304. #encoding
  305. #server.servlet.encoding.charset=UTF-8
  306. #server.servlet.encoding.enabled=true
  307. #server.servlet.encoding.force=true
  308. ############################################################################
  309. #Servlet multipart configuration #
  310. ############################################################################
  311. spring.servlet.multipart.enabled =true
  312. spring.servlet.multipart.max-file-size =4194304