2
0

application-maxkey.properties 20 KB

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