application-maxkey-openapi.properties 16 KB

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