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

Non-relative SSL cert path results in inaccessible exception #168

Open
thecodenomad opened this issue Mar 16, 2022 · 3 comments
Open

Non-relative SSL cert path results in inaccessible exception #168

thecodenomad opened this issue Mar 16, 2022 · 3 comments

Comments

@thecodenomad
Copy link

Environment:
mockintosh==0.13.17
Docker version 20.10.12, build e91ed57
MacOS Monterey v.12.2.1

Executing mockintosh with non-relative cert paths result in a Certificate loading error.

Expectation:
Specifying a full path to a cert file should work.

Actual:

mockintosh.exceptions.CertificateLoadingError:
Certificate loading error: Path `/my/docker/volume/config/certs/mockingjay.crt` is inaccessible!

Relative Path Restricting code:

def resolve_cert_path(self, cert_path: str) -> str:

@undera
Copy link
Contributor

undera commented Mar 17, 2022

This is by design. Since Mockintosh allows reloading configuration via API, it requires you to explicitly expose any resource files, by putting under working directory tree.
Without that, anyone would be able to access any file on the computer.
The solution is to move certificate file under working directory of Mockintosh.

@thecodenomad
Copy link
Author

thecodenomad commented Mar 18, 2022

That is a fair point, but also feels a little PEBKAC. Are there many users that use mockintosh outside of a docker context? *Is that the suggested way of running it?

Also just wanted to update to say thanks for providing such a great tool!!

@undera
Copy link
Contributor

undera commented Mar 18, 2022

I have no data on how many users are not using Docker.
There is no particular need in running it via Docker, only the ability to not deal with Python ecosystem.

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