Security/Privacy Improvements

Security/Privacy Improvements

by Edgar R. Weippl -
Number of replies: 7

Here are a couple of issues that my students and I have identified. What do you think? In March I might have the chance to have students work on some of those issues.

Which are the most important ones for you? Would they become part of the standard Moodle system (if we document the changes well)?

Cheers,
Edgar.

Proposal to improve security:

1. Login
2. IP Restriction
3. History Delete
4. Anonymous User
5. Restrict Email-based Authentication

1. Login
To avoid replay attacks the user is first prompted for the user name.
Then a random value is generated and sent to the client (and stored in an
additional field in the user table). The client enters the
password, it is hashed to MD5. Now the random value is appended and it is
again hashed (MD5) and returned to the server. The server retrieves the random
value and the password (hashed) from the user table and performs the same
operations to verify the login process.

It is important that the concatenation and hashing on the client side really
is performed by the client browser (client side scripting).

The advantage of this process is that the password cannot be replayed even if
no encrypted connection is used. This is useful because many ISP do not allow
(cheap) accounts to use SSL.

2. IP Restriction
Restricting user accounts (or all students of a course) to certain IP
addresses (e.g. campus only) add an additional layer of security preventing
unauthorized users from logging onto the server.

Again, this could be achieved on a Web server level but since Moodle is often
hosted by "standard" Web site providers, an application level restriction is
far easier to handle and can be used on a finer level of granularity.

For instance, if the admin user always works from 2 IP addresses only one can
restrict that admin logons are only possible from these IP addresses

3. Deleting a history
The user has the option to delete his/her log entries that identify him/her by
name and IP address. Clicking the "delete log" button changes the IP address
to "unknown" and replaces the user name with "anonymous user".

4. Anonymous user
Courses that do not allow guests track each users moves. To allow open
discussions on controversial topics (without the fear of having one's opinions
backup to tape and revealed years later) it is useful to allow an "anonymous
mode".

In this mode the user still has to log on (allowing only course participants
to join) but in the log file the user name "anonymous user" is logged and no
IP address is stored.

In addition, the username is not stored and displayed for forum posts.
Clearly, a posting can no longer be edited by the user because the user is not
stored.

Obviously user tracking can still be done on a Web server level but logs are
not that detailed as in Moodle.


5. Restrict Email-based Authentication

Allow only certain email addresses to register when one trusts the provider
(e.g. only own university accounts).

Average of ratings: -
In reply to Edgar R. Weippl

Re: Security/Privacy Improvements

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Thanks, Edgar - some good ideas in there.

1) Will be in 1.2 already. See recent discussion.

2) My DNS provider uses this and it is a good "one day" idea.  Not urgent, though, especially if (1) is implemented.

3) Hmmm ... who exactly would we be protecting from whom here?

4) I can guess that might be useful sometimes, even though I personally can't imagine any discussion worthy of such secrecy.  Got any examples in mind?   System-wide changes like this would not be easy, since the userid is used for everything, and my whole pedagogical strategy is focussed on people learning about each other in the class, which involves a certain level of exposure.  This is not a bad thing, this is a vital element in productive long-term learning conversations.  Perhaps your idea could be implemented as a new anonymous module of some kind ...

5) Best implemented by simply not using email authentication, and using LDAP/IMAP/POP3/db authentication instead.

Cheers,
Martin
In reply to Martin Dougiamas

Re: Security/Privacy Improvements

by Edgar R. Weippl -

3) well, students (in Austria) are usually very sensitive about their electronic privacy. Giving students the option to delete their history gives them the freedom to chose. Mostly, they complained about not having the choice. Whenever I allowed them to "opt-out" of things, they never did.

4) anonymous discussions (that are still open only for class participants) can be useful when discussing topics such as "abortion", "terrorists", etc. Given the fact that backups of the whole course will be available for ever (at least students can't be sure that the teacher, the admin and the Web site host really delete all backups).

If, for instance, the government changes (in politically not stable countries) or you decide to run for president (in the US for the Republicans and 20 years before you were "pro-abortion" in the Moodle Forum) you might regret having made such statements.

I guess, your idea to implement this as a separate module is best. I'll try to take the forum and make an "anonymous" forum, as a separate module.

5) sure POP authentication is the choice (for me) I knew about it but forgot it wink The only minor issue is that students have to enter their email password in Moodle (and they might not trust the departments installation). ...but I guess there are more important things...

In reply to Martin Dougiamas

Re: Security/Privacy Improvements

by Zbigniew Fiedorowicz -

With respect to (1), i.e. challenge/response authentication, that would necessarily be limited to authentication with respect to the local Moodle database. For external authentication, Moodle would need to obtain the actual password from the user, not a hashed version of it, as it would need to send the password on to the external server for authentication.

An alternative without this limitation, would be to use Java-based public-key encryption, such as the OpenPGP Java implementation available from www.cryptix.org. The downloaded Java applet would encrypt the user's password using the public-key of the Moodle server before sending it to the server.

In reply to Zbigniew Fiedorowicz

Re: Security/Privacy Improvements

by Zbigniew Fiedorowicz -

Just an afterthought: it seems that Javascript is too slow to implement any practical public-key encryption. The only Javascript implementations I was able to find via Google seem to be toy implementations meant to demonstrate the principles of public-key encryption.

In reply to Zbigniew Fiedorowicz

Re: Security/Privacy Improvements

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Yes, quite true this only works for internal authentication, which does limit the effectiveness somewhat in larger installations, but then these larger installations have the https option. The Javascript MD5 solution will be welcome for 99% of the webhosters ...

Don't get me started about what I think of Java. smile
In reply to Martin Dougiamas

Re: Security/Privacy Improvements

by Zbigniew Fiedorowicz -

There are situations where the Moodler is associated with a medium/large institution, which is hostile to the idea of hosting Moodle on their own servers (c.f. http://moodle.org/mod/forum/discuss.php?d=4885. Nevertheless the Moodler, while hosted on an independent provider, could still surreptiously use something like pop3 authentication hosted on the institution's servers

In reply to Zbigniew Fiedorowicz

Re: Security/Privacy Improvements

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Some options for these guerillas: smile

a) just don't use MD5 authentication ... chances of sniffers are really pretty low.

b) convince the insititution to get Moodle accepted internally (the security differential might actually work in our favour smile)

c) upgrade to a web hosting account that supports SSL

d) contribute an alternative lightweight solution that doesn't require plugins smile