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

Ability to specify file path for saving the root certificate files #9

Closed
6sigmadc opened this issue Nov 29, 2018 · 7 comments
Closed
Assignees

Comments

@6sigmadc
Copy link

My user case:

My NodeJS scripts and node_modules folder is deployed to "Program Files\MyApp" folder and ran as a window service. When the tool tries to write the root certificate to the node_modules it fails as it has no write permission to do so.

According to the windows guidelines, applications shall not require write permissions to their folder. It will be better if the application writing data to a user profile folder (C:\Users\username\AppData) or to a common data folder (C:\ProgramData).

I wonder if it is OK to add the ability for specifying the path for the root certificates so we can put them somewhere else.

Thanks for making this amazing tool!

@ukoloff
Copy link
Owner

ukoloff commented Nov 30, 2018

According to the windows guidelines, applications shall not require write permissions to their folder

Yes, writing to program folder is definetly not a best practice on Windows.
But win-ca was developed primarily as proof of concept.

And in most cases this behaviour is just fine.
I think we should preserve it but allow some fallback to
save certificates to user profile folder in some rare cases.

I wonder if it is OK to add the ability for specifying the path for the root certificates

It is certainly possible (and even easy),
but I prefer not to have any configuration file
(or environment variable,
or registry key etc)

May be we could first try to save to the folder inside node_modules
and if it fails fallback to %USERPROFILE%\.local\win-ca\lib
or something like that.

Will it suit you?

@6sigmadc
Copy link
Author

Thanks for the quick response.

Yes I like the fact that the tool is simple to use as all you need is “require” it. Putting them in a fall back location would definitely works for me.

@ukoloff
Copy link
Owner

ukoloff commented Dec 1, 2018

Well, try

npm i win-ca@beta

@6sigmadc
Copy link
Author

6sigmadc commented Dec 7, 2018

I think I can get it working for my case - it took longer then expected but I am on top of it.

Thanks for the change!

@6sigmadc
Copy link
Author

I just tested on my machine and on the client machines and both work like a charm!

@ukoloff
Copy link
Owner

ukoloff commented Dec 10, 2018

Great! I plan to release new version tomorrow.

@ukoloff
Copy link
Owner

ukoloff commented Dec 11, 2018

win-ca v2.3.0 is out!

@ukoloff ukoloff self-assigned this Dec 11, 2018
@ukoloff ukoloff closed this as completed Dec 11, 2018
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