application-http.properties 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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 =${SERVER_PORT:9526}
  20. #server context path
  21. server.servlet.context-path =/maxkey-mgt-api
  22. ############################################################################
  23. #domain name configuration #
  24. ############################################################################
  25. maxkey.server.scheme =http
  26. maxkey.server.basedomain =${SERVER_DOMAIN:maxkey.top}
  27. maxkey.server.domain =sso.${maxkey.server.basedomain}
  28. maxkey.server.name =${maxkey.server.scheme}://${maxkey.server.domain}
  29. maxkey.server.uri =${maxkey.server.name}:${server.port}${server.servlet.context-path}
  30. #default.uri
  31. maxkey.server.default.uri =${maxkey.server.uri}/main
  32. maxkey.server.mgt.uri =${maxkey.server.uri}
  33. maxkey.server.authz.uri =https://${maxkey.server.domain}/maxkey
  34. #InMemory 0 , Redis 2
  35. maxkey.server.persistence =0
  36. #identity none, provision
  37. maxkey.server.message.queue =${SERVER_MESSAGE_QUEUE:none}
  38. maxkey.session.timeout =${SERVER_SESSION_TIMEOUT:1800}
  39. maxkey.auth.jwt.issuer =${maxkey.server.uri}
  40. #default 900
  41. maxkey.auth.jwt.expires =900
  42. maxkey.auth.jwt.secret =7heM-14BtxjyKPuH3ITIm7q2-ps5MuBirWCsrrdbzzSAOuSPrbQYiaJ54AeA0uH2XdkYy3hHAkTFIsieGkyqxOJZ_dQzrCbaYISH9rhUZAKYx8tUY0wkE4ArOC6LqHDJarR6UIcMsARakK9U4dhoOPO1cj74XytemI-w6ACYfzRUn_Rn4e-CQMcnD1C56oNEukwalf06xVgXl41h6K8IBEzLVod58y_VfvFn-NGWpNG0fy_Qxng6dg8Dgva2DobvzMN2eejHGLGB-x809MvC4zbG7CKNVlcrzMYDt2Gt2sOVDrt2l9YqJNfgaLFjrOEVw5cuXemGkX1MvHj6TAsbLg
  43. maxkey.auth.jwt.refresh.secret =7heM-14BtxjyKPuH3ITIm7q2-ps5MuBirWCsrrdbzzSAOuSPrbQYiaJ54AeA0uH2XdkYy3hHAkTFIsieGkyqxOJZ_dQzrCbaYISH9rhUZAKYx8tUY0wkE4ArOC6LqHDJarR6UIcMsARakK9U4dhoOPO1cj74XytemI-w6ACYfzRUn_Rn4e-CQMcnD1C56oNEukwalf06xVgXl41h6K8IBEzLVod58y_VfvFn-NGWpNG0fy_Qxng6dg8Dgva2DobvzMN2eejHGLGB-x809MvC4zbG7CKNVlcrzMYDt2Gt2sOVDrt2l9YqJNfgaLFjrOEVw5cuXemGkX1MvHj6TAsbLg
  44. ############################################################################
  45. #Login configuration #
  46. ############################################################################
  47. #enable captcha
  48. maxkey.login.captcha =${LOGIN_CAPTCHA:true}
  49. #enable two factor,use one time password
  50. maxkey.login.mfa =false
  51. #Enable kerberos/SPNEGO
  52. maxkey.login.kerberos =false
  53. #wsFederation
  54. maxkey.login.wsfederation =false
  55. #remeberme
  56. maxkey.login.remeberme =false
  57. #validity
  58. maxkey.login.remeberme.validity =0
  59. #ipaddress whitelist
  60. maxkey.ipaddress.whitelist =false
  61. #JWT support
  62. maxkey.login.jwt =${LOGIN_JWT:true}
  63. maxkey.login.jwt.issuer =${LOGIN_JWT_ISSUER:${maxkey.server.authz.uri}}
  64. ############################################################################
  65. #database configuration
  66. # supported database
  67. # mysql
  68. # highgo
  69. # postgresql
  70. ############################################################################
  71. spring.datasource.type =com.alibaba.druid.pool.DruidDataSource
  72. #mysql
  73. spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
  74. spring.datasource.username =${DATABASE_USER:root}
  75. spring.datasource.password =${DATABASE_PWD:maxkey}
  76. spring.datasource.url =jdbc:mysql://${DATABASE_HOST:localhost}:${DATABASE_PORT:3306}/${DATABASE_NAME:maxkey}?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
  77. #highgo
  78. #spring.datasource.driver-class-name=com.highgo.jdbc.Driver
  79. #spring.datasource.username=highgo
  80. #spring.datasource.password=High@123
  81. #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
  82. #postgresql
  83. #spring.datasource.driver-class-name=org.postgresql.Driver
  84. #spring.datasource.username=root
  85. #spring.datasource.password=maxkey!
  86. #spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
  87. #mybatis
  88. mybatis.dialect =mysql
  89. mybatis.type-aliases-package =org.maxkey.entity,org.maxkey.entity.apps,
  90. mybatis.mapper-locations =classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
  91. mybatis.table-column-snowflake-datacenter-id =1
  92. mybatis.table-column-snowflake-machine-id =1
  93. mybatis.table-column-escape =false
  94. mybatis.table-column-case =lowercase
  95. ############################################################################
  96. #redis server configuration #
  97. ############################################################################
  98. spring.redis.host =${REDIS_HOST:127.0.0.1}
  99. spring.redis.port =${REDIS_PORT:6379}
  100. spring.redis.password =${REDIS_PWD:password}
  101. spring.redis.timeout =10000
  102. spring.redis.jedis.pool.max-wait =1000
  103. spring.redis.jedis.pool.max-idle =200
  104. spring.redis.lettuce.pool.max-active =-1
  105. spring.redis.lettuce.pool.min-idle =0
  106. ############################################################################
  107. #mail configuration #
  108. ############################################################################
  109. spring.mail.default-encoding =utf-8
  110. spring.mail.host =${MAIL_HOST:smtp.163.com}
  111. spring.mail.port =${MAIL_PORT:465}
  112. spring.mail.username =${MAIL_USER:maxkey@163.com}
  113. spring.mail.password =${MAIL_PWD:password}
  114. spring.mail.protocol =smtp
  115. spring.mail.properties.ssl =true
  116. spring.mail.properties.sender =${MAIL_SENDER:maxkey@163.com}
  117. spring.mail.properties.mailotp.message.subject =MaxKey One Time PassWord
  118. spring.mail.properties.mailotp.message.template ={0} You Token is {1} , it validity in {2} minutes.
  119. spring.mail.properties.mailotp.message.type =html
  120. spring.mail.properties.mailotp.message.validity =300
  121. ############################################################################
  122. #Time-based One-Time Password configuration #
  123. ############################################################################
  124. maxkey.otp.policy.type =totp
  125. maxkey.otp.policy.digits =6
  126. maxkey.otp.policy.issuer =${OTP_POLICY_ISSUER:MaxKey}
  127. maxkey.otp.policy.domain =${maxkey.server.domain}
  128. maxkey.otp.policy.period =30
  129. #############################################################################
  130. #SAML V2.0 configuration #
  131. #############################################################################
  132. #saml common
  133. maxkey.saml.v20.max.parser.pool.size =2
  134. maxkey.saml.v20.assertion.validity.time.ins.seconds =90
  135. maxkey.saml.v20.replay.cache.life.in.millis =14400000
  136. maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds =90
  137. maxkey.saml.v20.issue.instant.check.validity.time.in.seconds =300
  138. #saml Identity Provider keystore
  139. maxkey.saml.v20.idp.keystore.password =maxkey
  140. maxkey.saml.v20.idp.keystore.private.key.password =maxkey
  141. maxkey.saml.v20.idp.keystore =classpath\:config/samlServerKeystore.jks
  142. #keystore Identity Provider for security
  143. maxkey.saml.v20.idp.issuing.entity.id =maxkey.top
  144. maxkey.saml.v20.idp.issuer =${maxkey.server.authz.uri}/saml
  145. maxkey.saml.v20.idp.receiver.endpoint =https\://sso.maxkey.top/
  146. #Saml v20 Identity Provider METADATA
  147. maxkey.saml.v20.metadata.orgName =MaxKeyTop
  148. maxkey.saml.v20.metadata.orgDisplayName =MaxKeyTop
  149. maxkey.saml.v20.metadata.orgURL =https://www.maxkey.top
  150. maxkey.saml.v20.metadata.contactType =technical
  151. maxkey.saml.v20.metadata.company =MaxKeyTop
  152. maxkey.saml.v20.metadata.givenName =maxkey
  153. maxkey.saml.v20.metadata.surName =maxkey
  154. maxkey.saml.v20.metadata.emailAddress =maxkeysupport@163.com
  155. maxkey.saml.v20.metadata.telephoneNumber =4008981111
  156. #saml RelayParty keystore
  157. maxkey.saml.v20.sp.keystore.password =maxkey
  158. maxkey.saml.v20.sp.keystore.private.key.password =maxkey
  159. maxkey.saml.v20.sp.keystore =classpath\:config/samlClientKeystore.jks
  160. maxkey.saml.v20.sp.issuing.entity.id =client.maxkey.org
  161. #############################################################################
  162. #OIDC V1.0 METADATA configuration #
  163. #############################################################################
  164. maxkey.oidc.metadata.issuer =${maxkey.server.authz.uri}
  165. maxkey.oidc.metadata.authorizationEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/authorize
  166. maxkey.oidc.metadata.tokenEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/token
  167. maxkey.oidc.metadata.userinfoEndpoint =${maxkey.server.authz.uri}/api/connect/userinfo
  168. #############################################################################
  169. #Job Scheduler #
  170. #############################################################################
  171. #one hour for refresh Schedule
  172. maxkey.job.cron.schedule =0 0 0/1 * * ?
  173. maxkey.job.cron.enable =true
  174. ############################################################################
  175. #Management endpoints configuration #
  176. ############################################################################
  177. management.security.enabled =false
  178. #management.endpoints.jmx.exposure.include=health,info
  179. #management.endpoints.web.exposure.include=metrics,health,info,env,prometheus
  180. management.endpoints.web.exposure.include =*
  181. management.endpoint.health.show-details =ALWAYS
  182. #Spring Boot Admin Client
  183. spring.boot.admin.client.url =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
  184. management.health.redis.enabled =false
  185. management.health.mail.enabled =false
  186. ############################################################################
  187. #Do not modify the following configuration
  188. ############################################################################
  189. #springfox.documentation.swagger.v2.path=/api-docs #
  190. #Swagger Configure Properties #
  191. ############################################################################
  192. maxkey.swagger.enable =true
  193. maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  194. maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  195. maxkey.swagger.version =${application.formatted-version}
  196. ############################################################################
  197. #static resources configuration #
  198. ############################################################################
  199. spring.mvc.static-path-pattern =/static/**
  200. ############################################################################
  201. #server servlet encoding configuration #
  202. ############################################################################
  203. #encoding
  204. #server.servlet.encoding.charset=UTF-8
  205. #server.servlet.encoding.enabled=true
  206. #server.servlet.encoding.force=true
  207. ############################################################################
  208. #Servlet multipart configuration #
  209. ############################################################################
  210. spring.servlet.multipart.enabled =true
  211. spring.servlet.multipart.max-file-size =4194304