application-http.properties 21.6 KB
Newer Older
M
MaxKey 已提交
1
############################################################################
M
MaxKey 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15
#  Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
#  
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#  
#      http://www.apache.org/licenses/LICENSE-2.0
#  
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
############################################################################
M
MaxKey 已提交
16 17
#spring.profiles.active=http                                               #
############################################################################
M
MaxKey 已提交
18
#server port
M
MaxKey 已提交
19
server.port                                     =8080
M
MaxKey 已提交
20
#session default 1800
M
MaxKey 已提交
21 22
#1800s =30m
#28800s=8h
23
server.servlet.session.timeout                  =1800
M
MaxKey 已提交
24
#server context path
25
server.servlet.context-path                     =/maxkey
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
26
#nacos discovery
27 28 29
spring.cloud.nacos.discovery.enabled            =${NACOS_DISCOVERY_ENABLED:false}
spring.cloud.nacos.discovery.instance-enabled   =false
spring.cloud.nacos.discovery.server-addr        =${NACOS_DISCOVERY_SERVER_ADDR:127.0.0.1:8848}
M
MaxKey 已提交
30 31 32
############################################################################
#domain name configuration                                                 #
############################################################################
33 34 35 36
maxkey.server.scheme                            =http
maxkey.server.basedomain                        =${SERVER_DOMAIN:maxkey.top}
maxkey.server.domain                            =sso.${maxkey.server.basedomain}
maxkey.server.name                              =${maxkey.server.scheme}://${maxkey.server.domain}
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
37
maxkey.server.uri                               =${maxkey.server.name}:${server.port}${server.servlet.context-path}
38
#default.uri                
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
39
maxkey.server.default.uri                       =${maxkey.server.uri}/appList
40
maxkey.server.mgt.uri                           =${maxkey.server.name}:9527/maxkey-mgt/login
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
41
maxkey.server.authz.uri                         =${maxkey.server.name}:${server.port}${server.servlet.context-path}
42
#InMemory 0 , Redis 2               
M
MaxKey 已提交
43
maxkey.server.persistence                       =${SERVER_PERSISTENCE:2}
44
#identity               
45
maxkey.server.kafka.support                     =${SERVER_KAFKA_SUPPORT:false}
46 47
#issuer name                
maxkey.app.issuer                               =CN=ConSec,CN=COM,CN=SH
M
MaxKey 已提交
48 49 50 51
############################################################################
#Login configuration                                                       #
############################################################################
#enable captcha
52
maxkey.login.captcha                            =${LOGIN_CAPTCHA:true}
M
MaxKey 已提交
53
#text or arithmetic
54
maxkey.login.captcha.type                       =${LOGIN_CAPTCHA_TYPE:text}
M
MaxKey 已提交
55
#enable two factor,use one time password
56
maxkey.login.mfa                                =${LOGIN_MFA_ENABLED:true}
M
MaxKey 已提交
57
#TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud
58 59 60 61 62 63 64 65 66 67 68
maxkey.login.mfa.type                           =${LOGIN_MFA_TYPE:TimeBasedOtpAuthn}
#enable social sign on          
maxkey.login.socialsignon                       =${LOGIN_SOCIAL_ENABLED:true}
#Enable kerberos/SPNEGO         
maxkey.login.kerberos                           =false
#wsFederation           
maxkey.login.wsfederation                       =false
#remeberme          
maxkey.login.remeberme                          =${LOGIN_REMEBERME:true}
#validity           
maxkey.login.remeberme.validity                 =0
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
69 70
#JWT support
maxkey.login.jwt                                =${LOGIN_JWT:true}
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
71
maxkey.login.jwt.issuer                         =${LOGIN_JWT_ISSUER:${maxkey.server.authz.uri}}
72 73 74
#to default application web site            
maxkey.login.default.uri                        =appList
maxkey.ipaddress.whitelist                      =false
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
75
#notices show
76
maxkey.notices.visible                          =false
M
MaxKey 已提交
77 78 79 80 81 82 83 84
############################################################################
#ssl configuration                                                         #
############################################################################
#server.ssl.key-store=maxkeyserver.keystore
#server.ssl.key-alias=maxkey
#server.ssl.enabled=true
#server.ssl.key-store-password=maxkey
#server.ssl.key-store-type=JKS
M
MaxKey 已提交
85

M
MaxKey 已提交
86
############################################################################
M
MaxKey 已提交
87 88 89 90 91
#database configuration 
#   supported database
#       mysql
#       highgo
#       postgresql
M
MaxKey 已提交
92
############################################################################
93
spring.datasource.type                          =com.alibaba.druid.pool.DruidDataSource
M
MaxKey 已提交
94
#mysql
95 96 97 98
spring.datasource.driver-class-name             =com.mysql.cj.jdbc.Driver
spring.datasource.username                      =${DATABASE_USER:root}
spring.datasource.password                      =${DATABASE_PWD:maxkey}
spring.datasource.url                           =jdbc:mysql://${DATABASE_HOST:localhost}:${DATABASE_PORT:3306}/${DATABASE_NAME:maxkey}?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC
M
MaxKey 已提交
99
#highgo
100
#spring.datasource.driver-class-name=com.highgo.jdbc.Driver
M
MaxKey 已提交
101 102 103 104
#spring.datasource.username=highgo
#spring.datasource.password=High@123
#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
#postgresql
105
#spring.datasource.driver-class-name=org.postgresql.Driver
M
MaxKey 已提交
106 107 108
#spring.datasource.username=root
#spring.datasource.password=maxkey!
#spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
M
MaxKey 已提交
109
#mybatis
110 111 112 113 114 115 116
mybatis.dialect                                 =mysql
mybatis.type-aliases-package                    =org.maxkey.entity,org.maxkey.entity.apps,
mybatis.mapper-locations                        =classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml
mybatis.table-column-snowflake-datacenter-id    =1
mybatis.table-column-snowflake-machine-id       =1
mybatis.table-column-escape                     =false
mybatis.table-column-case                       =lowercase
M
MaxKey 已提交
117

M
MaxKey 已提交
118 119 120
############################################################################
#redis server  configuration                                               #
############################################################################
121 122 123 124 125 126 127 128
spring.redis.host                               =${REDIS_HOST:127.0.0.1}
spring.redis.port                               =${REDIS_PORT:6379}
spring.redis.password                           =${REDIS_PWD:password}
spring.redis.timeout                            =10000
spring.redis.jedis.pool.max-wait                =1000
spring.redis.jedis.pool.max-idle                =200
spring.redis.lettuce.pool.max-active            =-1
spring.redis.lettuce.pool.min-idle              =0
M
MaxKey 已提交
129

M
MaxKey 已提交
130 131 132
############################################################################
#mail configuration                                                        #
############################################################################
133 134 135 136 137 138 139 140 141 142 143 144
spring.mail.default-encoding                    =utf-8
spring.mail.host                                =${MAIL_HOST:smtp.163.com}
spring.mail.port                                =${MAIL_PORT:465}
spring.mail.username                            =${MAIL_USER:maxkey@163.com}
spring.mail.password                            =${MAIL_PWD:password}
spring.mail.protocol                            =smtp
spring.mail.properties.ssl                      =true
spring.mail.properties.sender                   =${MAIL_SENDER:maxkey@163.com}
spring.mail.properties.mailotp.message.subject  =MaxKey One Time PassWord
spring.mail.properties.mailotp.message.template ={0} You Token is {1} , it validity in {2}  minutes.
spring.mail.properties.mailotp.message.type     =html
spring.mail.properties.mailotp.message.validity =300
M
MaxKey 已提交
145

M
MaxKey 已提交
146 147 148
############################################################################
#Spring Session for Cluster configuration                                  #
############################################################################
M
MaxKey 已提交
149
# Session store type.
150
spring.session.store-type                       =none
M
MaxKey 已提交
151 152 153 154 155 156 157 158
#spring.session.store-type=redis
# Session timeout. If a duration suffix is not specified, seconds is used.
#server.servlet.session.timeout=1800
# Sessions flush mode.
#spring.session.redis.flush-mode=on_save 
# Namespace for keys used to store sessions.
#spring.session.redis.namespace=spring:session 

M
MaxKey 已提交
159 160 161
############################################################################
#Kafka for connectors configuration                                        #
############################################################################
162 163 164 165 166 167 168 169 170 171 172 173 174 175
spring.kafka.bootstrap-servers                  =${KAFKA_SERVERS:localhost:9092}
# retries   
spring.kafka.producer.retries                   =0
# acks  
spring.kafka.producer.acks                      =1
# batch-size    
spring.kafka.producer.batch-size                =16384
# linger.ms 
spring.kafka.producer.properties.linger.ms      =0
# buffer-memory 
spring.kafka.producer.buffer-memory             =33554432
# serializer    
spring.kafka.producer.key-serializer            =org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer          =org.apache.kafka.common.serialization.StringSerializer
M
http  
MaxKey 已提交
176
# partitioner
177
#spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner
M
MaxKey 已提交
178

M
MaxKey 已提交
179
############################################################################ 
M
MaxKey 已提交
180
#SMS Message Login configuration                                           #
181
#aliyun yunxin tencentcloud                                                #
M
MaxKey 已提交
182 183
############################################################################
#default
184
maxkey.otp.sms.provider                         =${SMS_PROVIDER:yunxin}
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
#aliyun     
maxkey.otp.sms.aliyun.accesskeyid               =${SMS_ALIYUN_ACCESSKEYID:94395d754eb55693043f5d6a2b772ef4}
maxkey.otp.sms.aliyun.accesssecret              =${SMS_ALIYUN_ACCESSSECRET:05d5485357bc}
maxkey.otp.sms.aliyun.templatecode              =${SMS_ALIYUN_TEMPLATECODE:14860095}
maxkey.otp.sms.aliyun.signname                  =${SMS_ALIYUN_SIGNNAME:maxkey}
#yunxin     
maxkey.otp.sms.yunxin.appkey                    =${SMS_YUNXIN_APPKEY:94395d754eb55693043f5d6a2b772ef3}
maxkey.otp.sms.yunxin.appsecret                 =${SMS_YUNXIN_APPSECRET:05d5485357bc}
maxkey.otp.sms.yunxin.templateid                =${SMS_YUNXIN_TEMPLATEID:14860099}
#tencentcloud       
maxkey.otp.sms.tencentcloud.secretid            =${SMS_TENCENTCLOUD_SECRETID:94395d754eb55693043f5d6a2b772ef4}
maxkey.otp.sms.tencentcloud.secretkey           =${SMS_TENCENTCLOUD_SECRETKEY:05d5485357bc}
maxkey.otp.sms.tencentcloud.smssdkappid         =${SMS_TENCENTCLOUD_SMSSDKAPPID:1486220095}
maxkey.otp.sms.tencentcloud.templateid          =${SMS_TENCENTCLOUD_TEMPLATEID:14860095}
maxkey.otp.sms.tencentcloud.sign                =${SMS_TENCENTCLOUD_SIGN:1486009522}
M
MaxKey 已提交
200

M
MaxKey 已提交
201 202 203
############################################################################ 
#Time-based One-Time Password configuration                                #
############################################################################
204 205 206 207 208
maxkey.otp.policy.type                          =totp
maxkey.otp.policy.digits                        =6
maxkey.otp.policy.issuer                        =${OTP_POLICY_ISSUER:MaxKey}
maxkey.otp.policy.domain                        =${maxkey.server.domain}
maxkey.otp.policy.period                        =30
M
MaxKey 已提交
209

210
############################################################################ 
M
MaxKey 已提交
211
#LDAP Login support configuration                                          #
212
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
213 214
maxkey.login.ldap.enable                      =${LDAP_ENABLE:false}
maxkey.login.ldap.jit                         =false
215
#openldap,activedirectory,normal    
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
216 217 218 219 220 221 222 223 224
maxkey.login.ldap.product                     =${LDAP_PRODUCT:openldap}
maxkey.login.ldap.ssl                         =${LDAP_SSL:false}
maxkey.login.ldap.providerurl                 =${LDAP_PROVIDERURL:ldap://localhost:389}
maxkey.login.ldap.principal                   =${LDAP_PRINCIPAL:cn=Manager,dc=maxcrc,dc=com}
maxkey.login.ldap.credentials                 =${LDAP_CREDENTIALS:secret}
maxkey.login.ldap.basedn                      =${LDAP_BASEDN:dc=maxcrc,dc=com}
maxkey.login.ldap.filter                      =(uid=%s)
maxkey.login.ldap.truststore                  =${LDAP_TRUSTSTORE:maxkey}
maxkey.login.ldap.truststorepassword          =${LDAP_TRUSTSTORE_PASSWORD:maxkey}
225
#activedirectory effective  
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
226
maxkey.login.ldap.activedirectory.domain      =${LDAP_AD_DOMAIN:MAXKEY.ORG}
M
MaxKey 已提交
227

M
MaxKey 已提交
228 229 230 231
############################################################################ 
#Kerberos Login configuration                                              #
#short name of user domain must be in upper case,eg:MAXKEY                 #
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
232
maxkey.login.kerberos.default.userdomain      =MAXKEY
M
MaxKey 已提交
233
#short name of user domain must be in upper case,eg:MAXKEY.ORG
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
234
maxkey.login.kerberos.default.fulluserdomain  =MAXKEY.ORG
M
MaxKey 已提交
235
#last 8Bit crypto for Kerberos web Authentication 
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
236
maxkey.login.kerberos.default.crypto          =846KZSzYq56M6d5o
M
MaxKey 已提交
237
#Kerberos Authentication server RUL
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
238
maxkey.login.kerberos.default.redirecturi     =http://sso.maxkey.top/kerberos/authn/
M
MaxKey 已提交
239 240 241 242

############################################################################ 
#HTTPHEADER Login configuration                                            #
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
243 244
maxkey.login.httpheader.enable                =false
maxkey.login.httpheader.headername            =header-user
M
MaxKey 已提交
245 246 247 248 249 250
# iv-user is for IBM Security Access Manager
#config.httpheader.headername=iv-user

############################################################################ 
#BASIC Login support configuration                                         #
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
251
maxkey.login.basic.enable                     =false
M
MaxKey 已提交
252

M
MaxKey 已提交
253
#############################################################################
M
MaxKey 已提交
254
#WsFederation Login support configuration
M
MaxKey 已提交
255 256 257 258 259 260 261 262
#identifier: the identifer for the ADFS server
#url: the login url for ADFS
#principal: the name of the attribute/assertion returned by ADFS that contains the principal's username.
#relyingParty: the identifier of the CAS Server as it has been configured in ADFS.
#tolerance: (optional) the amount of drift to allow when validating the timestamp on the token. Default: 10000 (ms)
#attributeMutator: (optional) a class (defined by you) that can modify the attributes/assertions returned by the ADFS server
#signingCertificate: ADFS's signing certificate used to validate the token/assertions issued by ADFS.
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
263 264 265 266 267 268 269 270
maxkey.login.wsfederation.identifier          =http://adfs.maxkey.top/adfs/services/trust
maxkey.login.wsfederation.url                 =https://adfs.maxkey.top/adfs/ls/
maxkey.login.wsfederation.principal           =upn
maxkey.login.wsfederation.relyingParty        =urn:federation:connsec
maxkey.login.wsfederation.signingCertificate  =adfs-signing.crt
maxkey.login.wsfederation.tolerance           =10000
maxkey.login.wsfederation.upn.suffix          =maxkey.org
maxkey.login.wsfederation.logoutUrl           =https://adfs.maxkey.top/adfs/ls/?wa=wsignout1.0
M
MaxKey 已提交
271 272

#############################################################################
M
MaxKey 已提交
273 274
#OIDC V1.0 METADATA configuration                                           #
#############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
275 276 277 278
maxkey.oidc.metadata.issuer                     =${maxkey.server.authz.uri}
maxkey.oidc.metadata.authorizationEndpoint      =${maxkey.server.authz.uri}/authz/oauth/v20/authorize
maxkey.oidc.metadata.tokenEndpoint              =${maxkey.server.authz.uri}/authz/oauth/v20/token
maxkey.oidc.metadata.userinfoEndpoint           =${maxkey.server.authz.uri}/api/connect/userinfo
M
MaxKey 已提交
279 280

#############################################################################
M
MaxKey 已提交
281 282
#SAML V2.0 configuration                                                    #
#############################################################################
M
MaxKey 已提交
283
#saml common
284 285 286 287 288
maxkey.saml.v20.max.parser.pool.size                            =2
maxkey.saml.v20.assertion.validity.time.ins.seconds             =90
maxkey.saml.v20.replay.cache.life.in.millis                     =14400000
maxkey.saml.v20.issue.instant.check.clock.skew.in.seconds       =90
maxkey.saml.v20.issue.instant.check.validity.time.in.seconds    =300
M
fix  
MaxKey 已提交
289
#saml Identity Provider keystore
290 291 292
maxkey.saml.v20.idp.keystore.password                           =maxkey
maxkey.saml.v20.idp.keystore.private.key.password               =maxkey
maxkey.saml.v20.idp.keystore                                    =classpath\:config/samlServerKeystore.jks
M
fix  
MaxKey 已提交
293
#keystore Identity Provider for security
294
maxkey.saml.v20.idp.issuing.entity.id                           =maxkey.top
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
295
maxkey.saml.v20.idp.issuer                                      =${maxkey.server.authz.uri}/saml
296
maxkey.saml.v20.idp.receiver.endpoint                           =https\://sso.maxkey.top/
M
fix  
MaxKey 已提交
297
#Saml v20 Identity Provider METADATA
298 299 300 301 302 303 304 305 306
maxkey.saml.v20.metadata.orgName                =MaxKeyTop
maxkey.saml.v20.metadata.orgDisplayName         =MaxKeyTop
maxkey.saml.v20.metadata.orgURL                 =https://www.maxkey.top
maxkey.saml.v20.metadata.contactType            =technical
maxkey.saml.v20.metadata.company                =MaxKeyTop
maxkey.saml.v20.metadata.givenName              =maxkey
maxkey.saml.v20.metadata.surName                =maxkey
maxkey.saml.v20.metadata.emailAddress           =maxkeysupport@163.com
maxkey.saml.v20.metadata.telephoneNumber        =4008981111
M
MaxKey 已提交
307

M
fix  
MaxKey 已提交
308 309 310 311 312 313
#saml RelayParty keystore
maxkey.saml.v20.sp.keystore.password                            =maxkey
maxkey.saml.v20.sp.keystore.private.key.password                =maxkey
maxkey.saml.v20.sp.keystore                                     =classpath\:config/samlClientKeystore.jks
maxkey.saml.v20.sp.issuing.entity.id                            =client.maxkey.org

M
MaxKey 已提交
314 315 316
############################################################################
#Management endpoints configuration                                        #
############################################################################
317
management.security.enabled                     =false
M
MaxKey 已提交
318 319
#management.endpoints.jmx.exposure.include=health,info
#management.endpoints.web.exposure.include=metrics,health,info,env
320 321
management.endpoints.web.exposure.include       =*
management.endpoint.health.show-details         =ALWAYS
M
MaxKey 已提交
322
#Spring Boot Admin Client
323 324
spring.boot.admin.client.url                    =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
management.health.redis.enabled                 =false
M
MaxKey 已提交
325
management.health.mail.enabled                  =false
M
MaxKey 已提交
326

MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
327 328
############################################################################
#Do not modify the following configuration 
M
MaxKey 已提交
329 330 331 332
############################################################################
#springfox.documentation.swagger.v2.path=/api-docs                         #
#Swagger Configure Properties                                              #
############################################################################
333
maxkey.swagger.enable                           =true
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
334 335
maxkey.swagger.title                            =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
maxkey.swagger.description                      =MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfAPI\u6587\u6863
336
maxkey.swagger.version                          =${application.formatted-version}
M
MaxKey 已提交
337 338 339 340

############################################################################
#freemarker configuration                                                  #
############################################################################
341 342 343 344 345 346 347 348 349
spring.freemarker.template-loader-path          =classpath:/templates/views
spring.freemarker.cache                         =false
spring.freemarker.charset                       =UTF-8
spring.freemarker.check-template-location       =true
spring.freemarker.content-type                  =text/html
spring.freemarker.expose-request-attributes     =false
spring.freemarker.expose-session-attributes     =false
spring.freemarker.request-context-attribute     =request
spring.freemarker.suffix                        =.ftl
M
MaxKey 已提交
350 351 352 353

############################################################################
#static resources configuration                                            #
############################################################################
354 355 356
spring.mvc.static-path-pattern                  =/static/**
spring.messages.basename                        =classpath:messages/message
spring.messages.encoding                        =UTF-8
M
MaxKey 已提交
357 358 359 360 361 362 363 364 365 366 367 368

############################################################################
#server servlet encoding configuration                                     #
############################################################################
#encoding
#server.servlet.encoding.charset=UTF-8
#server.servlet.encoding.enabled=true
#server.servlet.encoding.force=true

############################################################################
#Servlet multipart configuration                                           #
############################################################################
369 370
spring.servlet.multipart.enabled                =true
spring.servlet.multipart.max-file-size          =4194304