application-maxkey.properties 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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. #spring.profiles.active=http #
  17. ############################################################################
  18. #server port
  19. server.port =${SERVER_PORT:9527}
  20. #session default 600
  21. #600s =10m
  22. #1800s =30m
  23. #3600s =1h
  24. #28800s =8h
  25. server.servlet.session.timeout =${SERVLET_SESSION_TIMEOUT:600}
  26. #server context path
  27. server.servlet.context-path =/sign
  28. server.frontend.port =${SERVER_FRONTEND_PORT:4200}
  29. ############################################################################
  30. #domain name configuration #
  31. ############################################################################
  32. maxkey.server.scheme =http
  33. maxkey.server.basedomain =${SERVER_DOMAIN:maxkey.top}
  34. maxkey.server.domain =sso.${maxkey.server.basedomain}
  35. maxkey.server.name =${maxkey.server.scheme}://${maxkey.server.domain}
  36. maxkey.server.uri =${maxkey.server.name}:${server.port}${server.servlet.context-path}
  37. #default.uri
  38. maxkey.server.default.uri =${maxkey.server.uri}/appList
  39. maxkey.server.mgt.uri =${maxkey.server.name}:9527/maxkey-mgt/login
  40. maxkey.server.authz.uri =${maxkey.server.name}:${server.port}${server.servlet.context-path}
  41. #http://sso.maxkey.top/sign
  42. #http://sso.maxkey.top:4200
  43. maxkey.server.frontend.uri =/maxkey
  44. #InMemory 0 , Redis 2
  45. maxkey.server.persistence =${SERVER_PERSISTENCE:0}
  46. #identity true,false
  47. maxkey.server.provision =${SERVER_PROVISION:false}
  48. #issuer name
  49. maxkey.app.issuer =CN=ConSec,CN=COM,CN=SH
  50. #jwt token
  51. maxkey.auth.jwt.expires =${SERVER_EXPIRES:600}
  52. maxkey.auth.jwt.secret =7heM-14BtxjyKPuH3ITIm7q2-ps5MuBirWCsrrdbzzSAOuSPrbQYiaJ54AeA0uH2XdkYy3hHAkTFIsieGkyqxOJZ_dQzrCbaYISH9rhUZAKYx8tUY0wkE4ArOC6LqHDJarR6UIcMsARakK9U4dhoOPO1cj74XytemI-w6ACYfzRUn_Rn4e-CQMcnD1C56oNEukwalf06xVgXl41h6K8IBEzLVod58y_VfvFn-NGWpNG0fy_Qxng6dg8Dgva2DobvzMN2eejHGLGB-x809MvC4zbG7CKNVlcrzMYDt2Gt2sOVDrt2l9YqJNfgaLFjrOEVw5cuXemGkX1MvHj6TAsbLg
  53. #must > jwt expire * 2
  54. maxkey.auth.jwt.refresh.expires =${SERVER_REFRESH_EXPIRES:1800}
  55. maxkey.auth.jwt.refresh.secret =7heM-14BtxjyKPuH3ITIm7q2-ps5MuBirWCsrrdbzzSAOuSPrbQYiaJ54AeA0uH2XdkYy3hHAkTFIsieGkyqxOJZ_dQzrCbaYISH9rhUZAKYx8tUY0wkE4ArOC6LqHDJarR6UIcMsARakK9U4dhoOPO1cj74XytemI-w6ACYfzRUn_Rn4e-CQMcnD1C56oNEukwalf06xVgXl41h6K8IBEzLVod58y_VfvFn-NGWpNG0fy_Qxng6dg8Dgva2DobvzMN2eejHGLGB-x809MvC4zbG7CKNVlcrzMYDt2Gt2sOVDrt2l9YqJNfgaLFjrOEVw5cuXemGkX1MvHj6TAsbLg
  56. maxkey.auth.jwt.issuer =${maxkey.server.uri}
  57. #plain,bcrypt,pbkdf2,scrypt,md4,md5,sha1,sha256,sha384,sha512,sm3,ldap
  58. maxkey.crypto.password.encoder =bcrypt
  59. ############################################################################
  60. #Login configuration #
  61. ############################################################################
  62. #enable captcha
  63. maxkey.login.captcha =${LOGIN_CAPTCHA:false}
  64. #enable two factor,use one time password
  65. maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
  66. #TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud
  67. maxkey.login.mfa.type =${LOGIN_MFA_TYPE:TimeBasedOtpAuthn}
  68. #enable social sign on
  69. maxkey.login.socialsignon =${LOGIN_SOCIAL_ENABLED:true}
  70. #Enable kerberos/SPNEGO
  71. maxkey.login.kerberos =false
  72. #wsFederation
  73. maxkey.login.wsfederation =false
  74. #remeberme
  75. maxkey.login.remeberme =${LOGIN_REMEBERME:true}
  76. #validity day
  77. maxkey.login.remeberme.validity =0
  78. #JWT support
  79. maxkey.login.jwt =${LOGIN_JWT:true}
  80. maxkey.login.jwt.issuer =${LOGIN_JWT_ISSUER:${maxkey.server.authz.uri}}
  81. #whitelist
  82. maxkey.ipaddress.whitelist =false
  83. #notices show
  84. maxkey.notices.visible =false
  85. ############################################################################
  86. #ssl configuration #
  87. ############################################################################
  88. #server.ssl.key-store=maxkeyserver.keystore
  89. #server.ssl.key-alias=maxkey
  90. #server.ssl.enabled=true
  91. #server.ssl.key-store-password=maxkey
  92. #server.ssl.key-store-type=JKS
  93. ############################################################################
  94. #database configuration
  95. # supported database
  96. # mysql
  97. # highgo
  98. # postgresql
  99. ############################################################################
  100. spring.datasource.type =com.alibaba.druid.pool.DruidDataSource
  101. #mysql
  102. spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
  103. spring.datasource.username =${DATABASE_USER:root}
  104. spring.datasource.password =${DATABASE_PWD:maxkey}
  105. spring.datasource.url =jdbc:mysql://${DATABASE_HOST:localhost}:${DATABASE_PORT:3306}/${DATABASE_NAME:maxkey}?allowPublicKeyRetrieval=true&useSSL=false&autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
  106. #highgo
  107. #spring.datasource.driver-class-name=com.highgo.jdbc.Driver
  108. #spring.datasource.username=highgo
  109. #spring.datasource.password=High@123
  110. #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
  111. #postgresql
  112. #spring.datasource.driver-class-name=org.postgresql.Driver
  113. #spring.datasource.username=root
  114. #spring.datasource.password=maxkey!
  115. #spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
  116. #mybatis
  117. mybatis.dialect =mysql
  118. mybatis.type-aliases-package =org.dromara.maxkey.entity,org.dromara.maxkey.entity.apps,
  119. mybatis.mapper-locations =classpath*:/org/dromara/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
  120. mybatis.table-column-snowflake-datacenter-id =1
  121. mybatis.table-column-snowflake-machine-id =1
  122. mybatis.table-column-escape =false
  123. mybatis.table-column-case =lowercase
  124. ############################################################################
  125. #spring json
  126. spring.jackson.time-zone=GMT+8
  127. spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
  128. # default-property-inclusion: NON_NULL
  129. spring.mvc.date-format=yyyy-MM-dd HH:mm:ss
  130. ############################################################################
  131. #redis server configuration #
  132. ############################################################################
  133. spring.redis.host =${REDIS_HOST:127.0.0.1}
  134. spring.redis.port =${REDIS_PORT:6379}
  135. spring.redis.password =${REDIS_PWD:password}
  136. spring.redis.timeout =10000
  137. spring.redis.jedis.pool.max-wait =1000
  138. spring.redis.jedis.pool.max-idle =200
  139. spring.redis.lettuce.pool.max-active =-1
  140. spring.redis.lettuce.pool.min-idle =0
  141. ############################################################################
  142. #mail configuration #
  143. ############################################################################
  144. spring.mail.default-encoding =utf-8
  145. spring.mail.host =${MAIL_HOST:smtp.163.com}
  146. spring.mail.port =${MAIL_PORT:465}
  147. spring.mail.username =${MAIL_USER:maxkey@163.com}
  148. spring.mail.password =${MAIL_PWD:password}
  149. spring.mail.protocol =smtp
  150. spring.mail.properties.ssl =true
  151. spring.mail.properties.sender =${MAIL_SENDER:maxkey@163.com}
  152. spring.mail.properties.mailotp.message.subject =MaxKey One Time PassWord
  153. spring.mail.properties.mailotp.message.template ={0} You Token is {1} , it validity in {2} minutes.
  154. spring.mail.properties.mailotp.message.type =html
  155. spring.mail.properties.mailotp.message.validity =300
  156. ############################################################################
  157. #Time-based One-Time Password configuration #
  158. ############################################################################
  159. maxkey.otp.policy.type =totp
  160. maxkey.otp.policy.digits =6
  161. maxkey.otp.policy.issuer =${OTP_POLICY_ISSUER:MaxKey}
  162. maxkey.otp.policy.domain =${maxkey.server.domain}
  163. maxkey.otp.policy.period =30
  164. ############################################################################
  165. #Kerberos Login configuration #
  166. #short name of user domain must be in upper case,eg:MAXKEY #
  167. ############################################################################
  168. maxkey.login.kerberos.default.userdomain =MAXKEY
  169. #short name of user domain must be in upper case,eg:MAXKEY.ORG
  170. maxkey.login.kerberos.default.fulluserdomain =MAXKEY.ORG
  171. #last 8Bit crypto for Kerberos web Authentication
  172. maxkey.login.kerberos.default.crypto =846KZSzYq56M6d5o
  173. #Kerberos Authentication server RUL
  174. maxkey.login.kerberos.default.redirecturi =http://sso.maxkey.top/kerberos/authn/
  175. ############################################################################
  176. #HTTPHEADER Login configuration #
  177. ############################################################################
  178. maxkey.login.httpheader.enable =false
  179. maxkey.login.httpheader.headername =header-user
  180. # iv-user is for IBM Security Access Manager
  181. #config.httpheader.headername=iv-user
  182. ############################################################################
  183. #BASIC Login support configuration #
  184. ############################################################################
  185. maxkey.login.basic.enable =false
  186. #############################################################################
  187. #WsFederation Login support configuration
  188. #identifier: the identifer for the ADFS server
  189. #url: the login url for ADFS
  190. #principal: the name of the attribute/assertion returned by ADFS that contains the principal's username.
  191. #relyingParty: the identifier of the CAS Server as it has been configured in ADFS.
  192. #tolerance: (optional) the amount of drift to allow when validating the timestamp on the token. Default: 10000 (ms)
  193. #attributeMutator: (optional) a class (defined by you) that can modify the attributes/assertions returned by the ADFS server
  194. #signingCertificate: ADFS's signing certificate used to validate the token/assertions issued by ADFS.
  195. ############################################################################
  196. maxkey.login.wsfederation.identifier =http://adfs.maxkey.top/adfs/services/trust
  197. maxkey.login.wsfederation.url =https://adfs.maxkey.top/adfs/ls/
  198. maxkey.login.wsfederation.principal =upn
  199. maxkey.login.wsfederation.relyingParty =urn:federation:connsec
  200. maxkey.login.wsfederation.signingCertificate =adfs-signing.crt
  201. maxkey.login.wsfederation.tolerance =10000
  202. maxkey.login.wsfederation.upn.suffix =maxkey.org
  203. maxkey.login.wsfederation.logoutUrl =https://adfs.maxkey.top/adfs/ls/?wa=wsignout1.0
  204. #############################################################################
  205. #OIDC V1.0 METADATA configuration #
  206. #############################################################################
  207. maxkey.oidc.metadata.issuer =${maxkey.server.authz.uri}
  208. maxkey.oidc.metadata.authorizationEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/authorize
  209. maxkey.oidc.metadata.tokenEndpoint =${maxkey.server.authz.uri}/authz/oauth/v20/token
  210. maxkey.oidc.metadata.userinfoEndpoint =${maxkey.server.authz.uri}/api/connect/userinfo
  211. #############################################################################
  212. #SAML V2.0 configuration #
  213. #############################################################################
  214. #saml common
  215. maxkey.saml.v20.max.parser.pool.size =2
  216. maxkey.saml.v20.assertion.validity.time.ins.seconds =90
  217. maxkey.saml.v20.replay.cache.life.in.millis =14400000
  218. maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds =90
  219. maxkey.saml.v20.issue.instant.check.validity.time.in.seconds =300
  220. #saml Identity Provider keystore
  221. maxkey.saml.v20.idp.keystore.password =maxkey
  222. maxkey.saml.v20.idp.keystore.private.key.password =maxkey
  223. maxkey.saml.v20.idp.keystore =classpath\:config/samlServerKeystore.jks
  224. #keystore Identity Provider for security
  225. maxkey.saml.v20.idp.issuing.entity.id =maxkey.top
  226. maxkey.saml.v20.idp.issuer =${maxkey.server.authz.uri}/saml
  227. maxkey.saml.v20.idp.receiver.endpoint =https\://sso.maxkey.top/
  228. #Saml v20 Identity Provider METADATA
  229. maxkey.saml.v20.metadata.orgName =MaxKeyTop
  230. maxkey.saml.v20.metadata.orgDisplayName =MaxKeyTop
  231. maxkey.saml.v20.metadata.orgURL =https://www.maxkey.top
  232. maxkey.saml.v20.metadata.contactType =technical
  233. maxkey.saml.v20.metadata.company =MaxKeyTop
  234. maxkey.saml.v20.metadata.givenName =maxkey
  235. maxkey.saml.v20.metadata.surName =maxkey
  236. maxkey.saml.v20.metadata.emailAddress =maxkeysupport@163.com
  237. maxkey.saml.v20.metadata.telephoneNumber =4008981111
  238. #saml RelayParty keystore
  239. maxkey.saml.v20.sp.keystore.password =maxkey
  240. maxkey.saml.v20.sp.keystore.private.key.password =maxkey
  241. maxkey.saml.v20.sp.keystore =classpath\:config/samlClientKeystore.jks
  242. maxkey.saml.v20.sp.issuing.entity.id =client.maxkey.org
  243. ############################################################################
  244. #Management endpoints configuration #
  245. ############################################################################
  246. management.security.enabled =false
  247. #management.endpoints.jmx.exposure.include=health,info
  248. #management.endpoints.web.exposure.include=metrics,health,info,env,prometheus
  249. management.endpoints.web.exposure.include =*
  250. management.endpoint.health.show-details =ALWAYS
  251. management.health.redis.enabled =false
  252. management.health.mail.enabled =false
  253. #Spring Boot Admin Client
  254. spring.boot.admin.client.enabled =${SPRING_BOOT_ADMIN_ENABLED:false}
  255. spring.boot.admin.client.url =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
  256. spring.boot.admin.client.username =${SPRING_BOOT_ADMIN_USERNAME:}
  257. spring.boot.admin.client.password =${SPRING_BOOT_ADMIN_PASSWORD:}
  258. ############################################################################
  259. #Do not modify the following configuration
  260. ############################################################################
  261. #springfox.documentation.swagger.v2.path=/api-docs #
  262. #Swagger Configure Properties #
  263. ############################################################################
  264. maxkey.swagger.enable =true
  265. maxkey.swagger.title =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  266. maxkey.swagger.description =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
  267. maxkey.swagger.version =${application.formatted-version}
  268. springdoc.swagger-ui.path =/swagger-ui.html
  269. springdoc.swagger-ui.enabled =true
  270. springdoc.swagger-ui.tags-sorter =alpha
  271. springdoc.swagger-ui.operations-sorter =alpha
  272. springdoc.swagger-ui.showExtensions =true
  273. springdoc.api-docs.path =/v3/api-docs
  274. springdoc.group-configs[0].group =default
  275. springdoc.group-configs[0].paths-to-match =/*
  276. springdoc.group-configs[0].packages-to-scan =org.dromara.maxkey
  277. knife4j.enable =true
  278. knife4j.setting.language =ZH_CN
  279. knife4j.setting.swagger-model-name =\u5B9E\u4F53\u7C7B\u5217\u8868
  280. ############################################################################
  281. #freemarker configuration #
  282. ############################################################################
  283. spring.freemarker.template-loader-path =classpath:/templates/views
  284. spring.freemarker.cache =false
  285. spring.freemarker.charset =UTF-8
  286. spring.freemarker.check-template-location =true
  287. spring.freemarker.content-type =text/html
  288. spring.freemarker.expose-request-attributes =false
  289. spring.freemarker.expose-session-attributes =false
  290. spring.freemarker.request-context-attribute =request
  291. spring.freemarker.suffix =.ftl
  292. ############################################################################
  293. #static resources configuration #
  294. ############################################################################
  295. spring.mvc.static-path-pattern =/static/**
  296. spring.messages.basename =classpath:messages/message
  297. spring.messages.encoding =UTF-8
  298. ############################################################################
  299. #server servlet encoding configuration #
  300. ############################################################################
  301. #encoding
  302. #server.servlet.encoding.charset=UTF-8
  303. #server.servlet.encoding.enabled=true
  304. #server.servlet.encoding.force=true
  305. ############################################################################
  306. #Servlet multipart configuration #
  307. ############################################################################
  308. spring.servlet.multipart.enabled =true
  309. spring.servlet.multipart.max-file-size =4194304