application-maxkey.properties 20 KB

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