Home > Domino Tips > Spam and Security > Reader fields - - an oldie but goodie
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SPAM AND SECURITY

Reader fields - - an oldie but goodie


Chuck Connell
09.04.2001
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


You Can View User Feedback To This Tip

Reader fields have been part of the Domino security architecture since the Mesozoic Era. Even so, they are not well understood by all Domino administrators and developers. This is unfortunate, since Reader fields offer one of the simplest, yet most powerful, security features of Domino and Notes. This short article will present an overview of Reader fields, so you will know where they might be helpful to you, mention some important side issues related to Reader fields, and provide pointers for further information.

SUMMARY OF READER FIELDS

Reader fields are Domino's per-document security method. In other words, Reader fields are used to grant (or deny) access to specific documents for specific users. The Domino server handles this work invisibly, so that users never see the documents they are not allowed to see. To implement Reader fields, you create a field (with any name) on the form and designate the field as type Readers. The contents of the field can be created in any way you want -- calculated when a document is created with the form, chosen manually by the document's author from a picklist, etc.

When a document has a Reader field, the Domino server will only show that document to users who:
a) have at least Reader access to the database in the ACL, and b) are listed in the Reader field of the document. Reader fields can also contain role names (and the roles can be assigned to groups) to provide great flexibility.

Reader fields are useful in many situations. For one example, imagine that you have a database which contains sales leads for all the salespeople in your company. But suppose that you don't want salespeople to see one another's leads. You can do this easily with Reader fields. Add a field named WhoCanSeeThis to the contact form. Set the field to type Readers and make it a Computed field in a hidden paragraph. Calculate the contents of the field (salesperson name) based on the first 3 digits of the Zip code (or however sales territories are assigned). Whenever salespeople open the database, they will see only their own sales leads. Leads in other sales territories simply will not appear in any view.

COROLLARY: USE REAL NAMES ON FORMS

A corollary to Reader fields is to use real Notes-style names whenever you include names in a form design. Then, if you later want to add a Reader field to the form, you already have the right names. To see how important this is, imagine that you don't do it. Suppose you have a field on a document with names like "Smith, John" and "White, Betty". If you want to add the Reader feature, these names will have to be translated (a potentially tricky process) to Notes-style names such as "John Smith" or "John Smith/ACME".

COROLLARY: DON'T ROLL YOUR OWN DOCUMENT-LEVEL SECURITY

Another corollary to Reader fields is to let Domino do this work for you. Some applications attempt to simulate the same feature by checking for document permission in a QueryOpen event. The QueryOpen code compares the user's name to a list of allowed names, then disallows the open event if the user is not authorized. There are several problems with this. The first is that there is no reason to write code for a feature that you can get with no coding! Second, a clever user probably can get around the security check, so your security is not very secure.

FOR MORE INFORMATION

Here is an article that presents a broad discussion about Domino/Notes Security, with one section dedicated to Reader fields:
http://www.notes.net/today.nsf/cbb328e5c12843a9852563dc006721c7/71102330e24a7ce5852564b5005e3682?OpenDocument

Here is a short sidebar to another article and also covers Reader fields well:
http://www.notes.net/today.nsf/625c2f03e734191a85256468005e76f6/f4268ab5fe50e95085256571006ef94f?OpenDocument

Also see the Domino R5 Designer Help (which comes with the Domino product), click on the Index view, then type "readers".

Chuck Connell is president of CHC-3 Consulting http://www.chc-3.com, a consultancy that helps organizations with all aspects of Domino and Notes, especially security.

USER FEEDBACK TO THIS TIP

  • Just a quick addition to Chucks Reader fields Tip
    I have found that if I am designing a database with access restrictions, it is always wise to add a master reader field to all forms that contain security with groups listed inside such as $All_Servers, or $Administrators.

    The formula for this is simply:

    "$All_Servers":"$Administrators" and this concatenate them in a list.
    Make sure that you don't type:
    "$All_Servers" + "," + "$Administrators" as this will simply enter a text string, not a list.

    Also it is best to leave other user restrictions in a seperate field. I have made this mistake in my earlier days, and ended up locking myself out of documents (as the reader field contains the text string "$All_Servers,$Administrators" there is no group called this, so you will lose access.

    This way administrators have access to all the documents in the database and the servers have access to all the documents in the database (for agents etc..).

    An alternate way is to create an application administrators group in the NAB, add in the persons/servers who need access, then add this to the masterreader field.

    Hope this is of use.
    Kindest regards —Paul Thompson, A Senior Lotus Notes Developer in the UK.

  • I'm not sure if this issue was corrected because I've never re-created the problem but when I was developing under 3.3, using reader fields, I failed to include the "Local Domain Servers" in the list of individuals with access. By not adding "Local Domain Servers" in the Readers Field, it prevented our other servers from seeing the document during replication. Once I added "Local Domain Servers", the document replicated with no problem. If this was corrected at the server level great! If not, it might be a good item to mention in case developers plan to allow multiple users who reside in different servers.—Abner Morales

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Spam and Security
Securely connect Lotus Domino servers on different domains
Protect Lotus Notes from malicious code with the Domino ECL
How to correct Lotus Notes public key mismatches in four easy steps
A recipe for secure IM success
Telecommuter security kit
Spear phishing: Don't be a target
FAQ: Lotus Notes Domino password issues
Security awareness training: How to educate employees about spyware
Seven tips to strengthen your Domino e-mail security
Admin2005 preview: Tips, techniques, and a look at Notes/Domino Rel. 7

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts