application-http.properties 19.4 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:0}
44 45
#identity none, Kafka ,RocketMQ
maxkey.server.message.queue                     =${SERVER_MESSAGE_QUEUE:none}
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
178 179 180
############################################################################
#RocketMQ for connectors configuration                                        #
############################################################################
M
badges  
MaxKey 已提交
181 182 183
rocketmq.name-server                            =${ROCKETMQ_SERVERS:localhost:9876}
rocketmq.producer.enable                        =true
rocketmq.producer.group                         =maxkey_identity
M
MaxKey 已提交
184 185 186
############################################################################ 
#Time-based One-Time Password configuration                                #
############################################################################
187 188 189 190 191
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 已提交
192

M
MaxKey 已提交
193 194 195 196
############################################################################ 
#Kerberos Login configuration                                              #
#short name of user domain must be in upper case,eg:MAXKEY                 #
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
197
maxkey.login.kerberos.default.userdomain      =MAXKEY
M
MaxKey 已提交
198
#short name of user domain must be in upper case,eg:MAXKEY.ORG
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
199
maxkey.login.kerberos.default.fulluserdomain  =MAXKEY.ORG
M
MaxKey 已提交
200
#last 8Bit crypto for Kerberos web Authentication 
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
201
maxkey.login.kerberos.default.crypto          =846KZSzYq56M6d5o
M
MaxKey 已提交
202
#Kerberos Authentication server RUL
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
203
maxkey.login.kerberos.default.redirecturi     =http://sso.maxkey.top/kerberos/authn/
M
MaxKey 已提交
204 205 206 207

############################################################################ 
#HTTPHEADER Login configuration                                            #
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
208 209
maxkey.login.httpheader.enable                =false
maxkey.login.httpheader.headername            =header-user
M
MaxKey 已提交
210 211 212 213 214 215
# iv-user is for IBM Security Access Manager
#config.httpheader.headername=iv-user

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

M
MaxKey 已提交
218
#############################################################################
M
MaxKey 已提交
219
#WsFederation Login support configuration
M
MaxKey 已提交
220 221 222 223 224 225 226 227
#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单点登录官方 已提交
228 229 230 231 232 233 234 235
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 已提交
236 237

#############################################################################
M
MaxKey 已提交
238 239
#OIDC V1.0 METADATA configuration                                           #
#############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
240 241 242 243
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 已提交
244 245

#############################################################################
M
MaxKey 已提交
246 247
#SAML V2.0 configuration                                                    #
#############################################################################
M
MaxKey 已提交
248
#saml common
249 250 251 252 253
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 已提交
254
#saml Identity Provider keystore
255 256 257
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 已提交
258
#keystore Identity Provider for security
259
maxkey.saml.v20.idp.issuing.entity.id                           =maxkey.top
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
260
maxkey.saml.v20.idp.issuer                                      =${maxkey.server.authz.uri}/saml
261
maxkey.saml.v20.idp.receiver.endpoint                           =https\://sso.maxkey.top/
M
fix  
MaxKey 已提交
262
#Saml v20 Identity Provider METADATA
263 264 265 266 267 268 269 270 271
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 已提交
272

M
fix  
MaxKey 已提交
273 274 275 276 277 278
#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 已提交
279 280 281
############################################################################
#Management endpoints configuration                                        #
############################################################################
282
management.security.enabled                     =false
M
MaxKey 已提交
283
#management.endpoints.jmx.exposure.include=health,info
M
MaxKey 已提交
284
#management.endpoints.web.exposure.include=metrics,health,info,env,prometheus
285 286
management.endpoints.web.exposure.include       =*
management.endpoint.health.show-details         =ALWAYS
M
MaxKey 已提交
287
#Spring Boot Admin Client
288 289
spring.boot.admin.client.url                    =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
management.health.redis.enabled                 =false
M
MaxKey 已提交
290
management.health.mail.enabled                  =false
M
MaxKey 已提交
291

MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
292 293
############################################################################
#Do not modify the following configuration 
M
MaxKey 已提交
294 295 296 297
############################################################################
#springfox.documentation.swagger.v2.path=/api-docs                         #
#Swagger Configure Properties                                              #
############################################################################
298
maxkey.swagger.enable                           =true
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
299 300
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
301
maxkey.swagger.version                          =${application.formatted-version}
M
MaxKey 已提交
302 303 304 305

############################################################################
#freemarker configuration                                                  #
############################################################################
306 307 308 309 310 311 312 313 314
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 已提交
315 316 317 318

############################################################################
#static resources configuration                                            #
############################################################################
319 320 321
spring.mvc.static-path-pattern                  =/static/**
spring.messages.basename                        =classpath:messages/message
spring.messages.encoding                        =UTF-8
M
MaxKey 已提交
322 323 324 325 326 327 328 329 330 331 332 333

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

############################################################################
#Servlet multipart configuration                                           #
############################################################################
334 335
spring.servlet.multipart.enabled                =true
spring.servlet.multipart.max-file-size          =4194304