TLS auth example
How to create valid local untusted nginx installation and TLS auth.
- Start django app
- install nginx
generate_client_cert.shor use existing demo keys from demo_keys directory
- copy nginx config to nginx folder, copy keys to /etc/nginx/tls-ssl/ folder
- start nginx
- ensure script
pythonic_certificate.pyhas access to client keys (put them in same directory or update pathes inside the script)
Leave any password empty when you create the certificates.
After the script has been started it will return you demo_auth result, where you expect some user returned. When you go http://127.0.0.1:5200/admin/auth/user/ here you can see this user. If you have already created some demo accredited party in django admin then you can add relationship between this user and this party http://127.0.0.1:5200/admin/accreditations/userpartyaccess/ here, and from now on
pythonic_certificate.py script would return this party ID in
You may not worry about keys generation and just use keys from demo_keys folder here, I've generated it for you.