application-maxkey-mgt.properties 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. ############################################################################
  2. # Copyright [2022] [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 =${SERVER_PERSISTENCE:0}
  36. #identity true,false
  37. maxkey.server.provision =${SERVER_PROVISION:false}
  38. #jwt token
  39. maxkey.auth.jwt.expires =${SERVER_EXPIRES:600}
  40. maxkey.auth.jwt.secret =7heM-14BtxjyKPuH3ITIm7q2-ps5MuBirWCsrrdbzzSAOuSPrbQYiaJ54AeA0uH2XdkYy3hHAkTFIsieGkyqxOJZ_dQzrCbaYISH9rhUZAKYx8tUY0wkE4ArOC6LqHDJarR6UIcMsARakK9U4dhoOPO1cj74XytemI-w6ACYfzRUn_Rn4e-CQMcnD1C56oNEukwalf06xVgXl41h6K8IBEzLVod58y_VfvFn-NGWpNG0fy_Qxng6dg8Dgva2DobvzMN2eejHGLGB-x809MvC4zbG7CKNVlcrzMYDt2Gt2sOVDrt2l9YqJNfgaLFjrOEVw5cuXemGkX1MvHj6TAsbLg
  41. #must > jwt expire * 2
  42. maxkey.auth.jwt.refresh.expires =${SERVER_REFRESH_EXPIRES:1800}
  43. maxkey.auth.jwt.refresh.secret =7heM-14BtxjyKPuH3ITIm7q2-ps5MuBirWCsrrdbzzSAOuSPrbQYiaJ54AeA0uH2XdkYy3hHAkTFIsieGkyqxOJZ_dQzrCbaYISH9rhUZAKYx8tUY0wkE4ArOC6LqHDJarR6UIcMsARakK9U4dhoOPO1cj74XytemI-w6ACYfzRUn_Rn4e-CQMcnD1C56oNEukwalf06xVgXl41h6K8IBEzLVod58y_VfvFn-NGWpNG0fy_Qxng6dg8Dgva2DobvzMN2eejHGLGB-x809MvC4zbG7CKNVlcrzMYDt2Gt2sOVDrt2l9YqJNfgaLFjrOEVw5cuXemGkX1MvHj6TAsbLg
  44. maxkey.auth.jwt.issuer =${maxkey.server.uri}
  45. #plain,bcrypt,pbkdf2,scrypt,md4,md5,sha1,sha256,sha384,sha512,sm3,ldap
  46. maxkey.crypto.password.encoder =bcrypt
  47. ############################################################################
  48. #Login configuration #
  49. ############################################################################
  50. #enable captcha
  51. maxkey.login.captcha =${LOGIN_CAPTCHA:true}
  52. #TEXT ARITHMETIC
  53. maxkey.login.captcha.type =${LOGIN_CAPTCHA:ARITHMETIC}
  54. #enable two factor,use one time password
  55. maxkey.login.mfa =false
  56. #Enable kerberos/SPNEGO
  57. maxkey.login.kerberos =false
  58. #wsFederation
  59. maxkey.login.wsfederation =false
  60. #remeberme
  61. maxkey.login.remeberme =false
  62. #validity
  63. maxkey.login.remeberme.validity =0
  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. #CAS support
  70. maxkey.login.cas.serverUrlPrefix =${LOGIN_CAS_SERVER:http://sso.maxkey.top/sign/authz/cas}
  71. maxkey.login.cas.service =${LOGIN_CAS_SERVICE:http://mgt.maxkey.top/maxkey-mgt/passport/trust/auth}
  72. ############################################################################
  73. #database configuration
  74. # supported database
  75. # mysql
  76. # highgo
  77. # postgresql
  78. ############################################################################
  79. spring.datasource.type =com.alibaba.druid.pool.DruidDataSource
  80. #mysql
  81. spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
  82. spring.datasource.username =${DATABASE_USER:root}
  83. spring.datasource.password =${DATABASE_PWD:maxkey}
  84. spring.datasource.url =jdbc:mysql://${DATABASE_HOST:localhost}:${DATABASE_PORT:3306}/${DATABASE_NAME:maxkey}?allowPublicKeyRetrieval=true&useSSL=false&autoReconnect=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
  85. #highgo
  86. #spring.datasource.driver-class-name=com.highgo.jdbc.Driver
  87. #spring.datasource.username=highgo
  88. #spring.datasource.password=High@123
  89. #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
  90. #postgresql
  91. #spring.datasource.driver-class-name=org.postgresql.Driver
  92. #spring.datasource.username=root
  93. #spring.datasource.password=maxkey!
  94. #spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
  95. #mybatis
  96. mybatis.dialect =mysql
  97. mybatis.type-aliases-package =org.dromara.maxkey.entity,org.dromara.maxkey.entity.apps,
  98. mybatis.mapper-locations =classpath*:/org/dromara/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
  99. mybatis.table-column-snowflake-datacenter-id =1
  100. mybatis.table-column-snowflake-machine-id =1
  101. mybatis.table-column-escape =false
  102. mybatis.table-column-case =lowercase
  103. ############################################################################
  104. #spring json
  105. spring.jackson.time-zone=GMT+8
  106. spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
  107. # default-property-inclusion: NON_NULL
  108. spring.mvc.date-format=yyyy-MM-dd HH:mm:ss
  109. ############################################################################
  110. #redis server configuration #
  111. ############################################################################
  112. spring.redis.host =${REDIS_HOST:127.0.0.1}
  113. spring.redis.port =${REDIS_PORT:6379}
  114. spring.redis.password =${REDIS_PWD:password}
  115. spring.redis.timeout =10000
  116. spring.redis.jedis.pool.max-wait =1000
  117. spring.redis.jedis.pool.max-idle =200
  118. spring.redis.lettuce.pool.max-active =-1
  119. spring.redis.lettuce.pool.min-idle =0
  120. ############################################################################
  121. #mail configuration #
  122. ############################################################################
  123. spring.mail.default-encoding =utf-8
  124. spring.mail.host =${MAIL_HOST:smtp.163.com}
  125. spring.mail.port =${MAIL_PORT:465}
  126. spring.mail.username =${MAIL_USER:maxkey@163.com}
  127. spring.mail.password =${MAIL_PWD:password}
  128. spring.mail.protocol =smtp
  129. spring.mail.properties.ssl =true
  130. spring.mail.properties.sender =${MAIL_SENDER:maxkey@163.com}
  131. spring.mail.properties.mailotp.message.subject =MaxKey One Time PassWord
  132. spring.mail.properties.mailotp.message.template ={0} You Token is {1} , it validity in {2} minutes.
  133. spring.mail.properties.mailotp.message.type =html
  134. spring.mail.properties.mailotp.message.validity =300
  135. ############################################################################
  136. #Time-based One-Time Password configuration #
  137. ############################################################################
  138. maxkey.otp.policy.type =totp
  139. maxkey.otp.policy.digits =6
  140. maxkey.otp.policy.issuer =${OTP_POLICY_ISSUER:MaxKey}
  141. maxkey.otp.policy.domain =${maxkey.server.domain}
  142. maxkey.otp.policy.period =30
  143. #############################################################################
  144. #SAML V2.0 configuration #
  145. #############################################################################
  146. #saml common
  147. maxkey.saml.v20.max.parser.pool.size =2
  148. maxkey.saml.v20.assertion.validity.time.ins.seconds =90
  149. maxkey.saml.v20.replay.cache.life.in.millis =14400000
  150. maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds =90
  151. maxkey.saml.v20.issue.instant.check.validity.time.in.seconds =300
  152. #saml Identity Provider keystore
  153. maxkey.saml.v20.idp.keystore.password =maxkey
  154. maxkey.saml.v20.idp.keystore.private.key.password =maxkey
  155. maxkey.saml.v20.idp.keystore =classpath\:config/samlServerKeystore.jks
  156. #keystore Identity Provider for security
  157. maxkey.saml.v20.idp.issuing.entity.id =maxkey.top
  158. maxkey.saml.v20.idp.issuer =${maxkey.server.authz.uri}/saml
  159. maxkey.saml.v20.idp.receiver.endpoint =https\://sso.maxkey.top/
  160. #Saml v20 Identity Provider METADATA
  161. maxkey.saml.v20.metadata.orgName =MaxKeyTop
  162. maxkey.saml.v20.metadata.orgDisplayName =MaxKeyTop
  163. maxkey.saml.v20.metadata.orgURL =https://www.maxkey.top
  164. maxkey.saml.v20.metadata.contactType =technical
  165. maxkey.saml.v20.metadata.company =MaxKeyTop
  166. maxkey.saml.v20.metadata.givenName =maxkey
  167. maxkey.saml.v20.metadata.surName =maxkey
  168. maxkey.saml.v20.metadata.emailAddress =support@maxsso.net
  169. maxkey.saml.v20.metadata.telephoneNumber =4008981111
  170. #saml RelayParty keystore
  171. maxkey.saml.v20.sp.keystore.password =maxkey
  172. maxkey.saml.v20.sp.keystore.private.key.password =maxkey
  173. maxkey.saml.v20.sp.keystore =classpath\:config/samlClientKeystore.jks
  174. maxkey.saml.v20.sp.issuing.entity.id =client.maxkey.org
  175. #############################################################################
  176. #OIDC V1.0 METADATA configuration #
  177. #############################################################################
  178. maxkey.oidc.metadata.issuer =${maxkey.server.authz.uri}
  179. maxkey.oidc.metadata.authorizationEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/authorize
  180. maxkey.oidc.metadata.tokenEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/token
  181. maxkey.oidc.metadata.userinfoEndpoint =${maxkey.server.authz.uri}/api/connect/userinfo
  182. #############################################################################
  183. #Job Scheduler #
  184. #############################################################################
  185. #one hour for refresh Schedule
  186. maxkey.job.cron.schedule =0 0 0/1 * * ?
  187. maxkey.job.cron.enable =true
  188. ############################################################################
  189. #Management endpoints configuration #
  190. ############################################################################
  191. management.security.enabled =false
  192. #management.endpoints.jmx.exposure.include=health,info
  193. #management.endpoints.web.exposure.include=metrics,health,info,env,prometheus
  194. management.endpoints.web.exposure.include =*
  195. management.endpoint.health.show-details =ALWAYS
  196. management.health.redis.enabled =false
  197. management.health.mail.enabled =false
  198. #Spring Boot Admin Client
  199. spring.boot.admin.client.enabled =${SPRING_BOOT_ADMIN_ENABLED:false}
  200. spring.boot.admin.client.url =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
  201. spring.boot.admin.client.username =${SPRING_BOOT_ADMIN_USERNAME:}
  202. spring.boot.admin.client.password =${SPRING_BOOT_ADMIN_PASSWORD:}
  203. ############################################################################
  204. #Do not modify the following configuration
  205. ############################################################################
  206. #springfox.documentation.swagger.v2.path=/api-docs #
  207. #Swagger Configure Properties #
  208. ############################################################################
  209. maxkey.swagger.enable =true
  210. maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  211. maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  212. maxkey.swagger.version =${application.formatted-version}
  213. springdoc.swagger-ui.path =/swagger-ui.html
  214. springdoc.swagger-ui.enabled =true
  215. springdoc.swagger-ui.tags-sorter =alpha
  216. springdoc.swagger-ui.operations-sorter =alpha
  217. springdoc.swagger-ui.showExtensions =true
  218. springdoc.api-docs.path =/v3/api-docs
  219. springdoc.group-configs[0].group =default
  220. springdoc.group-configs[0].paths-to-match =/*
  221. springdoc.group-configs[0].packages-to-scan =org.dromara.maxkey
  222. knife4j.enable =true
  223. knife4j.setting.language =ZH_CN
  224. knife4j.setting.swagger-model-name =\u5B9E\u4F53\u7C7B\u5217\u8868
  225. ############################################################################
  226. #freemarker configuration #
  227. ############################################################################
  228. spring.freemarker.template-loader-path =classpath:/templates/views
  229. spring.freemarker.cache =false
  230. spring.freemarker.charset =UTF-8
  231. spring.freemarker.check-template-location =true
  232. spring.freemarker.content-type =text/html
  233. spring.freemarker.expose-request-attributes =false
  234. spring.freemarker.expose-session-attributes =false
  235. spring.freemarker.request-context-attribute =request
  236. spring.freemarker.suffix =.ftl
  237. ############################################################################
  238. #static resources configuration #
  239. ############################################################################
  240. spring.mvc.static-path-pattern =/static/**
  241. ############################################################################
  242. #server servlet encoding configuration #
  243. ############################################################################
  244. #encoding
  245. #server.servlet.encoding.charset=UTF-8
  246. #server.servlet.encoding.enabled=true
  247. #server.servlet.encoding.force=true
  248. ############################################################################
  249. #Servlet multipart configuration #
  250. ############################################################################
  251. spring.servlet.multipart.enabled =true
  252. spring.servlet.multipart.max-file-size =4194304