Security

Elephant Security System is used to isolate contents based on user granted permissions. The content is generated at server side based on this security system.

Basic security points

Passwords

Elephant uses a symmetric cipher with a unique key pair, to produce the ciphertext to be stored.

Before stored, the application measures the password strength and shows the result as a percentage. The rules for measuring the strength are:

isInRole method

Elephant provides isInRole convenience method to check user assigned points. The method takes as string parameter with a permission checking syntax.

The scripts also provide a facade map named rolemap. The checking syntax will be rolemap['root:permission'].

See [ Social groups, Permissions, Scripting, Actors, Concept permissions ]

Social groups

Social groups propagate into static, application-wide permissions. Users syndicated to socials groups will also be granted with the related permissions.

Elephant comes with a ready-to-use set of social groups, associated to roles with fine-grained permissions. The following table is auto-generated with the current version. The identifier is the internal form of the social group. Syndicate shows nested social groups. Roles are the set of permissions granted with the social group. Each role has a popup showing the fine-grained permissions, where no-popup would mean no-permissions. Tags is no longer used, since contacts module already provides a tag-kind-of navigating among social groups.

Inheritance

Socials groups marked with are subject to inheritance. Inheritance ensures that staff from a company or center will inherit the social group and its permissions. Inheritance is dynamic and takes into account current companies or centers.

Grups socials Identificador Sindicar Rols Etiquetes
Auxiliar comptable account_auxiliar IssueParticipant, Acceptance, DossierParticipant, FinancialsAccountingAuxiliar account_auxiliar
Auxiliar administració admin_auxiliar IssueParticipant, Acceptance, DossierParticipant, Contacts, FinancialsAdministrationAuxiliar admin_auxiliar
Administració administration FileAttachSelf, Administration, Acceptance, MyDocuments, AttachDelete, AttachSelf, PublicationModerator, FileAttachDelete, Contacts, ConvocationAdmin, Dossier, Financials, DossierRegistry, Crm administration
Alliance administration alliance_admin AllianceAdmin alliance
Alliance member alliance_member AllianceMember alliance
Administració d'adjunts attach_admin AttachAdmin, FileAttachAdmin admin
Administració de BrightSide brightside_admin attach_admin, financials_admin, dossier_admin, contacts_admin SchedulerAdmin, FinancialsAdmin, ContactAdmin, CrmAdmin, FileAttachAdmin, StudentAdmin, BrightSideAdmin, FinancialsModel, BusinessAdmin, DirectoryMember, DossierAdmin, ErpAdmin, PublicationAdmin, ConvocationAdmin, AttachAdmin, AcceptanceAdmin brightside
Clusters cluster IssueParticipant, FileAttachSelf, DossierParticipant, Cluster, AttachSelf cluster
Entitat col·laboradora collaborating_entity IssueParticipant, FileAttachSelf, DossierParticipant, MarketplaceMember, ContactsViewer, AttachSelf, CollaboratingEntity collaborating
Col·laboradors collaborator IssueParticipant, FileAttachSelf, Collaborator, AttachSelf collaborator
Col·laboradors privilegiats collaborator_privileged collaborator IssueParticipant, PrivilegedCollaborator, FileAttachSelf, AttachSelfValidate, DossierParticipant, Collaborator, Publication privileged, collaborator
Comercials comercial IssueParticipant, MyDocuments, DossierParticipant, Convocation, Publication, Comercial, CrmVendor comercial
Assistents a direcció comercial comercial_dir_assistant IssueParticipant, MyDocuments, DossierParticipant, Contacts, ComercialDirAssistant, Publication, Crm assistant
Direcció comercial comercial_direction IssueParticipant, MyDocuments, DossierParticipant, ComercialDirection, Contacts, Convocation, CrmAdmin, Publication comercial, direction
Cap d'informàtica computer_manager Administration, MyDocuments, Contacts, PublicationAdmin, ErpAdmin, Attach, Dossier, Financials, CrmAdmin, AcceptanceAdmin, FileAttach, ComputerManager computer
Consultors consultant Consultant consultant
Administració de contactes contacts_admin ConvocationAdmin, ContactAdmin admin
Administració de continguts content_admin BlogAdmin, PublicationAdmin, ContentManager content
Consellers counselor IssueParticipant, FileAttachSelf, DossierParticipant, Collaborator, Counselor, Publication, AttachSelf counselor
Clients customer IssueParticipant, FileAttachSelf, Customer, AttachSelf customer
Clients privilegiats customer_privileged customer IssueParticipant, FileAttachSelf, AttachSelfValidate, DossierParticipant, Customer, Publication, PrivilegedCustomer privileged, customer
Direcció direction FileAttachSelf, Erp, MyDocuments, Attach, AttachSelf, Direction, Contacts, Dossier, Financials, AcceptanceAdmin, FileAttach, Crm, Business direction
Assistents a direcció direction_assistant FileAttachSelf, Acceptance, MyDocuments, Contacts, Attach, Dossier, Financials, DirectionAssistant, DossierRegistry, AttachSelf, FileAttach, Crm assistant
Directori directory DirectoryMember directory
Administració de dossiers dossier_admin DossierAdmin, ConvocationAdmin admin
Personal employee IssueParticipant, Acceptance, MyDocuments, DossierParticipant, Employee, Contacts employee
Auxiliars d'esdeveniments event_assistant ConvocationValidate, EventAssistant event_assistant
Administració de financials financials_admin BusinessAdmin, ConvocationAdmin, FinancialsAdmin, FinancialsModel admin
Empresa del grup groupcompany IssueParticipant, GroupCompany, FileAttachSelf, DossierParticipant, AttachSelf groupcompany
Convidats guest Guest guest
Hub hub Hub hub
Suport hub hub-support HubSupport hub-support
Inversors investor Investor investor
Caps de personal manager employee Acceptance, MyDocuments, Employee, Contacts, ErpAdmin, Dossier, Manager manager, employee
Marketing marketing ContactsMarketing marketing
Marketplace marketplace MarketplaceMember marketplace
Operaris operator employee IssueParticipant, Operator, Acceptance, DossierParticipant, ErpOperator employee, operator
Socis partner IssueParticipant, FileAttachSelf, DossierParticipant, MarketplaceMember, ContactsViewer, AttachSelf, Partner partner
Patrons patron IssueParticipant, FileAttachSelf, DossierParticipant, Collaborator, Publication, AttachSelf, Patron patron
Suport a projectes projectsupport IssueParticipant, DossierParticipant projectsupport
Proveïdors provider IssueParticipant, FileAttachSelf, AttachSelf, Provider provider
Proveïdors privilegiats provider_privileged provider IssueParticipant, FileAttachSelf, AttachSelfValidate, DossierParticipant, Publication, PrivilegedProvider, Provider privileged, provider
Investigadors researcher Researcher reasearcher
Administrador d'estudiants student_admin StudentAdmin admin
Comissió de talent talent_committee IssueParticipant, FileAttachSelf, DossierParticipant, MarketplaceMember, ContactsViewer, AttachSelf, TalentCommittee talent
Socis tecnològics techpartner TechnologyPartner techpartner
Testimonis testimonial Testimonial testimonial
Administració de la web web_admin WebAdministrator web

Permissions

Permissions' definition is explained in Social groups . Simplifying, definition is set of permissions related to a root, for example dossier:list,new,edit,delete, whereas checking a permission would take the form dossier:new. In the definition we say the permissions related to dossier, when checking we ask whether it has one of those permissions.

Permissions can be ORed using |, for example dossier:list|@customer:on.

Permission root types

Fuzzy roles

Fuzzy roles are those discovered by the application and highly dependent on interactions.

Fuzzy role

Description

admin

The user has admin capabilities, usually related to high administration roles.

worker

The user has a current relation with a company.

professional

The user has a responsible relation with a company.

student

The user has a non-responsible relation with a center.

docent

The user has a docent relation with a center.

responsible

The user has a responsible relation with a company or center.

hhrr

The user is in Human Resources.

companyhhrr

The user is in company's Human Resources department.

centerhhrr

The user is in center's Human Resources department.

translator

The user is a language translator.

networking

The user is in the networking.

premium

The user is in the premium networking.

singleton

The user is a freelancer or a non recognized company or center.

Some examples

Check type

Syntax

Example

Permissions

entity-root:permission

dossier:list

Roles

#role:on

#DossierParticipant:on

Social groups

@socialGroupID:on

@customer:on

Fuzzy roles

@fuzzyrole:is

@worker:is

Actors

@actor:actor_name

@actor:PartnerNetwork

Suppose a sample user assigned to Privileged Customers social group. This social group grants the DossierParticipant role, which carries dossier=list,show permissions. Therefore, dossier:show will be granted.

Scripting

Scripting is used by Actors , in Concept permissions and in Visual elements . The main goal is to provide an advanced way to check permissions, roles, social groups and entity related attributes.

User functions

Methods related to currently authenticated user. The scripting context initializes the variable user.

Function

Description

user.isAdmin(), user.isWorker(), user.isStudent(), user.isHhrr(), user.isResponsible(), user.isInNetworking(), user.isInternal(), user.isCompany(), user.isCenter()

True or false indicating user different statuses.

user.getBusiness()

User preferred business. Accepts the same functions as user.

user.getProfileMap().isInRole(role)

True or false if user conform the syntaxis specified in Security .

user.isActor(actor)

True or false if user is actor.

user.isActor(entity, actor)

True or false if user is actor for the given entity.

Helping functions

Function

Description

pfunc.isUser()

True or false if there is an authenticated user.

pfunc.anyOfSyndications(user, csvSyndications)

True or false if user is assigned to any of the comma separated list of syndications. See Social groups .

pfunc.anyOfGroupings(user, csvGroupings)

True or false if user is assigned to any of the comma separated list of groupings.

Per module functions

Per module attributes address those features unique to the entities in this module. Per module attributes sum to the generic attributes.

Issue, Dossier and Category

Dossier context initializes the variables dpl and issue, dossier or category. Notice that when applying constraints that uniquely refer to a project, the dossier must be of type project.

Function

Description

dossier.isDirectOwner(user), category.isDirectOwner(user)

True or false value indicating whether the user is directly assigned as owner.

dpl.isParticipant(user), dpl.isShowAllAttachments(user), dpl.isShowParticipants(user), dpl.isShowAllIssues(user),
dpl.isReceiveAllEmails(user), dpl.isBindingVote(user), dpl.isDriver(user), dpl.isCoordinator(user), dpl.isBeneficiary(user), dpl.isOfferer(user), dpl.isResearch(user), dpl.isFunding(user), dpl.isSupport(user), dpl.isConsortium(user), dpl.isAdmin(user)

True or false indicating the dossier/category participation attribute with the same name.

dpl.isOwner(user), dpl.isSubject(user)

True or false indicating the dossier/category participation attribute with the same name.

dpl.isResporter(user), dpl.isResponsible(user), dpl.isQA(user), dpl.isAssistant(user)

True or false indicating the issue participation attribute with the same name.

Helping functions

Function

Description

dfunc.anyParticipation(Object user)

True or false if the given user participates in any dossier or category.

dfunc.anyOfCategories(dossier, csvCategories)

True or false if issue, dossier or category is in any of the comma separated list of category IDs.

dfunc.anyOfPhases(dossier, csvIndexes)

True or false if issue's dossier or dossier is in any of the comma separated list of phase indexes.

dfunc.anyOfPhaseTypes(dossier, csvTypes)

True or false if issue's dossier or dossier is in any of the comma separated list of phase types, being those CREATION, INCUBATOR, VOTES, DECISION, PROPOSALS, EXECUTION and ARCHIVE.

dfunc.anyOfRoles(dpl, user, csvRoles)

True or false if user is assigned to any of the comma separated list of roles, being those PARTICIPANT_OWNER, PARTICIPANT_ASSISTANT and PARTICIPANT_SUBJECT.

dfunc.anyOfExtRoles(dpl, user, csvRoles)

True or false if user is assigned to any of the comma separated list of roles, being those showAllAttachments, showParticipants, showAllIssues, receiveAllEmails, bindingVote, driver, coordinator, beneficiary, offerer, research, funding, support, consortium, admin.

dfunc.anyOfDiscriminators(dpl, user, csvDiscriminators)

True or false if user is assigned to any of the comma separated list of discriminators.

dfunc.anyOfRoles(user, csvRoles)

True or false if user is assigned to any of the comma separated list of roles in any dossier or category, being those PARTICIPANT_OWNER, PARTICIPANT_ASSISTANT and PARTICIPANT_SUBJECT.

dfunc.anyOfExtRoles(user, csvRoles)

True or false if user is assigned to any of the comma separated list of roles in any dossier or category, being those showAllAttachments, showParticipants, showAllIssues, receiveAllEmails, bindingVote, driver, coordinator, beneficiary, offerer, research, funding, support, consortium, admin.

Script files

It is possible to use scripting files with the directive file:file_name. Scripting files are located in /WEB-INF/elephant/scripts.

Combining directives

When using file with other directives, like debug, they must be placed in the script file.

Debugging

Scripts generate no logs with errors. Starting the script with debug: indicates the Scripting API to write any error in the log file.

Actors

Actors API is a superset specification based in Security 's Scripting . The goal of this API is allowing the creation of easy-customizable application actors.

The basics

An actor is a given user complying with a group of constraints attached to the actor's name. An example would be:

PartnerNetwork=pfunc.anyOfSyndications(user, "partner,patron,contacts_admin")

The line configures the PartnerNetwork actor. In order to check if the visiting user is a PartnerNetwork, in Visuals we'll do:

user.isActor("PartnerNetwork")

Surpassing the individual

Actors API is fully compliant with the collaboration modules. We can create specific actors for a large variety of entities. An example of an actor related to dossiers or categories:

ComissionMember=dpl.isParticipant(user)

Now we could check if the visitor is a ComissionMember with:

user.isActor(dossier, "ComissionMember")

Checking a user

The BaaS service provides a view where we can check users against all defined actors. It's also possible to perform the check using an entity.

Concept permissions

Concept permissions is a convenience set of security settings, differentiated by their name (concept). Concept permissions factory should primarily be an Elephant Entity, by means of its method getConceptPermission(name). Using an Elephant Entity as a factory ensures the correct initialization of the Scripting methods.

Permission fields

Field

Description

Required

name

Used as the concept related to this set of constraints.

allow

True when the concept is allowed. Defaults to false. Usually allow controls interactions with the concept.

show

True when the concept should be shown. Defaults to false. Usually show controls visualization of the concept.

showRole

Extension to show. Defined as normal Security roles.

actionRole

Extension to allow. Defined as normal Security roles.

showScript

Extension to show. Defined as in Scripting . It is possible to use scripting files with the directive file:file_name. Scripting files are located in /WEB-INF/elephant/scripts.

actionScript

Extension to allow. Defined as in Scripting . It is possible to use scripting files with the directive file:file_name. Scripting files are located in /WEB-INF/elephant/scripts.

showActor

Extension to show. Defined as in Actors .

actionActor

Extension to allow. Defined as in Actors .

max

Used to pass a numerical value to visual controls.

order

Useful when concepts should be shown in specific order.

permissions

A set of conceptual permissions with the same structure. Used as sub-concept permissions and scalable to any level.