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

Pass login information to run_on_login script #52

Open
jfrsw opened this issue Feb 17, 2020 · 0 comments
Open

Pass login information to run_on_login script #52

jfrsw opened this issue Feb 17, 2020 · 0 comments

Comments

@jfrsw
Copy link
Contributor

jfrsw commented Feb 17, 2020

In our setup, as part of the login process, we need to call a captive portal interface using an HTTP request to enable internet browsing for the user. To make that call, we could use a run_on_login script that sent the request, but we would need to have access to both the username and the password that the user typed in to login. IIRC, the login username is available on the .ini file, but the password is not.

To avoid the security risk of writing the password on a file as cleartext, we could pass the username, password, and maybe other Libki information (such as the client name and location) as environment variables that would be added when calling the run_on_login script (or other scripts, like the user shell if used), for example, LIBKI_USER_NAME, LIBKI_USER_PASSWORD, LIBKI_CLIENT_NAME, LIBKI_CLIENT_LOCATION, etc. This way, scripts like run_on_login would only have to look for those environment variables to get that information.

To keep the default behaviour unaltered, this feature could be controlled with a new setting that would specify which information should be passed using the variables, for example pass_env_to_run_on_login=username,password,name,location would create and pass the mentioned environment variables to run_on_login script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants