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

Add credentials dynamically #72

Open
docjojo opened this issue May 31, 2024 · 9 comments
Open

Add credentials dynamically #72

docjojo opened this issue May 31, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@docjojo
Copy link

docjojo commented May 31, 2024

Hello,

is it possible to dynamically add credentials or read credentials from an external file?

I see that credentials are set in eturnal.yml like

credentials:
  alice: l0vesBob
  bob: l0vesAlice
  eve: stalksTh3m

but I would like to dynamically add credentials without touching the eturnal.yml file.

Any idea?

C.

@licaon-kter
Copy link
Contributor

reloading (not restart) the config does not help?

@docjojo
Copy link
Author

docjojo commented May 31, 2024

sure but that would require to edit the file.
i want to register new users and dynamically add user credentials.

@licaon-kter
Copy link
Contributor

So you're editing all sorts of files, running all sorts of commands.... but you don't want to run eturnal reload_config for some reason?

@docjojo
Copy link
Author

docjojo commented May 31, 2024

that's not the point.
i do not want to manually edit the eturnal.yml and add credentials.
i need some automated function.

i could move the credentials to end of eturnal.yml and then append the file with additional credentials. but i was looking for a more convenient solution.

@weiss
Copy link
Member

weiss commented May 31, 2024

I saw this issue coming when we added support for static credentials, mainly with the intention to allow for quick tests 😃

I wouldn't be keen on adding support for a full-blown DB, but a simple text file sounds okay to me (any suggestion on the exact format?).

@weiss weiss self-assigned this May 31, 2024
@weiss weiss added the enhancement New feature or request label May 31, 2024
@docjojo
Copy link
Author

docjojo commented May 31, 2024

Hello Holger,
could be the same format as eturnal.yml and would just include a credential section.

credentials:
  alice: l0vesBob
  bob: l0vesAlice
  eve: stalksTh3m

I would remove credentials from the eturnal.yml so that the two .yml could be merged.

could be a parameter for reload

eturnalctl reload credentials.yml

but that would not be loaded on start/restart so it should probably just be a file in /etc to be included if it exists, such as eturnal.credentials.yml

@weiss
Copy link
Member

weiss commented Jun 15, 2024

Just to give a short feedback, I'd like to either:

  1. Add generic support for including YAML config snippets into the main config file (include /etc/eturnal.d/*.yml), not just for credentials specifically. Or
  2. Stick to some simple credentials.txt format, just username:password lines or whatever.

I'm still thinking about this.

@docjojo
Copy link
Author

docjojo commented Jun 15, 2024

  1. would require some sort of duplicate check, in case a section already exists in the default config.
  2. would probably be easier to implent as it only requires to read the user:pwd like being served in the credentials section.

@docjojo
Copy link
Author

docjojo commented Jun 20, 2024

I do not want to open a new issues for this question, therefore here:

Is there a way to measure and limit bandwidth for a certain user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants