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

YAML file as database back-end for kotnetcli-server #109

Open
jovanbulck opened this issue Apr 27, 2016 · 0 comments
Open

YAML file as database back-end for kotnetcli-server #109

jovanbulck opened this issue Apr 27, 2016 · 0 comments
Labels

Comments

@jovanbulck
Copy link
Collaborator

jovanbulck commented Apr 27, 2016

Different CGI scripts on kotnetcli test server should communicate via a simple YAML file, acting as a persistent database back-end. To ensure deterministic test behavior, we want to start up with "clean"/known database state every time we re-start server.py. I therefore propose to:

  1. create an init_db.yml file in kotnetcli/server with known dummy state
  2. before starting the CGIHTTPServer, server.py copies this file into a new temporary file, say tmp_db.yml (see https://docs.python.org/2/library/tempfile.html)
  3. on cgi-bin/wayf2.pl GET request for a specific user, the returned pwdxxx and a timestamp are saved into tmp_db.yml (as a yaml attribute for that user)
  4. on cgi-bin/netlogin.pl POST request, the info from tmp_db.yml is used to validate the request; on success, the IP address and other relevant info is stored in tmp_db.yml (as a yaml attribute for that user)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant