application-maxkey.properties 20 KB

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