application-http.properties 20 KB

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