From 2a13c8256b2b64c3c61e043a1d9268b75a4597a4 Mon Sep 17 00:00:00 2001 From: equinox Date: Tue, 27 Sep 2011 06:52:54 +0200 Subject: 802.1X config template --- index.py | 7 +++++++ static/app_8021x.png | Bin 0 -> 1107 bytes static/layout.css | 24 ++++++++++++++++++++++++ templates/8021x.html | 33 +++++++++++++++++++++++++++++++++ templates/layout.xi | 9 +++++++++ templates/select.html | 2 ++ 6 files changed, 75 insertions(+) create mode 100644 static/app_8021x.png create mode 100644 templates/8021x.html diff --git a/index.py b/index.py index 6de80c5..9f78ea0 100755 --- a/index.py +++ b/index.py @@ -50,6 +50,10 @@ class SubdapSite(object): def index(s): return render(errors = {}) + @expose('8021x.html') + def cfg8021x(s, username = "username"): + return render(errors = {}, username = username) + def login_perform(s, username, password): dn = "cn=%s,ou=people,dc=sublab,dc=org" % (username) try: @@ -65,6 +69,9 @@ class SubdapSite(object): @expose('login.html') def login(s, username = None, password = None): + if cherrypy.request.method.upper() == 'GET': + return render(errors = {}) + if username == None or password == None: return render(errors = {'password': 'Login incorrect'}) if username == '' or password == '': diff --git a/static/app_8021x.png b/static/app_8021x.png new file mode 100644 index 0000000..ef3c6da Binary files /dev/null and b/static/app_8021x.png differ diff --git a/static/layout.css b/static/layout.css index 181d563..d54d79e 100644 --- a/static/layout.css +++ b/static/layout.css @@ -2,6 +2,7 @@ body, table { font-family:sans; font-size:11pt; } +body#large, body#formcont { margin:auto; text-align:center; @@ -9,6 +10,21 @@ body#formcont { body#formcont < div { display:inline-block; } +body#large < div { + display:inline-block; + text-align:left; +} +body#large div.cont { + display:inline-block; + vertical-align:top; + text-align:left; + border-left:1px solid #888; + margin:2em; + margin-left:0.5em; + padding:2em; + min-height:180px; +} + img#logo { display:inline-block; margin:3em; @@ -31,6 +47,14 @@ body#formcont form p { font-size:8pt; } +h1 { + font-size:14pt; + margin:6pt 0pt; +} +pre { + text-align:left; +} + p.app { border:1px solid #ccc; padding:2pt; diff --git a/templates/8021x.html b/templates/8021x.html new file mode 100644 index 0000000..3e3405a --- /dev/null +++ b/templates/8021x.html @@ -0,0 +1,33 @@ + + + + + + login + + +
+

wpa_supplicant WPA-EAP template

+
network={
+	scan_ssid=1
+	ssid="crew.sublab.org"
+
+	key_mgmt=WPA-EAP
+	eap=TTLS
+	phase2="auth=PAP"
+
+	identity="${username}"
+	password="passwort hier einsetzen"
+
+	anonymous_identity="bernd"
+	ca_cert="/etc/ssl/certs/cacert.org.pem"
+	altsubject_match="DNS:taifun.local.sublab.org"
+	priority=500
+}
+   
+
+
+ diff --git a/templates/layout.xi b/templates/layout.xi index ed8dab8..b5dfd47 100644 --- a/templates/layout.xi +++ b/templates/layout.xi @@ -30,4 +30,13 @@ + + + +
+ + ${select('*')} +
+ +
diff --git a/templates/select.html b/templates/select.html index 5fd322f..b25cd1c 100644 --- a/templates/select.html +++ b/templates/select.html @@ -19,6 +19,8 @@ Hallo ${user['cn']}!

wiki sublab.org wiki

+

+ wlan 802.1X config

pwchange Passwort ändern

-- cgit v1.2.1