-
Notifications
You must be signed in to change notification settings - Fork 184
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
Configure default write location #114
Comments
Yes the current implementation is not ideal. For the certs temp-dir would be okay 👍 But we are also creating default config-files. Need to do more concepting. A better approach would be to commit required default-configs to the configs dir. But this would break the current zero-configuration approach i.e just run the binary. A counter-point would be that the binary will always be delivered in a tar anyways so we can also ship the config dir with it. |
Currently ocis-konnectd is doing the writing. But lets leave the issue here, as this might concern other services as well in the future. |
or delete generated artifacts on shutdown |
Okay I realize now that it polutes the config dir in the code-tree. Didn't think about this case because I always run the binary with ocis/bin as $PWD. Would a .gitignore entry be okay for a start? But then we need to add files to ocis .gitignore which belong to other repos (ocis-konnectd) 🤔.
This would work for developers but on a production system we probably won't have the permission to create anything in $PWD at all. Assuming configs are in /etc and the binary in /usr/bin or similar. |
IIRC other high-profile golang projects createe a directory in $XDG_CONFIG_HOME unless a flag overrides this behaviour. This would cover both use-cases i.e running in development or testing vs running as daemon. See: https://wiki.archlinux.org/index.php/XDG_Base_Directory |
or just add it to your global gitignore |
Then every developer needs to remember to do it. Bad DX ;) IMO using the XDG standard would be the right approach. What do you think? |
Hmhh... but this would break windows and osx builds. So we would need to have an os-specific abstraction for it. |
...I was in the process of typing this down :D |
In theory the accounts / settings service should account for storing any configuration parameter, a private key and cert counts as that I guess. |
@refs look what I`ve found: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
IMHO this is a super easy quick win @micbar |
Super easy quick fix for me would be more like effort 1 or 3 😄 |
Currently konnectd's default writes a private key and a self signed certificate to the binary running location, leaving the programmer to either exclude this files from the git tree or in general adding some noise. If this is intended only for development we can use a tmp dir
The text was updated successfully, but these errors were encountered: