application-https.properties 20 KB

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