application-http.properties 19.9 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                                     =${SERVER_PORT:8080}
M
MaxKey 已提交
20
#session default 1800
M
MaxKey 已提交
21 22
#1800s =30m
#28800s=8h
M
MaxKey 已提交
23
server.servlet.session.timeout                  =${SERVER_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
server.frontend.port                            =${SERVER_FRONTEND_PORT:4200}
M
MaxKey 已提交
31 32 33
############################################################################
#domain name configuration                                                 #
############################################################################
34 35 36 37
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单点登录官方 已提交
38
maxkey.server.uri                               =${maxkey.server.name}:${server.port}${server.servlet.context-path}
39
#default.uri                
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
40
maxkey.server.default.uri                       =${maxkey.server.uri}/appList
41
maxkey.server.mgt.uri                           =${maxkey.server.name}:9527/maxkey-mgt/login
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
42
maxkey.server.authz.uri                         =${maxkey.server.name}:${server.port}${server.servlet.context-path}
M
MaxKey 已提交
43 44 45
#http://sso.maxkey.top/sign
#http://sso.maxkey.top:4200
maxkey.server.frontend.uri                      =${maxkey.server.name}:${server.frontend.port}
46
#InMemory 0 , Redis 2               
M
MaxKey 已提交
47
maxkey.server.persistence                       =${SERVER_PERSISTENCE:0}
48 49
#identity none, Kafka ,RocketMQ
maxkey.server.message.queue                     =${SERVER_MESSAGE_QUEUE:none}
50 51
#issuer name                
maxkey.app.issuer                               =CN=ConSec,CN=COM,CN=SH
M
MaxKey 已提交
52 53 54 55

maxkey.auth.jwt.expire                          =86400
maxkey.auth.jwt.issuer                          =${maxkey.server.uri}
maxkey.auth.jwt.secret                          =7heM-14BtxjyKPuH3ITIm7q2-ps5MuBirWCsrrdbzzSAOuSPrbQYiaJ54AeA0uH2XdkYy3hHAkTFIsieGkyqxOJZ_dQzrCbaYISH9rhUZAKYx8tUY0wkE4ArOC6LqHDJarR6UIcMsARakK9U4dhoOPO1cj74XytemI-w6ACYfzRUn_Rn4e-CQMcnD1C56oNEukwalf06xVgXl41h6K8IBEzLVod58y_VfvFn-NGWpNG0fy_Qxng6dg8Dgva2DobvzMN2eejHGLGB-x809MvC4zbG7CKNVlcrzMYDt2Gt2sOVDrt2l9YqJNfgaLFjrOEVw5cuXemGkX1MvHj6TAsbLg
M
MaxKey 已提交
56 57 58 59
############################################################################
#Login configuration                                                       #
############################################################################
#enable two factor,use one time password
60
maxkey.login.mfa                                =${LOGIN_MFA_ENABLED:true}
M
MaxKey 已提交
61
#TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud
62 63 64 65 66 67 68 69 70 71 72
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单点登录官方 已提交
73 74
#JWT support
maxkey.login.jwt                                =${LOGIN_JWT:true}
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
75
maxkey.login.jwt.issuer                         =${LOGIN_JWT_ISSUER:${maxkey.server.authz.uri}}
M
MaxKey 已提交
76
#whitelist       
77
maxkey.ipaddress.whitelist                      =false
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
78
#notices show
79
maxkey.notices.visible                          =false
M
MaxKey 已提交
80 81 82 83 84 85 86 87
############################################################################
#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 已提交
88

M
MaxKey 已提交
89
############################################################################
M
MaxKey 已提交
90 91 92 93 94
#database configuration 
#   supported database
#       mysql
#       highgo
#       postgresql
M
MaxKey 已提交
95
############################################################################
96
spring.datasource.type                          =com.alibaba.druid.pool.DruidDataSource
M
MaxKey 已提交
97
#mysql
98 99 100 101
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 已提交
102
#highgo
103
#spring.datasource.driver-class-name=com.highgo.jdbc.Driver
M
MaxKey 已提交
104 105 106 107
#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
108
#spring.datasource.driver-class-name=org.postgresql.Driver
M
MaxKey 已提交
109 110 111
#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 已提交
112
#mybatis
113 114 115 116 117 118 119
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 已提交
120

M
MaxKey 已提交
121 122 123
############################################################################
#redis server  configuration                                               #
############################################################################
124 125 126 127 128 129 130 131
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 已提交
132

M
MaxKey 已提交
133 134 135
############################################################################
#mail configuration                                                        #
############################################################################
136 137 138 139 140 141 142 143 144 145 146 147
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 已提交
148

M
MaxKey 已提交
149 150 151
############################################################################
#Spring Session for Cluster configuration                                  #
############################################################################
M
MaxKey 已提交
152
# Session store type.
153
spring.session.store-type                       =none
M
MaxKey 已提交
154 155 156 157 158 159 160 161
#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 已提交
162 163 164
############################################################################
#Kafka for connectors configuration                                        #
############################################################################
165 166 167 168 169 170 171 172 173 174 175 176 177 178
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 已提交
179
# partitioner
180
#spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner
181 182 183
############################################################################
#RocketMQ for connectors configuration                                        #
############################################################################
M
badges  
MaxKey 已提交
184 185 186
rocketmq.name-server                            =${ROCKETMQ_SERVERS:localhost:9876}
rocketmq.producer.enable                        =true
rocketmq.producer.group                         =maxkey_identity
M
MaxKey 已提交
187 188 189
############################################################################ 
#Time-based One-Time Password configuration                                #
############################################################################
190 191 192 193 194
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 已提交
195

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

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

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

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

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

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

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

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

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

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

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

############################################################################
#Servlet multipart configuration                                           #
############################################################################
337 338
spring.servlet.multipart.enabled                =true
spring.servlet.multipart.max-file-size          =4194304