[Fedora Elections] #21: Anonymize datasets
by fedora-badges
#21: Anonymize datasets
-------------------------+--------------------------------------------------
Reporter: nigelj | Owner: nigelj
Type: enhancement | Status: new
Priority: major | Milestone: Release 0.2.0
Component: General | Version: 0.1.5
Keywords: |
-------------------------+--------------------------------------------------
Apologies if this is how the system currently works.
I'm posting this on behalf of the Fedora Board. We would like for our
election voting tool to work like this:
FAS2 user goes to vote, they authenticate. The voting system assigns the
user a unique ID number. The user then votes, and confirms their vote. The
"ballot" is stored but is tied only to this unique ID number (not to the
FAS2 user/account). The FAS2 system records that the FAS2 user has voted,
but does not store a correlation between the FAS2 account and the unique
ID number attached to the ballot.
Thus, we have a dataset showing the results, but it is anonymized
automatically, and we still know who has (and has not) voted, just not who
(or what) they voted for.
Thanks in advance.
---
2008-07-29 19:26:00 changed by mmcgrath
Just so we're clear. The idea is to ensure that the results of a ballot
cannot in any way be tied to a user. We would also not want this data in
logs on the elections app servers correct?
This might make fraud more likely but then I'm not entirely sure how its
any better or worse from that perspective with what we have now.
G, can you think of any technical hurdles in implementing this?
Spot/Board: Do you want us to anonymize the data that's already in the
database?
2008-07-29 19:35:42 changed by spot
Yes, that is the idea. We would not want a correlation between a ballot
and a user anywhere, not even logs. If we're careful with ensuring that
once a ballot is submitted, the FAS2 user is marked as having voted in an
election, I don't think we open the door to any additional fraud
possibilities.
As to anonymizing the existing data, I'm not sure it is worth the effort.
2008-07-29 21:39:01 changed by jspaleta
If we are going to be making changes to address the voting system... are
we gonna make any effort to contact someone doing active research into
electronic voting methods to get an idea as to existing workable
implementation concepts that accomplish the desired anonymizing of the
voting but also protect against fraud?
-jef
--
Ticket URL: <https://fedorahosted.org/elections/ticket/21>
Fedora Elections <https://fedorahosted.org/elections/>
Fedora Elections
9 years, 5 months
Branch 'evo_graph' - runserver.py
by Pierre-YvesChibon
runserver.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit b33c090774f79a3249e1f94d5d319dd8ae169127
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sun Nov 30 09:44:25 2014 +0100
Activate the profiler with --profile
diff --git a/runserver.py b/runserver.py
index 5f21658..922f528 100755
--- a/runserver.py
+++ b/runserver.py
@@ -1,8 +1,16 @@
#!/usr/bin/env python
import __main__
-__main__.__requires__ = ['SQLAlchemy >= 0.7']
+__main__.__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4']
import pkg_resources
+import sys
+from werkzeug.contrib.profiler import ProfilerMiddleware
+
from fedora_elections import APP
APP.debug = True
+
+if '--profile' in sys.argv:
+ APP.config['PROFILE'] = True
+ APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])
+
APP.run()
9 years, 5 months
Branch 'evo_graph' - fedora_elections/models.py
by Pierre-YvesChibon
fedora_elections/models.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 493f4889f67504b31c916d4b3fb13caa26aa9704
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 29 22:20:27 2014 +0100
Include the timestamp in the group_by to make pg happy - thanks faitout
diff --git a/fedora_elections/models.py b/fedora_elections/models.py
index 8aec303..e6cddc0 100644
--- a/fedora_elections/models.py
+++ b/fedora_elections/models.py
@@ -428,7 +428,8 @@ class Vote(BASE):
).filter(
Vote.election_id == election_id
).group_by(
- Vote.voter
+ Vote.voter,
+ Vote.timestamp
).all()
stats['dates'] = [
9 years, 5 months
Branch 'evo_graph' - fedora_elections/templates
by Pierre-YvesChibon
fedora_elections/templates/results.html | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit d56407e43844cf4622e709bf4a75b3967e61348d
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 29 19:33:58 2014 +0100
Add a mention that there is more info when hovering over a bar of the graph
diff --git a/fedora_elections/templates/results.html b/fedora_elections/templates/results.html
index 3c436b7..7f57b08 100644
--- a/fedora_elections/templates/results.html
+++ b/fedora_elections/templates/results.html
@@ -154,6 +154,17 @@
}).appendTo("body").fadeIn(200);
}
+ // Add 'details' label to the charts.
+ var placeHolderCanvas;
+ var placeHolderCanvasContext;
+ placeHolderCanvas = $("#placeholder canvas")[0];
+ if(placeHolderCanvas != null){
+ placeHolderCanvasContext = placeHolderCanvas.getContext("2d")
+ placeHolderCanvasContext.fillStyle = "#545454";
+ placeHolderCanvasContext.font = "8pt Arial";
+ placeHolderCanvasContext.fillText("Hover Over A Bar For Additional Details", 25, 30);
+ };
+
$("#placeholder").bind("plothover", function (event, pos, item) {
$("#x").text(pos.x);
$("#y").text(pos.y);
9 years, 5 months
Branch 'evo_graph' - fedora_elections/elections.py
by Pierre-YvesChibon
fedora_elections/elections.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit bfaaa8241ee8bd534fcc996464a74cc25fcd693f
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 29 19:15:04 2014 +0100
Include the last day of the election in the days checked for the plot
diff --git a/fedora_elections/elections.py b/fedora_elections/elections.py
index 3606455..6f76f9d 100644
--- a/fedora_elections/elections.py
+++ b/fedora_elections/elections.py
@@ -367,7 +367,7 @@ def election_results(election_alias):
cnt = 1
evolution_lbl = []
evolution_data = []
- for delta in range((election.end_date - election.start_date).days):
+ for delta in range((election.end_date - election.start_date).days + 1):
day = (
election.start_date + timedelta(days=delta)
).strftime('%d-%m-%Y')
9 years, 5 months
Changes to 'evo_graph'
by Pierre-YvesChibon
New branch 'evo_graph' available with the following commits:
commit f78f7d466d0c688b68da48acd7fc9aa83bc5d49f
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 29 19:10:44 2014 +0100
Show in the result page the evolution of the number of voters during the election
commit 0781c142294e9e7660591937255ff1118d9f3ab4
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 29 19:10:07 2014 +0100
Import the jquery flot library used to make plots in the result page
commit b9fc919def00c94dd8bdaddfc305ead45cde620c
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 29 19:07:51 2014 +0100
Count for each day of the election how many people voted
Store the result in evolution_data and the list of days in evolution_lbl
These can then be used to plot the evolution of the number of voters
during the election.
commit b9997132945657048ca2f65ab64a9f9fa66f1f1d
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 29 19:06:23 2014 +0100
Retrieve the list of dates grouped by user during an election
And return this list as part of the stats dictionary so that the UI can
do something with it
commit e829746c82eb5be58dd6c3a6f67d191c037c5b26
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 29 19:06:09 2014 +0100
Small layout change
9 years, 5 months
Changes to 'refs/tags/v2.4.2'
by Pierre-YvesChibon
Tag 'v2.4.2' created by Pierre-Yves Chibon <pingou(a)pingoured.fr> at 2014-11-25 15:39 +0000
Release 2.4.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAlR0orEACgkQ2HRbBxDocwpJRACgnQZZQoRr9h1xWzhVPRk6WxDV
GwwAmwQCLbNzSoxwh8CIYj2X1bPZCA0i
=ZFpC
-----END PGP SIGNATURE-----
Changes since v2.4.1:
Pierre-Yves Chibon (5):
Add python module to set up the email handler for logs
Set up logging properly to log to apache's logs and send email for errors
Merge pull request #39 from fedora-infra/fix_logging
Fix import and typo due to copy/paste
Release 2.4.2
---
fedora_elections/__init__.py | 20 +++++
fedora_elections/mail_logging.py | 148 +++++++++++++++++++++++++++++++++++++++
files/fedora-elections.spec | 7 +
3 files changed, 173 insertions(+), 2 deletions(-)
---
9 years, 5 months
Branch 'develop' - 2 commits - fedora_elections/__init__.py files/fedora-elections.spec
by Pierre-YvesChibon
fedora_elections/__init__.py | 7 +++++--
files/fedora-elections.spec | 7 ++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 59260e679031a3a8d05d345f7812b1858bb6a7b8
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 25 16:17:21 2014 +0100
Release 2.4.2
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 7ffd58a..8e301a9 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -24,7 +24,7 @@
# Pierre-Yves Chibon <pingou(a)fedoraproject.org>
#
-__version__ = '2.4.1'
+__version__ = '2.4.2'
import logging
import os
diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec
index e159b06..4a12d5c 100644
--- a/files/fedora-elections.spec
+++ b/files/fedora-elections.spec
@@ -1,7 +1,7 @@
%define modname fedora_elections
Name: fedora-elections
-Version: 2.4.1
+Version: 2.4.2
Release: 1%{?dist}
Summary: Fedora elections application
@@ -111,6 +111,11 @@ install -m 644 files/update_1_to_2.sql \
%changelog
+* Tue Nov 25 2014 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.4.2-1
+- Update to 2.4.2
+- Fix logging so that we log into apache's logs and email when having an
+ error
+
* Thu Nov 20 2014 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.4.1-1
- Update to 2.4.1
- Adjust the election form to inform the user that cla_done is always required
commit 122de666d50a894411bd5b081b6ba7300e4b3d2c
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 25 16:16:36 2014 +0100
Fix import and typo due to copy/paste
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 74ca25e..7ffd58a 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -26,7 +26,9 @@
__version__ = '2.4.1'
+import logging
import os
+import sys
from datetime import datetime, time
from functools import wraps
@@ -41,6 +43,7 @@ from flask.ext.fas_openid import FAS
import dogpile.cache
import fedora_elections.fedmsgshim
+import fedora_elections.mail_logging
import fedora_elections.proxy
APP = flask.Flask(__name__)
@@ -53,7 +56,7 @@ FAS = FAS(APP)
# Set up the logging
if not APP.debug:
- APP.logger.addHandler(anitya.mail_logging.get_mail_handler(
+ APP.logger.addHandler(fedora_elections.mail_logging.get_mail_handler(
smtp_server=APP.config.get('SMTP_SERVER', '127.0.0.1'),
mail_admin=APP.config.get('MAIL_ADMIN', 'admin(a)fedoraproject.org')
))
9 years, 5 months
3 commits - fedora_elections/__init__.py files/fedora-elections.spec
by Pierre-YvesChibon
Rebased ref, commits from common ancestor:
commit 59260e679031a3a8d05d345f7812b1858bb6a7b8
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 25 16:17:21 2014 +0100
Release 2.4.2
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 7ffd58a..8e301a9 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -24,7 +24,7 @@
# Pierre-Yves Chibon <pingou(a)fedoraproject.org>
#
-__version__ = '2.4.1'
+__version__ = '2.4.2'
import logging
import os
diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec
index e159b06..4a12d5c 100644
--- a/files/fedora-elections.spec
+++ b/files/fedora-elections.spec
@@ -1,7 +1,7 @@
%define modname fedora_elections
Name: fedora-elections
-Version: 2.4.1
+Version: 2.4.2
Release: 1%{?dist}
Summary: Fedora elections application
@@ -111,6 +111,11 @@ install -m 644 files/update_1_to_2.sql \
%changelog
+* Tue Nov 25 2014 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.4.2-1
+- Update to 2.4.2
+- Fix logging so that we log into apache's logs and email when having an
+ error
+
* Thu Nov 20 2014 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.4.1-1
- Update to 2.4.1
- Adjust the election form to inform the user that cla_done is always required
commit 122de666d50a894411bd5b081b6ba7300e4b3d2c
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 25 16:16:36 2014 +0100
Fix import and typo due to copy/paste
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 74ca25e..7ffd58a 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -26,7 +26,9 @@
__version__ = '2.4.1'
+import logging
import os
+import sys
from datetime import datetime, time
from functools import wraps
@@ -41,6 +43,7 @@ from flask.ext.fas_openid import FAS
import dogpile.cache
import fedora_elections.fedmsgshim
+import fedora_elections.mail_logging
import fedora_elections.proxy
APP = flask.Flask(__name__)
@@ -53,7 +56,7 @@ FAS = FAS(APP)
# Set up the logging
if not APP.debug:
- APP.logger.addHandler(anitya.mail_logging.get_mail_handler(
+ APP.logger.addHandler(fedora_elections.mail_logging.get_mail_handler(
smtp_server=APP.config.get('SMTP_SERVER', '127.0.0.1'),
mail_admin=APP.config.get('MAIL_ADMIN', 'admin(a)fedoraproject.org')
))
commit a3da86e46e87502a73823b115f48b035c23fc829
Merge: cafb4b2 e6f3c91
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 25 16:13:42 2014 +0100
Merge pull request #39 from fedora-infra/fix_logging
Fix logging
9 years, 5 months