Security
Authentication is mandatory and authenticated users have access to all systems and drivers within. They can’t edit or see settings, can’t list systems or change anything however they can, by default, access all functions defined in drivers if they know the system id. This is via the websocket API, most restful API’s are out of bounds to a regular user.
A global callback can be defined to check if a user should be able to access a system:
In a Rails initialiser:
All drivers have a helper method for accessing the user details so you can manually manage permissions:
You can also protect methods using protect_method
. The last protect_method
call for any function is the one that will be used.
you can also check if a user has access to a method
NOTE:: the current user is maintained across asynchronous function calls and timers.
i.e. Browser (user: Bob) -> LogicModule.do_something_weird -> Display.reset_to_factory_new
If Bob is a regular user and the reset_to_factory_new
function is protected then reset_to_factory_new
will not be executed.
Finally all system access is logged and saved for a few months to make it fairly easy to track down bad actors within an organisation.
Encrypted Settings
Passwords often need to be stored in the database for accessing secure devices. To have a setting stored securely, you enter the key with a $
sign prefix.
once saved, the setting is encrypted with 256 bit AES using GCM ciphers to prevent tampering
You can review the code here: https://github.com/acaprojects/ruby-engine/blob/master/lib/orchestrator/encryption.rb
Last updated