Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: Record and Save #27

Closed
StefH opened this issue May 5, 2017 · 9 comments
Closed

New feature: Record and Save #27

StefH opened this issue May 5, 2017 · 9 comments

Comments

@StefH
Copy link
Collaborator

StefH commented May 5, 2017

http:https://wiremock.org/docs/record-playback/

@StefH StefH changed the title New feature: Record and Playback New feature: Record and Save May 9, 2017
StefH added a commit that referenced this issue May 9, 2017
StefH added a commit that referenced this issue May 12, 2017
@StefH
Copy link
Collaborator Author

StefH commented May 12, 2017

Hello @phillee007 , if you have time, can you do some testing with Proxy and Record and Save ?

@phillee007
Copy link
Contributor

phillee007 commented May 12, 2017

Will have a try, although unfortunately all the real services we call require client certificates, so I'm not sure whether it will be possible. I saw a section on http:https://wiremock.org/docs/proxying/ about how to setup client certificate forwarding on java, but will have to do some reading to find out the .Net equivalent...

Have had a quick look at the code in HttpClientHelper, and I'm wondering if additional properties need to be added to the proxy settings class to enable, requests that proxy to thereal service to use a client certificate as specified by the client when initializing the proxying. E.g. assuming:

  • client certificate X is required by real service A (e.g. https://realservice.com)
  • client certificate X is in the machine store on the machine wiremock is running on

we need to tell wiremock that when proxying calls to realservice.com, it needs to read in certificate X from the cert store (most likely by providing a password also) and attach it when proxying the request. Alternatively, we could just read the client cert in as a byte array in the client, and tell wiremock to use that byte array when sending requests, thus not requiring wiremock to actually read the cert from the store.....

@StefH
Copy link
Collaborator Author

StefH commented May 13, 2017

What kind of certificate would you be using ?
Is that a X509Certificate2 ?

@phillee007
Copy link
Contributor

phillee007 commented May 13, 2017 via email

StefH added a commit that referenced this issue May 16, 2017
@StefH
Copy link
Collaborator Author

StefH commented May 16, 2017

I've updated the code and added logic to provide X509Certificate2Filename.

I'm not sure if this works, I'm unable to test this myself.

@phillee007
Copy link
Contributor

phillee007 commented May 16, 2017 via email

@StefH
Copy link
Collaborator Author

StefH commented Jun 9, 2017

Any luck?

@phillee007
Copy link
Contributor

phillee007 commented Jun 9, 2017 via email

@StefH
Copy link
Collaborator Author

StefH commented Nov 18, 2017

@phillee007
Closing for now, in case you have more time to investigate on this subject, please open a new issue.

@StefH StefH closed this as completed Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants