forked from mock-server/mockserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mockserver.example.properties
217 lines (176 loc) · 13.6 KB
/
mockserver.example.properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
###############################
# MockServer & Proxy Settings #
###############################
# ports
# the HTTP, HTTPS, SOCKS and HTTP CONNECT port(s) for both mocking and proxying requests
mockserver.serverPort=1080
# when specified all requests received will be forwarded to the specified port, unless they match an expectation
mockserver.proxyRemotePort=1090
# specified the host to forward all proxy requests to when port forwarding mode has been enabled using the proxyRemotePort option, defaults to "localhost"
mockserver.proxyRemoteHost=localhost
# logging
# minimum level of logs to record in the event log and to output to system out
mockserver.logLevel=INFO
# disable logging to the system output
mockserver.disableSystemOut=false
# disable all logging and processing of log events
mockserver.disableLogging=false
# if true (the default) the log event recording that a request matcher did not match will include a detailed reason why each non matching field did not match
mockserver.detailedMatchFailures=false
# if true (the default) the ClientAndServer constructor or static factor methods will open the UI in the default browser when the log level is set to DEBUG
mockserver.launchUIForLogLevelDebug=false
# enable the recording of metrics for different activities within MockServer, these are exposed via /mockserver/metrics in prometheus format
mockserver.metricsEnabled=false
# memory usage
# maximum number of expectations held in the in-memory ring buffer
mockserver.maxExpectations=5000
# maximum number of log entries to hold in memory, this include recorded requests, expectation match failures and other log entries
mockserver.maxLogEntries=60000
# maximum number of remote (not the same JVM) method callbacks (i.e. web sockets) registered for expectations. The web socket client registry entries are stored in a circular queue so once this limit is reach the oldest are overwritten
mockserver.maxWebSocketExpectations=1500
# output JVM memory usage metrics to CSV file periodically called memoryUsage_<yyyy-MM-dd>.csv
mockserver.outputMemoryUsageCsv=false
# directory to output JVM memory usage metrics CSV files to when outputMemoryUsageCsv enabled
mockserver.memoryUsageCsvDirectory=.
# scalability
# number of threads for main event loop
mockserver.nioEventLoopThreadCount=5
# number of threads for the action handler thread pool
mockserver.actionHandlerThreadCount=5
# number of threads for client event loop when calling downstream
mockserver.clientNioEventLoopThreadCount=5
# number of threads for each expectation with a method / closure callback (i.e. web socket client) in MockServerClient
mockserver.webSocketClientEventLoopThreadCount=5
# maximum time allowed in milliseconds for any future to wait, for example when waiting for a response over a web socket callback
mockserver.maxFutureTimeoutInMillis=60000
# If true (the default) request matchers will fail on the first non-matching field, if false request matchers will compare all fields
mockserver.matchersFailFast=false
# socket
# maximum time in milliseconds allowed for a response from a socket
mockserver.maxSocketTimeoutInMillis=10000
# maximum time in milliseconds allowed to connect to a socket
mockserver.socketConnectionTimeoutInMillis=10000
# if true socket connections will always be closed after a response is returned, if false connection is only closed if request header indicate connection should be closed
mockserver.alwaysCloseSocketConnections=true
# the local IP address to bind to for accepting new socket connections
mockserver.localBoundIP=0.0.0.0
# http request parsing
# maximum size the first line of an HTTP request
mockserver.maxInitialLineLength=8192
# maximum size HTTP request headers
mockserver.maxHeaderSize=16384
# maximum size of HTTP chunks in request or responses
mockserver.maxChunkSize=16384
# if true semicolons are treated as a separator for a query parameter string, if false the semicolon is treated as a normal character that is part of a query parameter value
mockserver.useSemicolonAsQueryParameterSeparator=true
# CORS
# enable CORS for MockServer REST API so that the API can be used for javascript running in browsers, such as selenium
mockserver.enableCORSForAPI=false
# enable CORS for all responses from MockServer, including the REST API and expectation responses
mockserver.enableCORSForAllResponses=false
# the value used for CORS in the access-control-allow-headers and access-control-expose-headers headers
mockserver.corsAllowHeaders="Allow, Content-Encoding, Content-Length, Content-Type, ETag, Expires, Last-Modified, Location, Server, Vary, Authorization"
# the value used for CORS in the access-control-allow-methods header
mockserver.corsAllowMethods="CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH, TRACE"
# the value used for CORS in the access-control-allow-credentials header
mockserver.corsAllowCredentials=false
# the value used for CORS in the access-control-max-age header
mockserver.corsMaxAgeInSeconds=100
# mock initialization
# the class (and package) used to initialize expectations in MockServer at startup, if set MockServer will load and call this class to initialise expectations when is starts
#mockserver.initializationClass=org.mockserver.server.initialize.ExpectationInitializerExample
# the path to the json file used to initialize expectations in MockServer at startup, if set MockServer will load this file and initialise expectations for each item in the file when is starts
#mockserver.initializationJsonPath=org/mockserver/server/initialize/initializerJson.json
# if enabled the initialization json file will be watched for changes, any changes found will result in expectations being created, remove or updated by matching against their key
mockserver.watchInitializationJson=false
# mock persistence
# enable the persisting of expectations as json, which is updated whenever the expectation state is updated (i.e. add, clear, expires, etc)
mockserver.persistExpectations=false
# the file path used to save persisted expectations as json, which is updated whenever the expectation state is updated (i.e. add, clear, expires, etc)
#mockserver.persistedExpectationsPath=org/mockserver/server/initialize/initializerJson.json
# verification
# the maximum number of requests to return in verification failure result, if more expectations are found the failure result does not list them separately
mockserver.maximumNumberOfRequestToReturnInVerificationFailure=10
# proxy
# If true (the default) when no matching expectation is found, and the host header of the request does not match MockServer's host, then MockServer attempts to proxy the request if that fails then a 404 is returned
mockserver.attemptToProxyIfNoMatchingExpectation=true
# Use HTTP proxy (i.e. via Host header) for all outbound / forwarded requests
#mockserver.forwardHttpProxy=127.0.0.1:1090
# Use HTTPS proxy (i.e. HTTP CONNECT) for all outbound / forwarded requests, supports TLS tunnelling of HTTPS requests
#mockserver.forwardHttpsProxy=127.0.0.1:1090
# use SOCKS proxy for all outbound / forwarded requests, support TLS tunnelling of TCP connections
#mockserver.forwardSocksProxy=127.0.0.1:1090
# Username for proxy authentication when using HTTPS proxy (i.e. HTTP CONNECT) for all outbound / forwarded requests
#mockserver.forwardProxyAuthenticationUsername=john.doe
# Password for proxy authentication when using HTTPS proxy (i.e. HTTP CONNECT) for all outbound / forwarded requests
#mockserver.forwardProxyAuthenticationPassword=p@ssw0rd
# The authentication realm for proxy authentication to MockServer
#mockserver.proxyAuthenticationRealm="MockServer HTTP Proxy"
# The required username for proxy authentication to MockServer
#mockserver.proxyAuthenticationUsername=john.doe
# The required password for proxy authentication to MockServer
#mockserver.proxyAuthenticationPassword=p@ssw0rd
# liveness
# Path to support HTTP GET requests for status response (also available on PUT /mockserver/status)
mockserver.livenessHttpGetPath=/liveness/probe
# control plane authentication
# require mTLS (also called client authentication and two-way TLS) for all control plane requests
mockserver.controlPlaneTLSMutualAuthenticationRequired=false
# file system path or classpath location of custom mTLS (TLS client authentication) X.509 Certificate Chain for control plane mTLS authentication
#mockserver.controlPlaneTLSMutualAuthenticationCAChain="/some/existing/path"
# file system path or classpath location of a fixed custom private key for control plane connections using mTLS for authentication
#mockserver.controlPlanePrivateKeyPath="/some/existing/path"
# file system path or classpath location of a fixed custom X.509 Certificate for control plane connections using mTLS for authentication
#mockserver.controlPlaneX509CertificatePath="/some/existing/path"
# require JWT authentication for all control plane requests
mockserver.controlPlaneJWTAuthenticationRequired=false
# JWK source, as a file system path, classpath location or a URL, used when JWK authentication is enabled for control plane requests
#mockserver.controlPlaneJWTAuthenticationJWKSource="/some/existing/path"
# audience claim (i.e. aud) required when JWT authentication is enabled for control plane requests
#mockserver.controlPlaneJWTAuthenticationExpectedAudience=https://mock-server.com
# matching claims expected when JWT authentication is enabled for control plane requests, value should be string with comma separated key=value items, for example: scope=internal public,sub=some_subject
#mockserver.controlPlaneJWTAuthenticationMatchingClaims=name=John Doe,admin=true
# required claims that should exist (i.e. with any value) when JWT authentication is enabled for control plane requests, value should be string with comma separated values, for example: scope,sub
#mockserver.controlPlaneJWTAuthenticationRequiredClaims=name,admin,scope
# TLS inbound - dynamic CA
# enable dynamic creation of Certificate Authority X.509 Certificate and Private Key
mockserver.dynamicallyCreateCertificateAuthorityCertificate=true
# directory used to save the dynamically generated Certificate Authority X.509 Certificate and Private Key
#mockserver.directoryToSaveDynamicSSLCertificate="/some/existing/path"
# proactively initialise TLS during start to ensure that if dynamicallyCreateCertificateAuthorityCertificate is enabled the Certificate Authority X.509 Certificate and Private Key will be created during start up and not when the first TLS connection is received
mockserver.proactivelyInitialiseTLS=false
# TLS inbound - dynamic private key & x509
# MockServer dynamically updates the Subject Alternative Name (SAN) values for its TLS certificate to add domain names and IP addresses from request Host headers and Host headers in expectations, this configuration setting disables this automatic update and only uses SAN value provided in TLS Subject Alternative Name Domains and TLS Subject Alternative Name IPs configuration properties
mockserver.preventCertificateDynamicUpdate=false
# the domain name for auto-generate TLS certificates
mockserver.sslCertificateDomainName=localhost
# the Subject Alternative Name (SAN) domain names for auto-generate TLS certificates as a comma separated list
mockserver.sslSubjectAlternativeNameDomains="localhost,www.foo.bar"
# the Subject Alternative Name (SAN) IP addresses for auto-generate TLS certificates as a comma separated list
mockserver.sslSubjectAlternativeNameIps="127.0.0.1,0.0.0.0"
# TLS inbound - fixed CA
# location of custom file for Certificate Authority for TLS, the private key must be a PKCS#8 or PKCS#1 PEM file and must match the TLS Certificate Authority X.509 Certificate
#mockserver.certificateAuthorityPrivateKey="/some/existing/path"
# location of custom file for Certificate Authority for TLS, the certificate must be a X.509 PEM file and must match the TLS Certificate Authority Private Key
#mockserver.certificateAuthorityCertificate="/some/existing/path"
# TLS inbound - fixed private key & x509
# File system path or classpath location of a fixed custom private key for TLS connections into MockServer
#mockserver.privateKeyPath="/some/existing/path"
# File system path or classpath location of a fixed custom X.509 Certificate for TLS connections into MockServer
#mockserver.x509CertificatePath="/some/existing/path"
# TLS inbound - mTLS
# require mTLS (also called client authentication and two-way TLS) for all TLS connections / HTTPS requests to MockServer
mockserver.tlsMutualAuthenticationRequired=false
# File system path or classpath location of custom mTLS (TLS client authentication) X.509 Certificate Chain for Trusting (i.e. signature verification of) Client X.509 Certificates, the certificate chain must be a X.509 PEM file
#mockserver.tlsMutualAuthenticationCertificateChain="/some/existing/path"
# TLS outbound - CA
# configure trusted set of certificates for forwarded or proxied requests (i.e. TLS connections out of MockServer)
#mockserver.forwardProxyTLSX509CertificatesTrustManagerType=CUSTOM
# TLS outbound - fixed CA
# File system path or classpath location of custom file for trusted X.509 Certificate Authority roots for forwarded or proxied requests (i.e. TLS connections out of MockServer), the certificate chain must be a X.509 PEM file
#mockserver.forwardProxyTLSCustomTrustX509Certificates="/some/existing/path"
# TLS outbound - fixed private key & x509
# File system path or classpath location of custom Private Key for forwarded or proxied requests (i.e. TLS connections out of MockServer), the private key must be a PKCS#8 or PKCS#1 PEM file
#mockserver.forwardProxyPrivateKey="/some/existing/path"
# File system path or classpath location of custom X.509 Certificate Chain for forwarded or proxied requests (i.e. TLS connections out of MockServer), the certificates must be a X.509 PEM file
#mockserver.forwardProxyCertificateChain="/some/existing/path"