application-maxkey-openapi.properties 16 KB

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