- PeterMoulding.com
- Author
- Trainer
- Speaker
- Business Coach
- How to write a How To book
- PHP Courses
- Speaking
- Web Architect
- Australia
- Books
- Authors
- Akkana Peck
- Alex Berenson
- Andrew Nugent
- Ben Sanders
- Brock Clarke
- Chris Simms
- David Mercer
- Dianna Mullet
- Don Winslow
- Dori Smith
- Harlan Coben
- Jack McDevitt
- James Wines
- Jerry Yudelson
- John Grisham
- Kevin Mullet
- L. E. Modesitt Jr.
- Laurell K. Hamilton
- Marshall Karp
- Martina Cole
- Michael Marshall Smith
- Michel Roux Jr
- Nadia Sawalha
- Philip Pullman
- Raymond Khoury
- Richard North Patterson
- Robert Masello
- Sally Roth
- Sarah Langan
- Stella Rimington
- Stephen King
- Stephen Leather
- T.C. Boyle
- Tom Negrino
- Tony Hillerman
- Urban Waite
- Val McDermid
- Valerio Massimo Manfredi
- Beginning GIMP
- Beginning Visual C++
- Culturalism
- Fiction
- A Drink Before The War
- A Talent for War
- Bag of Bones
- Blood and Ice
- Burn
- Dark Lady
- Dead Line
- Eclipse
- Empress of Eternity
- Exley
- Flipping Out
- Just One Look
- Nightfall
- Pet Sematary
- Savage Moon
- Skinwalkers
- Starvation Lake
- The Fallen
- The Gardens of the Dead
- The Jump
- The Last Templar
- The Mermaids Singing
- The Midnight Mayor
- The Secret Soldier
- The Summons
- The Terror of Living
- The Testament
- The Tower
- Under the Dome
- Virus
- AJAX and PHP
- Aging with Grace
- Food books
- Green Architecture
- Life Is So Good
- SQL: The Complete Reference
- The Backyard Bird Lover's Ultimate How-to Guide
- The Garden Gurus
- Authors
- Sustainability
- -18 hours left to decide the future of Australia
- Campbells vegetable stock or Massel vegetable stock?
- Carbon Sequestration
- Carbon tax for Australia is a fraud
- Copenhagen will fail
- Cost of living in Australia
- Dick Smith jumps on the population bandwagon
- Dry Run: Preventing the Next Urban Water Crisis
- Energy Saving Lights
- Garlic
- How many people can live in Australia?
- Julia Gillard offers 9.9 billion dollars bribe to Rob Oakeshott
- Laundry detergent
- Petrol or Diesel?
- Reflective foil batts kill
- RoHS
- Sea level to rise 3mm due to climate change
- Solar power
- Spring again in Sydney
- Sustainable fuels
- The CRUD Tax is back
- The people who make building regulations do not own houses
- Water efficiency
- Which insulation is safer, foil or wool?
- Will Australia reduce greenhouse gas emissions?
- Technology
- Android or Blackberry or iPhone or a flip phone?
- Apple versus Google 2011
- Cameras
- Cars
- Colour
- Burgundy
- Colour Blindness
- Colour Names
- Dulux colours
- Pantone colours
- Safe Colours
- Seculine ProDisk Mini colour balance card
- What Causes Colour Blindness?
- Hardware
- Batteries for the Digital Age
- Cables
- Cases
- Computer reliability
- Computrace
- Disks
- Astone ISO Gear 481E
- Best SSD for your notebook computer
- Disk block size
- Hitachi disk HDS722020ALA330
- LaCie USB 2.0 250 GB mobile hard drive design by F.A. Porsche
- SMART disk
- Samsung 2 TB HD204UI quiet low power disk for mass storage
- Seagate and Samsung merge disk business
- Select the right disk for your RAID array
- USB disk speed
- Western Digital WD20EARX 2 GB SATA 3 disk
- How long should computer hardware last?
- Keyboards
- Mainframe
- Memory cards
- Monitors
- Netbooks, notebooks, tablets, and xPads
- Network Attached Storage
- OLED Displays
- PC's are a thing of the past
- Printers
- Quiet
- Samsung Galaxy S
- Speed
- Television
- Tools
- USB
- Worst computer movies
- Xserve is dead. What next?
- Your backup will not work
- iPad or Acer Aspire One?
- IQ
- Its obsolete, throw it out!
- LG Intello Washing Machine
- Lack of a challenge
- NBN spends another $12 billion of our tax money on nothing
- Networks
- 802.11n wireless networking
- D-Link DIR-655 wireless router
- D-Link DWA-160 Xtreme N dual band USB adapter
- D-Link DWA-556 Xtreme N PCI Express desktop adapter
- MIMO
- National Broadband Network
- Netgear wireless modem router DGND3300 with 300 Mbps 802.11n
- Refrigerator kills wireless broadband
- Small Wireless Network
- TP-LINK TL-SG10005D 5 port gigabit switch
- TP-Link TL-WR1043N wireless N gigabit router
- Telstra Pre-paid Mobile Wi-Fi
- Where are the router plus proxy server combinations?
- Open Source documentation
- Software
- 7-zip
- Accounting
- Asterisk
- Audacity
- Backup software
- Bloat only in Windows
- CAD
- CDex
- Disk imaging software for copying and backup
- Exact Audio Copy
- Filezilla
- Firefox
- Java
- LibreOffice or OpenOffice?
- Linux
- 1 in 5 servers will ship with Linux
- Android phones outsell iPhone
- Another Move to Linux
- CentOS 5.5 installation on SSD and RAID 5
- Debian
- Debian 5.0.5 AMD64 installation
- Fedora
- Fedora or Ubuntu?
- Gnome or KDE?
- K9copy
- Linux 2.6.38
- Linux Gnome login settings lost
- Linux Mint
- Linux RAID, a rant
- Linux Speed
- Linux Time
- Linux reliability as demonstrated by Ubuntu 10.10
- Linux reliability as demonstrated by Ubuntu 11.4
- Linux still a struggle in 2011
- Linux workstation disk RAID 1
- Linux, NT, Windows, and SETI
- Linux, three years of progress
- London Stock Exchange switches to Linux
- Mandrake Linux 9.2
- The partition is misaligned by 48128 bytes - warning from Linux RAID
- Ubuntu
- How to fix the scroll bars in Ubuntu 11.4 Gnome
- Kubuntu 10.10 alternate installation on desktop with RAID 1
- POWbuntu
- Ubuntu 10.10 after 6 months use
- Ubuntu 10.10 alternate installation
- Ubuntu 10.10 desktop RAID 1
- Ubuntu 10.10 desktop RAID 5
- Ubuntu 10.10 desktop install on a netbook
- Ubuntu 10.10 desktop installation
- Ubuntu 10.10 netbook install on a netbook
- Ubuntu 10.10 server AMD64
- Ubuntu 10.10 upgrade to version 11.4 beta 2
- Ubuntu 10.4
- Ubuntu 11.10
- Ubuntu 11.10 first upgrade
- Ubuntu 11.4 after one month use
- Ubuntu One
- Ubuntu by Microsoft?
- Ubuntu desktop upgrade 10.4 to 10.10 failed because I did not check the media
- Ubuntu strikes again
- Yes, use Linux but not that distribution!
- Nero
- OpenOffice
- OpenOffice is now Apache Office
- Project management
- Scribus
- Software for Windows and Linux
- Time
- Todo applications
- Tomboy notes
- Top text editors
- Version control
- VideoLAN VLC media player
- Visio
- Webmin
- Webmin installation on CentOS for Web development
- Webmin installation on Ubuntu
- What is the most popular open source software today?
- Windows
- Another Windows person goes Linux
- BAD_POOL_CALLER
- Cygwin
- Microsoft Malicious Software Removal Tool cannot find a common virus
- One of the developers of Windows XP is criminally insane
- There are unused icons on your desktop
- W32time
- Which Windows version?
- Windows 7 Home Premium
- Windows XP Stop 0x0000007B during installation
- Windows XP is a disaster
- Windows processes
- XML
- Zip, bzip, gzip, or 7zip?
- configFree
- Technology Succession Planning
- VoIP
- Web Sites
- Drupal
- Do Drupal themes have to use the GPL?
- Drupal 7
- A better search facility for Drupal
- Drupal - performance or flexibility
- Drupal 7 new features
- Drupal 7 ships on January 5
- Drupal 7.4 hits PeterMoulding.com
- Drupal function sequence
- The evolution of a module
- Undefined index: headers in DefaultMailSystem->mail() (line 54 of /modules/system/system.mail.inc).
- Undefined index: to in DefaultMailSystem->mail() (line 83 of /modules/system/system.mail.inc).
- implode(): Invalid arguments passed in DefaultMailSystem->format() (line 23 of /modules/system/system.mail.inc).
- Drupal Code Load Cut
- Drupal How To
- Drupal Modules
- Backup and Migrate
- Browscap
- CKEditor with Drupal WYSIWYG
- Captcha
- Colorbox
- Content Construction Kit
- Content type
- Devel module for Drupal
- Drupal Rules as an automation language
- Drupal Spam add-on module
- IMCE
- IMCE Wysiwyg bridge
- ImageAPI
- Lightbox2
- Node Gallery Access
- Node_Gallery
- Path
- Path redirect
- Pathauto
- Pet
- Search
- Service links
- Session Variable
- Taxonomy
- Token
- Transliteration
- Trigger
- Variable module
- Other modules
- Drupal Training
- Drupal access controls need a major rewrite
- Drupal coding tricks
- Drupal performance
- Drupal themes for the future
- Drupal.org colours
- Import existing data into Drupal
- Multiple Web sites made easy using Drupal multisite and the right start
- drupal_lookup_path()
- Adobe PDF
- Apache
- Apache Mahout
- Audi.com
- Bleet
- CSS Strikes Again
- CSS or xCSS
- Can you believe Facebook or email?
- Content Management Systems
- Databases
- Facebook scam
- Font
- Fonts
- HTML
- Install Apache, MySQL, and PHP 5 in Ubuntu 11.4 using the Ubuntu Software Centre
- Language Codes
- Marketing
- Memcache
- Nginx
- Oscars
- PHP
- SPDY
- Search software
- Techoni.com.au
- Theme themes
- U.S. Patent No. 6,985,875
- Virtual Private Server
- Visible Improvement
- Web 4.0
- Web browser usage
- Web browsers
- Web site development
- Bluefish
- Eclipse and PHP
- Getting a Git client, a story of ancient technology and pain
- HTTrack
- MVC
- Netbeans
- Nvu
- PHP
- PHP or ..., CakePHP/Symfony/ZF versus ...
- Programming
- Superfish
- Web browser emulators for testing your Web site
- Web development frameworks
- Web site books
- Web site development on your own computer
- Webmin or phpMyAdmin or cPanel for creating databases?
- aiki framework
- jQuery
- Views development - Learn Fields first
- Views development - Learn Actions and Rules
- jQuery .each()
- jQuery .has()
- jQuery .is()
- jQuery and Firefox Firebug
- jQuery children
- jQuery for people not using Drupal - Installation and getting started
- jQuery hover
- jQuery hover de-duplication example
- jQuery or CSS?
- jQuery performance
- jQuery tests
- Web site hosting
- Westpac Web site still broken after two years and ten months
- Wordpress wins another CMS survey
- Drupal
Drupal access controls need a major rewrite
Submitted by Peter on Thu, 2010-05-13 21:06
Drupal:
Drupal access controls are a long way ahead of typical web site access controls and are still a long way from perfect. The access controls are in need of a serious rewrite to remove the inconsistencies making life so difficult when you grow a site from simple to complex. Drupal 7 will brings some minor improvements over Drupal 6. With a little work, the future Drupal 8 could kill off all the major problems.
The ideal
You connect users to user groups. You connect resources to resource groups. You then connect user groups to resource groups. Adding a new person or resource is incredibly easy.
The reality is that most security systems try to misuse one set of groups for both users and resources. You are then stuck with the truely painful task of creating many groups and connecting either users or resources to many groups. Unix did it the wrong way. Even IBM made the mistake with their major access control system.
Take an example of a security system with the right architecture, ten user groups, and ten resource groups. To emulate that system using a single set of groups instead of the two sets of groups, you need a hundred groups to cover all combinations. Now move up to a large system with a thousand groups of users and a thousand groups of resources. The bad architecture has to use a million groups for comparable control.
Drupal 6 equivalents
Drupal groups users by role. A role is not the same as a user access group but is very close for most sites. Roles are also used for workflow and other controls. Roles work for access control when there is one organisation, one department, etc. Roles fail as access control groups when there are multiple branches and similar structural divisions requiring separate access controls but the same workflow and other role related controls.
A common Drupal resource is a node and nodes are grouped by node type. Nodes can also be grouped by taxonomy and other options. None of the common node classification and grouping controls are suitable for resource access groups. They all work for some sites where you use only simple combinations. Mixing several requirements makes life complicated and the results unpredictable.
Inconsistencies
Inconsistencies make development projects tough. Drupal has a user table separate from the node table. There are a lot of good reasons for the separate table. Unfortunately Drupal added a lot of descriptive information to the user table. What should have happened was the creation of a user node for each user and the placement of the descriptive information in the node table with the user table restricted to purely the login/logout requirement. Access to the user node could then be controlled by exactly the same access controls as the other nodes. D7 might have users moved into nodes.
The node module provides controls for creating, viewing, updating, and deleting nodes. The create, update, and delete controls also work by node type but the view control does not work by node type. You have to add another module to control viewing of nodes by node type.
The default administrator has all accesses switched on by default and does not have a defined role. Drupal 7 assigns the default administrator to a default administration role so you can assign workflow and other features to the administrator role.
There are a few other inconsistencies that make poor starting points for access control.
Fixing user groups
The user grouping for access control needs to be separate from the control of workflow. We need a user group function to bring together large groups of users. We then need separate workflow roles to assign by user group.
Separating user groups from workflow roles and other role related features is something suited to an optional core module for use on large sites. When you turn on the option, the role tables would be replicated into two sets then updated independently. A user group could have multiple roles.
Fixing resource groups
Current attributes misused as resource groups for access control include node type and taxonomy terms. There is no common system for presenting a full range of access controls or presenting controls based on their dependencies.
The Taxonomy Access Control module does one thing right. It displays some access controls with the options Allow, Deny, and Ignore. Ignore is the missing option in many of the access control modules and is the bit that lets access control modules define an access control rule as not applicable in specific circumstances.
The Ignore option could be named skip this rule or not applicable. The terminology is not important so long as it is consistent. By comparison, CSS has an equivalent but calls it none in some places, inherit in others plus uses several other terms for the same meaning.
Nodes should start with a default access of Allow, Deny, or Ignore. Every other level of control should have Allow, Deny, and Ignore. You can then add multiple layers of access control with each one being able to kill access or to grant access or to not contribute to access.
All the access control modules should then have their access control decisions displayed to the administrator.
There is a Devel module that has something to display access control decision results. That part of Devel should be a separate optional core module you can switch on when modifying access controls.
The access control modules can be given a priority through a weight but there is no consistency about the way they contribute to the decision because they all have to reply with yes or no then Drupal has to make a sometimes silly decision based on the inaccurate information. If modules had the option of not contributing to the decision, Drupal might end up with just one module supplying a yes or a no and that would simplify everything.
Take an example of an image gallery. You might use the image gallery type only for private user access. You want the image gallery node type controlled by a module giving access by user. There might be no other node types controlled by user and the access module could immediately reply with Ignore whenever the node type is not an image gallery. All the other access modules could be set to replay Ignore for nodes of type image gallery so the final decision can be based purely on the reply from one module.
Drupal 8
Drupal 8 is a long way off. Count back the huge time required to implement changes and you have a relatively small gap between Drupal 7 and Drupal 8. Changes for Drupal 8 need a really clear consistent approach defined before decisions are made on what should be included.
Often the problem is the Application Programming Interface available to module developers. Developers can create modules do provide wonderful new functions until they hit a point where there is no interface point to connect into Drupal. Drupal then needs a change to provide a socket where you can plug in your new idea. The sockets are called hooks.
If there is no hook in the right place, you need the hook added. Getting a hook added is a real problem. You have to prove a feature works to get the hook added. To prove the feature works, you have to build a working module. The module needs the hook to work. In reality you end up building the hook yourself then placing the hook in a demonstration system then fighting to make people take notice.
A great idea might not be first priority
Your improvement might be ignored many times then independently invented by several other people who need the same feature. One of the many separate inventions might then be accepted or they might all be ignored.
I contributed a lot of ideas and inventions for Drupal 4, 5 and 6. Some of those inventions are in Drupal but from different developers. I gave up promoting one memory conservation invention over a year before someone else contributed a similar improvement. I realised Drupal had a memory usage problem in one area and I invented a simple solution. I did not need it for my own sites because I kept my own sites clean and efficient. I did offer the invention to the community.
Lots of people said they wanted the feature, based on comments in forums and elsewhere, but none wanted it enough to take my idea or code and plug it in. A year later, someone felt some Web site pain enough to work on the same problem and develop the same solution. A huge improvement to one site might not translate to huge improvements for all sites. Even when my idea will make a huge improvement to your site, it might not be your first priority.
Conclusion
Remove the inconsistencies. Drupal 7 will remove some. Make the remainder a priority. Make the Ignore part of Allow, Deny, and Ignore a priority for every module that does not implement that choice. Then start work on modules to separate user groups from roles and resource groups from the many common substitutes.








