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

Support reading password from file #69

Open
septatrix opened this issue Jul 18, 2021 · 5 comments
Open

Support reading password from file #69

septatrix opened this issue Jul 18, 2021 · 5 comments

Comments

@septatrix
Copy link
Collaborator

This is necessary to support e.g. dockers and podmans secrets mechanism or the systemd LoadCredential directive.
For this to work a config option (or flag) would need to be added which gets a path from which the password can be read.

@n0toose
Copy link
Collaborator

n0toose commented Aug 19, 2022

Should the option be shown to the user or be "internal", as to not encourage anyone to leave their RWTH SSO password laying around in plain text without some sort of a good justification?

@septatrix
Copy link
Collaborator Author

It can be shown to the user. Currently one can also put the password in the config file so in that regard there is not too much of a difference

@n0toose
Copy link
Collaborator

n0toose commented Aug 19, 2022

Yeah, completely forgot about that part. Hey, maybe we could use the config file for that?

@n0toose
Copy link
Collaborator

n0toose commented Aug 23, 2022

This is necessary to support e.g. dockers and podmans secrets mechanism

I am a bit uneducated on the subject, is an entrypoint.sh file with

#!/bin/bash
BASEDIR=$(dirname "$0");
cd $BASEDIR;

if [[ -n "$PASS" ]];
then
  if [[ -n "$USER" ]];
  then
	  python3 -m syncMyMoodle $TOKEN
  else
	  echo 'You must specify environment variable $USER'
  fi
else
  echo 'You must specify environment variable $PASS'
fi
fi

not good enough? (P.S. I wrote the file in bulk)

@septatrix
Copy link
Collaborator Author

Not really because there are often ways in which environment variables can be accessed or are leaked.
Docker, Kubernetes, Systemd etc. therefore write the content to files and pass the files as environment variables.
These files must the be read to get the secrets

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