Changes between Version 5 and Version 6 of AccountControl
- Timestamp:
- Oct 14, 2020, 7:42:22 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AccountControl
v5 v6 1 1 = Controlling account creation = 2 2 3 Under normal circumstances BOINC projects are open for participation by anybody who wants to contribute their computer to the project. There may be times, however, when a project needs to limit the creation of new accounts. BOINC offers two alternatives. 3 BOINC has two mechanisms for creating accounts: 4 5 * RPC-based: The [WebRpc#create_account create_account] RPC. 6 This is used by BOINC Manager and by account managers. 7 8 * Web-based: the user fills out a web form (join.php or create_account_form.php). 9 This has the advantages that you can use ReCaptcha (to prevent mass account creation by spammers) 10 and you can customize it however you want. 11 12 By default both mechanisms are enabled. 4 13 5 14 == Disabling account creation == #disabling-account-creation 6 15 7 To disable all account creation, edit the project configuration file [ProjectOptions config.xml] and add to it the element:16 To disable all account creation, edit [ProjectOptions config.xml] and add 8 17 {{{ 9 18 <disable_account_creation>1</disable_account_creation> … … 12 21 Note: 1 = True, 0 = False 13 22 14 This disables account creation via any mechanism (the client, the web, or [AccountManagers account managers]). You can momentarily remove this element while you create accounts. 23 To disable RPC-based account creation, add 24 {{{ 25 <disable_account_creation_rpc>1</disable_account_creation_rpc> 26 }}} 15 27 16 28 == Restricting account creation via 'invitation codes' == #invite-codes 17 29 18 It is also possible to restrict account creation to only those who present a secret 'invitation code'. In this case an account can only be created via the web pages, not via the client or the [AccountManagers account managers].30 You can restrict account creation to those who present an 'invitation code'. 19 31 20 To use this mechanism you need to add to the file `html/project/project.inc` a definition for a PHP constant `INVITE_CODES` containing the allowed invitation codes. A simple example is: 21 22 {{{ 23 define('INVITE_CODES', '/xyzzy/'); 24 }}} 25 26 This allows account creation only if the user enters the invitation code 'xyzzy' (without any quotes). The pattern in INVITE_CODES is compared to the user's input as a [http://php.net/reference.pcre.pattern.syntax Perl-Compatible Regular Expression (PCRE)], so don't forget the enclosing slashes. A more complicated example is: 27 32 To do so, add to the file `html/project/project.inc` a definition for a PHP constant `INVITE_CODES` 33 as a [http://php.net/reference.pcre.pattern.syntax Perl-Compatible Regular Expression (PCRE)] 34 for the set of invitation codes. 35 For example: 28 36 {{{ 29 37 define('INVITE_CODES', '/yohoho|blunderbuss|!grog4U/'); 30 38 }}} 39 This allows someone to create an account if they enter any of the words 'yohoho', 'blunderbuss', or '!grog4U'. 31 40 32 In a PCRE vertical bars separate alternatives, so this pattern just allows someone to create an account if they enter any of the words 'yohoho', 'blunderbuss', or '!grog4U'. More complex pattern matching is possible, though not required. The security of this mechanism depends on how you distribute the invitation codes. If you write the code on the whiteboard in your lab then only someone with access to that room can use it. If you send it out to a mailing list then only members of that list can use it (until someone shares it with someone else who is not on the list). The goal here is not strict security so much as a way for a new project to limit account creation to a restricted set of users while the project is getting started. 41 INVITE_CODES applies to both web and RPC-based account creation. 42 To restrict only RPC-based account creation, use 43 44 {{{ 45 define('INVITE_CODES_RPC', '/yohoho|blunderbuss|!grog4U/'); 46 }}}