-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Support for loading credentials from $CREDENTIALS_DIRECTORY #41
Milestone
Comments
That makes sense and it should be quite simple to add. |
For reference, I have something like the following in my utils file: defp path_from_credentials_dir(name) do
if credentials_directory = System.get_env("CREDENTIALS_DIRECTORY") do
path =
Path.join(credentials_directory, name)
if File.regular?(path) do
path
else
nil
end
else
nil
end
end It's not much and it's not a big problem to have that in my own code, but this package seems like a natural place for it to live. |
It looks interesting, however I would remove the second check in the body. So it would return paths even to non-existent credentials. |
hauleth
added a commit
that referenced
this issue
May 4, 2024
This adds new function `systemd:credentials/1` which returns path for credentials' files. This function checks if the `$CREDENTIALS_DIRECTORY` variable was set and if it was set, then the path is always returned. It is left up to the user to check if the file is existing and/or correct one. Close #41
hauleth
added a commit
that referenced
this issue
May 4, 2024
This adds new function `systemd:credentials/1` which returns path for credentials' files. This function checks if the `$CREDENTIALS_DIRECTORY` variable was set and if it was set, then the path is always returned. It is left up to the user to check if the file is existing and/or correct one. Close #41
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This feature would make it easier to support the workflow around LoadCredentials and friends as described here: https://systemd.io/CREDENTIALS/
The text was updated successfully, but these errors were encountered: