Add HTTPS docs
Change-Id: Ic97f453fe71ea04f099abe92272eaaf3a41e10fe
This commit is contained in:
parent
4d4d303d58
commit
76a3ecacad
1 changed files with 44 additions and 1 deletions
45
README.md
45
README.md
|
@ -64,6 +64,21 @@ testRest {
|
||||||
path='testEndpoint'
|
path='testEndpoint'
|
||||||
name='testRest'
|
name='testRest'
|
||||||
}
|
}
|
||||||
|
testHttps {
|
||||||
|
soap=false
|
||||||
|
port=10443
|
||||||
|
path='testHttps'
|
||||||
|
name='testHttps'
|
||||||
|
method='GET'
|
||||||
|
https={
|
||||||
|
keystorePath='/tmp/keystore.jks'
|
||||||
|
keystorePassword='keystorePass'
|
||||||
|
keyPassword='keyPass'
|
||||||
|
truststorePath='/tmp/truststore.jks'
|
||||||
|
truststorePassword='truststorePass'
|
||||||
|
requireClientAuth=true
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build with docker
|
### Build with docker
|
||||||
|
@ -96,7 +111,15 @@ remoteMockServer.addMock(new AddMock(
|
||||||
statusCode: ...,
|
statusCode: ...,
|
||||||
method: ...,
|
method: ...,
|
||||||
responseHeaders: ...,
|
responseHeaders: ...,
|
||||||
schema: ...
|
schema: ...,
|
||||||
|
https: new Https(
|
||||||
|
keystorePath: '/tmp/keystore.jks',
|
||||||
|
keystorePassword: 'keystorePass',
|
||||||
|
keyPassword: 'keyPass',
|
||||||
|
truststorePath: '/tmp/truststore.jks',
|
||||||
|
truststorePassword: 'truststorePass',
|
||||||
|
requireClientAuth: true
|
||||||
|
)
|
||||||
))
|
))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -117,6 +140,14 @@ Send POST request to localhost:<PORT>/serverControl
|
||||||
<responseHeaders>...</responseHeaders>
|
<responseHeaders>...</responseHeaders>
|
||||||
<schema>...</schema>
|
<schema>...</schema>
|
||||||
<imports alias="..." fullClassName="..."/>
|
<imports alias="..." fullClassName="..."/>
|
||||||
|
<https>
|
||||||
|
<keystorePath>/tmp/keystore.jks</keystorePath>
|
||||||
|
<keystorePassword>keystorePass</keystorePassword>
|
||||||
|
<keyPassword>keyPass</keyPassword>
|
||||||
|
<truststorePath>/tmp/truststore.jks</truststorePath>
|
||||||
|
<truststorePassword>truststorePass</truststorePassword>
|
||||||
|
<requireClientAuth>true</requireClientAuth>
|
||||||
|
</https>
|
||||||
</addMock>
|
</addMock>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -133,6 +164,18 @@ Send POST request to localhost:<PORT>/serverControl
|
||||||
- responseHeaders - groovyClosure as string which must evaluate to Map which will be added to response headers, default { _ -> \[:] }
|
- responseHeaders - groovyClosure as string which must evaluate to Map which will be added to response headers, default { _ -> \[:] }
|
||||||
- schema - path to xsd schema file on mockserver classpath; default empty, so no vallidation of request is performed; if validation fails then response has got status 400 and response is raw message from validator
|
- schema - path to xsd schema file on mockserver classpath; default empty, so no vallidation of request is performed; if validation fails then response has got status 400 and response is raw message from validator
|
||||||
- imports - list of imports for closures (each import is separate tag); `alias` is the name of `fullClassName` available in closure; `fullClassName` must be available on classpath of mock server
|
- imports - list of imports for closures (each import is separate tag); `alias` is the name of `fullClassName` available in closure; `fullClassName` must be available on classpath of mock server
|
||||||
|
- https - HTTPS configuration
|
||||||
|
|
||||||
|
#### HTTPS configuration
|
||||||
|
|
||||||
|
- keystorePath - path to keystore in JKS format, keystore should contains only one privateKeyEntry
|
||||||
|
- keystorePassword - keystore password
|
||||||
|
- keyPassword - key password
|
||||||
|
- truststorePath - path to truststore in JKS format
|
||||||
|
- truststorePassword - truststore password
|
||||||
|
- requireClientAuth - whether client auth is required (two-way SSL)
|
||||||
|
|
||||||
|
**HTTP** and **HTTPS** should be started on separated ports.
|
||||||
|
|
||||||
### Closures request properties
|
### Closures request properties
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue