The EuroCMS Access Control structure

There are 2 Access Control structures availabe. 1 for Components and 1 for accounts. Logged in users and such.

The Components Access Control structure

Is for the EuroCMS components that want to access different types of components and or code codes

So, lets say for example that a disqus comment box widget, for the front end of the websites, wants to access the database. That is weird, because it uses JS and external data for the comments. So that is pretty fishy.

If that widget wants to query it database, it can only do so by using the database class, and every component is defined in such a way, that the database class, can autodetect, who is calling him.

If the query is not legit, or it has no permission to that database class, it will output a permission denied message.

If the widget has requested access to the database class, and the users installed said widget, and reviewed requested permission carefully, it will not have any problems.

But, if the widget makes a query, that it not request permission for, it will deny the access again.

Another example, if the Files module want to modify anything in the users db, that is not allowed. Unless permission have been granted to do so.

The Accounts Access Control structure

The components you have access to, are defined in roles, in the users table, your role can be editor, for example.

In the roles db table, their is a listing of components the editor role has access to.

And in the features db table, the component features you have access to.

For example, you are a user, that has the editor role, in the admin nav menu, are the components you have access to defined in the roles db table.

You click on the /users link, and then, the features db table is queried on which features you have access to. So, for example, if you have the users_add feature, you can add users. If that's all you have, that is all you'll get.

By default everything is denied.

The general flow of the EuroCMS Access Control structure is a followed:

  • Users

Check if the user exists in the specific domain

  • Roles

Users exists, and is logged in, now check the roles, then display the modules and widgets in the admin navigational menu.

  • Features

The user sees the admin dashboard, he clicks on the link. By default he only has read only view. So, no other 'button' is available to him.

So, when the /users link is clicked, it will check which features it is allowed to use in the users module. For example: add, delete modify features.

Users

The users db table structure, with only the relevant security rows displayed

user_idgroup_iddomain_idemailpwordroleip_allowMFA_methodtokenreg_dateact_datestatus
111imri@eurobytes.nlENCRYPTED_PWORDowner127.0.0.1emailSHA512{DATE}{DATE}enabled
211fyodor@dostoevsky.ruENCRYPTED_PWORDeditor127.0.0.1smsSHA512{DATE}{DATE}enabled
311franz@kafka.deENCRYPTED_PWORDeditor127.0.0.1questionsSHA512{DATE}{DATE}enabled

If the user is created, a temporary token is generated, which will be e-mailed to the users e-mail. For activation, they can add the token when they first login in.

enable: Location-based authentication

After that, they can choose to disable the second factor e-mail verification method.

Groups

The group db table structure

group_idgroup_iddomain_idnameemailshort_descriptionrolereg_dateact_datestatus
111adminsadmins@eurobytes.euThe adminsadmin{DATE}{DATE}enabled
211EdiThorseditors@eurobytes.euThe EdiThorseditor{DATE}{DATE}enabled
311themesfiles@eurobytes.euThe ThemesManthemes{DATE}{DATE}enabled

Domain Based

Also by default is the Domain based Access Control list. The Roles and permissions are set per domain name that is installed.

Role Based

db structure

role_iddomain_iduser_idgroup_idnameshort_descriptioncomponentsmodulesthemeswidgets
1111EditorThe EdiThorsmodules,widgets,themesadmin,users,editorSkeleton,W3schoolsNavMenu,NewUbuntuRelease

Feature Based

The db structure of all the features available. New features can be registered by the Modules, Themes and Widgets.

feature_iddomain_iduser_idgroup_idnameshort_descriptioncomponent_typecomponent_owner
1121users_addThe ability to add usersmoduleusers
2121users_deleteThe ability to delete usersmoduleusers
3121users_modifyThe ability to modify usersmoduleusers
4121users_mfaThe ability to add multy factor authenticaiton for usersmoduleusers
5121editor_writeThe ability to write contentmoduleEuroEditor
6121editor_deleteThe ability to delete contentmoduleEuroEditor
7121editor_modifyThe ability to modify contentmoduleEuroEditor
8121editor_publishThe ability to publish contentmoduleEuroEditor
9121themes_installThe ability to Install themesthemesSkeleton
10121themes_removeThe ability to remove themesthemesSkeleton
11121themes_modifyThe ability to modify themesthemesSkeleton

Reference