application-http.properties 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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. #MaxKey Server configuration #
  17. ############################################################################
  18. #server port
  19. server.port =9527
  20. #server context path
  21. server.servlet.context-path =/maxkey-mgt
  22. #nacos discovery
  23. spring.cloud.nacos.discovery.enabled =${NACOS_DISCOVERY_ENABLED:false}
  24. spring.cloud.nacos.discovery.instance-enabled =false
  25. spring.cloud.nacos.discovery.server-addr =${NACOS_DISCOVERY_SERVER_ADDR:127.0.0.1:8848}
  26. ############################################################################
  27. #domain name configuration #
  28. ############################################################################
  29. maxkey.server.scheme =http
  30. maxkey.server.basedomain =${SERVER_DOMAIN:maxkey.top}
  31. maxkey.server.domain =sso.${maxkey.server.basedomain}
  32. maxkey.server.name =${maxkey.server.scheme}://${maxkey.server.domain}
  33. maxkey.server.uri =${maxkey.server.name}:9527${server.servlet.context-path}
  34. #default.uri
  35. maxkey.server.default.uri =${maxkey.server.uri}/main
  36. maxkey.server.mgt.uri =${maxkey.server.uri}
  37. maxkey.server.authz.uri =https://${maxkey.server.domain}/maxkey
  38. #InMemory 0 , Redis 2
  39. maxkey.server.persistence =0
  40. #identity none, Kafka ,RocketMQ
  41. maxkey.server.message.queue =${SERVER_MESSAGE_QUEUE:none}
  42. ############################################################################
  43. #Login configuration #
  44. ############################################################################
  45. #enable captcha
  46. maxkey.login.captcha =${LOGIN_CAPTCHA:true}
  47. #text or arithmetic
  48. maxkey.login.captcha.type =${LOGIN_CAPTCHA_TYPE:text}
  49. #enable two factor,use one time password
  50. maxkey.login.mfa =false
  51. #enable social sign on
  52. maxkey.login.socialsignon =false
  53. #Enable kerberos/SPNEGO
  54. maxkey.login.kerberos =false
  55. #wsFederation
  56. maxkey.login.wsfederation =false
  57. #remeberme
  58. maxkey.login.remeberme =false
  59. #validity
  60. maxkey.login.remeberme.validity =0
  61. #default.uri
  62. #to appList page
  63. maxkey.login.default.uri =appList
  64. #ipaddress whitelist
  65. maxkey.ipaddress.whitelist =false
  66. #JWT support
  67. maxkey.login.jwt =${LOGIN_JWT:true}
  68. maxkey.login.jwt.issuer =${LOGIN_JWT_ISSUER:${maxkey.server.authz.uri}}
  69. ############################################################################
  70. #database configuration
  71. # supported database
  72. # mysql
  73. # highgo
  74. # postgresql
  75. ############################################################################
  76. spring.datasource.type =com.alibaba.druid.pool.DruidDataSource
  77. #mysql
  78. spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
  79. spring.datasource.username =${DATABASE_USER:root}
  80. spring.datasource.password =${DATABASE_PWD:maxkey}
  81. spring.datasource.url =jdbc:mysql://${DATABASE_HOST:localhost}:${DATABASE_PORT:3306}/${DATABASE_NAME:maxkey}?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
  82. #highgo
  83. #spring.datasource.driver-class-name=com.highgo.jdbc.Driver
  84. #spring.datasource.username=highgo
  85. #spring.datasource.password=High@123
  86. #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
  87. #postgresql
  88. #spring.datasource.driver-class-name=org.postgresql.Driver
  89. #spring.datasource.username=root
  90. #spring.datasource.password=maxkey!
  91. #spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
  92. #mybatis
  93. mybatis.dialect =mysql
  94. mybatis.type-aliases-package =org.maxkey.entity,org.maxkey.entity.apps,
  95. mybatis.mapper-locations =classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
  96. mybatis.table-column-snowflake-datacenter-id =1
  97. mybatis.table-column-snowflake-machine-id =1
  98. mybatis.table-column-escape =false
  99. mybatis.table-column-case =lowercase
  100. ############################################################################
  101. #redis server configuration #
  102. ############################################################################
  103. spring.redis.host =${REDIS_HOST:127.0.0.1}
  104. spring.redis.port =${REDIS_PORT:6379}
  105. spring.redis.password =${REDIS_PWD:password}
  106. spring.redis.timeout =10000
  107. spring.redis.jedis.pool.max-wait =1000
  108. spring.redis.jedis.pool.max-idle =200
  109. spring.redis.lettuce.pool.max-active =-1
  110. spring.redis.lettuce.pool.min-idle =0
  111. ############################################################################
  112. #mail configuration #
  113. ############################################################################
  114. spring.mail.default-encoding =utf-8
  115. spring.mail.host =${MAIL_HOST:smtp.163.com}
  116. spring.mail.port =${MAIL_PORT:465}
  117. spring.mail.username =${MAIL_USER:maxkey@163.com}
  118. spring.mail.password =${MAIL_PWD:password}
  119. spring.mail.protocol =smtp
  120. spring.mail.properties.ssl =true
  121. spring.mail.properties.sender =${MAIL_SENDER:maxkey@163.com}
  122. spring.mail.properties.mailotp.message.subject =MaxKey One Time PassWord
  123. spring.mail.properties.mailotp.message.template ={0} You Token is {1} , it validity in {2} minutes.
  124. spring.mail.properties.mailotp.message.type =html
  125. spring.mail.properties.mailotp.message.validity =300
  126. ############################################################################
  127. #Spring Session for Cluster configuration #
  128. ############################################################################
  129. # Session store type.
  130. spring.session.store-type =none
  131. #spring.session.store-type=redis
  132. # Session timeout. If a duration suffix is not specified, seconds is used.
  133. #server.servlet.session.timeout=1800
  134. # Sessions flush mode.
  135. #spring.session.redis.flush-mode=on_save
  136. # Namespace for keys used to store sessions.
  137. #spring.session.redis.namespace=spring:session
  138. ############################################################################
  139. #Kafka for connectors configuration #
  140. ############################################################################
  141. spring.kafka.bootstrap-servers =${KAFKA_SERVERS:localhost:9092}
  142. # retries
  143. spring.kafka.producer.retries =0
  144. # acks
  145. spring.kafka.producer.acks =1
  146. # batch-size
  147. spring.kafka.producer.batch-size =16384
  148. # linger.ms
  149. spring.kafka.producer.properties.linger.ms =0
  150. # buffer-memory
  151. spring.kafka.producer.buffer-memory =33554432
  152. # serializer
  153. spring.kafka.producer.key-serializer =org.apache.kafka.common.serialization.StringSerializer
  154. spring.kafka.producer.value-serializer =org.apache.kafka.common.serialization.StringSerializer
  155. # partitioner
  156. #spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner
  157. ############################################################################
  158. #RocketMQ for connectors configuration #
  159. ############################################################################
  160. rocketmq.name-server=${ROCKETMQ_SERVERS:localhost:9876}
  161. rocketmq.producer.enable=true
  162. rocketmq.producer.group=maxkey_identity
  163. ############################################################################
  164. #Time-based One-Time Password configuration #
  165. ############################################################################
  166. maxkey.otp.policy.type =totp
  167. maxkey.otp.policy.digits =6
  168. maxkey.otp.policy.issuer =${OTP_POLICY_ISSUER:MaxKey}
  169. maxkey.otp.policy.domain =${maxkey.server.domain}
  170. maxkey.otp.policy.period =30
  171. #############################################################################
  172. #SAML V2.0 configuration #
  173. #############################################################################
  174. #saml common
  175. maxkey.saml.v20.max.parser.pool.size =2
  176. maxkey.saml.v20.assertion.validity.time.ins.seconds =90
  177. maxkey.saml.v20.replay.cache.life.in.millis =14400000
  178. maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds =90
  179. maxkey.saml.v20.issue.instant.check.validity.time.in.seconds =300
  180. #saml Identity Provider keystore
  181. maxkey.saml.v20.idp.keystore.password =maxkey
  182. maxkey.saml.v20.idp.keystore.private.key.password =maxkey
  183. maxkey.saml.v20.idp.keystore =classpath\:config/samlServerKeystore.jks
  184. #keystore Identity Provider for security
  185. maxkey.saml.v20.idp.issuing.entity.id =maxkey.top
  186. maxkey.saml.v20.idp.issuer =${maxkey.server.authz.uri}/saml
  187. maxkey.saml.v20.idp.receiver.endpoint =https\://sso.maxkey.top/
  188. #Saml v20 Identity Provider METADATA
  189. maxkey.saml.v20.metadata.orgName =MaxKeyTop
  190. maxkey.saml.v20.metadata.orgDisplayName =MaxKeyTop
  191. maxkey.saml.v20.metadata.orgURL =https://www.maxkey.top
  192. maxkey.saml.v20.metadata.contactType =technical
  193. maxkey.saml.v20.metadata.company =MaxKeyTop
  194. maxkey.saml.v20.metadata.givenName =maxkey
  195. maxkey.saml.v20.metadata.surName =maxkey
  196. maxkey.saml.v20.metadata.emailAddress =maxkeysupport@163.com
  197. maxkey.saml.v20.metadata.telephoneNumber =4008981111
  198. #saml RelayParty keystore
  199. maxkey.saml.v20.sp.keystore.password =maxkey
  200. maxkey.saml.v20.sp.keystore.private.key.password =maxkey
  201. maxkey.saml.v20.sp.keystore =classpath\:config/samlClientKeystore.jks
  202. maxkey.saml.v20.sp.issuing.entity.id =client.maxkey.org
  203. #############################################################################
  204. #OIDC V1.0 METADATA configuration #
  205. #############################################################################
  206. maxkey.oidc.metadata.issuer =${maxkey.server.authz.uri}
  207. maxkey.oidc.metadata.authorizationEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/authorize
  208. maxkey.oidc.metadata.tokenEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/token
  209. maxkey.oidc.metadata.userinfoEndpoint =${maxkey.server.authz.uri}/api/connect/userinfo
  210. #############################################################################
  211. #Job Scheduler #
  212. #############################################################################
  213. #one hour for refresh Schedule
  214. maxkey.job.cron.schedule =0 0 0/1 * * ?
  215. maxkey.job.cron.enable =true
  216. ############################################################################
  217. #Management endpoints configuration #
  218. ############################################################################
  219. management.security.enabled =false
  220. #management.endpoints.jmx.exposure.include=health,info
  221. #management.endpoints.web.exposure.include=metrics,health,info,env,prometheus
  222. management.endpoints.web.exposure.include =*
  223. management.endpoint.health.show-details =ALWAYS
  224. #Spring Boot Admin Client
  225. spring.boot.admin.client.url =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
  226. management.health.redis.enabled =false
  227. management.health.mail.enabled =false
  228. ############################################################################
  229. #Do not modify the following configuration
  230. ############################################################################
  231. #springfox.documentation.swagger.v2.path=/api-docs #
  232. #Swagger Configure Properties #
  233. ############################################################################
  234. maxkey.swagger.enable =true
  235. maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  236. maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  237. maxkey.swagger.version =${application.formatted-version}
  238. ############################################################################
  239. #freemarker configuration #
  240. ############################################################################
  241. spring.freemarker.template-loader-path =classpath:/templates/views
  242. spring.freemarker.cache =false
  243. spring.freemarker.charset =UTF-8
  244. spring.freemarker.check-template-location =true
  245. spring.freemarker.content-type =text/html
  246. spring.freemarker.expose-request-attributes =false
  247. spring.freemarker.expose-session-attributes =false
  248. spring.freemarker.request-context-attribute =request
  249. spring.freemarker.suffix =.ftl
  250. ############################################################################
  251. #static resources configuration #
  252. ############################################################################
  253. spring.mvc.static-path-pattern =/static/**
  254. spring.messages.basename =classpath:messages/message
  255. spring.messages.encoding =UTF-8
  256. ############################################################################
  257. #server servlet encoding configuration #
  258. ############################################################################
  259. #encoding
  260. #server.servlet.encoding.charset=UTF-8
  261. #server.servlet.encoding.enabled=true
  262. #server.servlet.encoding.force=true
  263. ############################################################################
  264. #Servlet multipart configuration #
  265. ############################################################################
  266. spring.servlet.multipart.enabled =true
  267. spring.servlet.multipart.max-file-size =4194304