application-http.properties 18.3 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
jwt  
MaxKey 已提交
19
server.port                                     =${SERVER_PORT:9527}
M
MaxKey 已提交
20 21 22 23 24 25
#session default 600
#600s   =10m
#1800s  =30m
#3600s  =1h
#28800s =8h
server.servlet.session.timeout                  =${SERVLET_SESSION_TIMEOUT:600}
M
MaxKey 已提交
26
#server context path
M
jwt  
MaxKey 已提交
27
server.servlet.context-path                     =/sign
M
MaxKey 已提交
28

M
MaxKey 已提交
29
server.frontend.port                            =${SERVER_FRONTEND_PORT:4200}
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}
M
MaxKey 已提交
42 43
#http://sso.maxkey.top/sign
#http://sso.maxkey.top:4200
M
jwt  
MaxKey 已提交
44
maxkey.server.frontend.uri                      =/maxkey
45
#InMemory 0 , Redis 2               
M
MaxKey 已提交
46
maxkey.server.persistence                       =${SERVER_PERSISTENCE:0}
M
MaxKey 已提交
47
#identity none, provision
48
maxkey.server.message.queue                     =${SERVER_MESSAGE_QUEUE:none}
49 50
#issuer name                
maxkey.app.issuer                               =CN=ConSec,CN=COM,CN=SH
M
MaxKey 已提交
51 52
#must > jwt expire * 2    
maxkey.session.timeout                          =${SERVER_SESSION_TIMEOUT:1800}
M
MaxKey 已提交
53 54

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

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

M
MaxKey 已提交
125 126 127
############################################################################
#redis server  configuration                                               #
############################################################################
128 129 130 131 132 133 134 135
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 已提交
136

M
MaxKey 已提交
137 138 139
############################################################################
#mail configuration                                                        #
############################################################################
140 141 142 143 144 145 146 147 148 149 150 151
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 已提交
152

M
MaxKey 已提交
153 154 155
############################################################################ 
#Time-based One-Time Password configuration                                #
############################################################################
156 157 158 159 160
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 已提交
161

M
MaxKey 已提交
162 163 164 165
############################################################################ 
#Kerberos Login configuration                                              #
#short name of user domain must be in upper case,eg:MAXKEY                 #
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
166
maxkey.login.kerberos.default.userdomain      =MAXKEY
M
MaxKey 已提交
167
#short name of user domain must be in upper case,eg:MAXKEY.ORG
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
168
maxkey.login.kerberos.default.fulluserdomain  =MAXKEY.ORG
M
MaxKey 已提交
169
#last 8Bit crypto for Kerberos web Authentication 
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
170
maxkey.login.kerberos.default.crypto          =846KZSzYq56M6d5o
M
MaxKey 已提交
171
#Kerberos Authentication server RUL
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
172
maxkey.login.kerberos.default.redirecturi     =http://sso.maxkey.top/kerberos/authn/
M
MaxKey 已提交
173 174 175 176

############################################################################ 
#HTTPHEADER Login configuration                                            #
############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
177 178
maxkey.login.httpheader.enable                =false
maxkey.login.httpheader.headername            =header-user
M
MaxKey 已提交
179 180 181 182 183 184
# iv-user is for IBM Security Access Manager
#config.httpheader.headername=iv-user

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

M
MaxKey 已提交
187
#############################################################################
M
MaxKey 已提交
188
#WsFederation Login support configuration
M
MaxKey 已提交
189 190 191 192 193 194 195 196
#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单点登录官方 已提交
197 198 199 200 201 202 203 204
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 已提交
205 206

#############################################################################
M
MaxKey 已提交
207 208
#OIDC V1.0 METADATA configuration                                           #
#############################################################################
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
209 210 211 212
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 已提交
213 214

#############################################################################
M
MaxKey 已提交
215 216
#SAML V2.0 configuration                                                    #
#############################################################################
M
MaxKey 已提交
217
#saml common
218 219 220 221 222
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 已提交
223
#saml Identity Provider keystore
224 225 226
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 已提交
227
#keystore Identity Provider for security
228
maxkey.saml.v20.idp.issuing.entity.id                           =maxkey.top
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
229
maxkey.saml.v20.idp.issuer                                      =${maxkey.server.authz.uri}/saml
230
maxkey.saml.v20.idp.receiver.endpoint                           =https\://sso.maxkey.top/
M
fix  
MaxKey 已提交
231
#Saml v20 Identity Provider METADATA
232 233 234 235 236 237 238 239 240
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 已提交
241

M
fix  
MaxKey 已提交
242 243 244 245 246 247
#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 已提交
248 249 250
############################################################################
#Management endpoints configuration                                        #
############################################################################
251
management.security.enabled                     =false
M
MaxKey 已提交
252
#management.endpoints.jmx.exposure.include=health,info
M
MaxKey 已提交
253
#management.endpoints.web.exposure.include=metrics,health,info,env,prometheus
254 255
management.endpoints.web.exposure.include       =*
management.endpoint.health.show-details         =ALWAYS
M
MaxKey 已提交
256
#Spring Boot Admin Client
257 258
spring.boot.admin.client.url                    =${SPRING_BOOT_ADMIN_URL:http://127.0.0.1:9528}
management.health.redis.enabled                 =false
M
MaxKey 已提交
259
management.health.mail.enabled                  =false
M
MaxKey 已提交
260

MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
261 262
############################################################################
#Do not modify the following configuration 
M
MaxKey 已提交
263 264 265 266
############################################################################
#springfox.documentation.swagger.v2.path=/api-docs                         #
#Swagger Configure Properties                                              #
############################################################################
267
maxkey.swagger.enable                           =true
MaxKey单点登录官方's avatar
MaxKey单点登录官方 已提交
268 269
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
270
maxkey.swagger.version                          =${application.formatted-version}
M
MaxKey 已提交
271 272 273 274

############################################################################
#freemarker configuration                                                  #
############################################################################
275 276 277 278 279 280 281 282 283
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 已提交
284 285 286 287

############################################################################
#static resources configuration                                            #
############################################################################
288 289 290
spring.mvc.static-path-pattern                  =/static/**
spring.messages.basename                        =classpath:messages/message
spring.messages.encoding                        =UTF-8
M
MaxKey 已提交
291 292 293 294 295 296 297 298 299 300 301 302

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

############################################################################
#Servlet multipart configuration                                           #
############################################################################
303 304
spring.servlet.multipart.enabled                =true
spring.servlet.multipart.max-file-size          =4194304