Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Introduction

midPoint is using a (very) extended version of Role-Based Access Control (RBAC) mechanism. RBAC is originally defined as mostly static structure of users and roles. The original RBAC defines that user assigned to the role gets all the rights implied by the role. If two users have the same role, they have the same rights. However, this leads to the problem of Role Explosion. We hope to solve that problem by enhancing RBAC model with logic. We add ability to specify expressions in role definitions that determine how and when the role is used. Therefore the role can adapt to the attributes of user that has the role or even the role assignment itself can be parametrized. This allows to construct RBAC structures that are using fewer roles and that are much more manageable.

Roles

Roles define similar set of access rights. Roles are assigned to users; a user having a role gets the rights defined by the role. We do not place any constraints on the number of roles assigned to the user or the number of access rights (accounts) defined by the role. All the associations can be thought of as many-to-many. Basic role structure is illustrated in a following diagram.


Figure: User-Role-Resource

The diagram illustrates the basic mechanism of roles. Users are assigned to the roles using a mechanism called assignment (see below). Roles define access rights on a specific set of resources. The figure illustrates a situation that can be described as:

Captain Jack Sparrow (User) is a captain (Role). Because he is a captain (Role), he should have account in Maritime Information System (Resource) and Rum Supply Management system (Resource). Captain Jack Sparrow (User) is also a pirate (Role). Because of this he should have account in Rum Supply Management system (Resource) and Shipwreck Cove (Resource).

The (simplified) role definitions in XML is as follows:

<role oid="9991">
    <name>Captain</name>
    <accountConstruction>
        <resourceRef oid="8882" type="c:ResourceType"/>
    </accountConstruction>
    <accountConstruction>
        <resourceRef oid="8881" type="c:ResourceType"/>
    </accountConstruction>
</role>

<role oid="9992">
    <name>Pirate</name>
    <accountConstruction>
        <resourceRef oid="8881" type="c:ResourceType"/>
    </accountConstruction>
    <accountConstruction>
        <resourceRef oid="8883" type="c:ResourceType"/>
    </accountConstruction>
</role>

Implied Accounts

If the captain and pirate roles get assigned to Jack, the result should be that Jack has three accounts: Maritime Information System account, Rum Supply Management account and Shipwreck Cove account. Roles imply or construct these accounts. A user assigned to a role will get accounts on all resources that the role implies (unless he already has such accounts).

The implied accounts are defined by the Account Construction XML structure. It basically defines the resource in which the account has to be created, account type, attribute values and an optional condition.

If two or more roles imply accounts in the same resource, usually only one account will be created. The specific behavior depends on account types (still work in progress).

Implied Account Attributes

The role can also imply specific attributes for the account, e.g. a specific text in the account description field. Attribute values implied by the roles may be fixed (static), but that is usually not sufficient to avoid a role explosion problem. More frequently the implied attributes are derived from other values, e.g. fields of the User object. The principle is illustrated in the following diagram.


Figure: Implied account attributes

The example illustrates following case:

Captain Jack Sparrow (User) is a captain (Role). Because he is a captain (Role), he should have account in Rum Supply Management system (Resource). The account should guarantee all captains a really BIG mug of rum. The mugs of all captains should come with owner's name on it, so no scurvy seadog would dare to touch that mug.

Mappings and expressions are used to define dynamic implied account attributes. Simple paths are perhaps the most easy to use and most useful in common situations. There are also scripting expressions for more complex cases. The default expression language is Groovy, chosen for its similarity to Java. However, the expression model is extensible, there are several supported languages and even more expression languages may be added in the future.

The XML role definition illustrated by this example is as follows:

<role oid="9991">
    <name>Captain</name>
    <accountConstruction>
        <resourceRef oid="8881" type="c:ResourceType"/>
        <attribute>
            <ref>rum:mugSize</ref>
            <outbound>
                <expression>
                    <value>BIG</value>
                </expression>
            </outbound>
        </attribute>
        <attribute>
            <ref>rum:mugName</ref>
            <outbound>
                <source>
                    <path>$user/givenName</path>
                </source>
            <outbound>
        </attribute>
    </accountConstruction>
</role>

Mapping

Roles are using the same kind of outbound mapping that are used in assignments and resource schema handling section. Please see the Mappings and Expressions page for explanation of basic principles of mapping mechanism.

Implied account attributes usually do not define the entire set of account attributes. There may be other roles that may assign different attributes to the same account, more values to the same attributes of the account and even conflicting values. The account may also have existing attributes that are managed by "native" tools (outside IDM) or there may be exceptions from the RBAC policy specified for that account using attribute specification in assignments.

TODO: Point to advanced explanation and examples

Implied Account Entitlements

But perhaps the most useful feature of roles is that a role can imply entitlements of account on the resource. E.g. the role can imply that the account of a user having such role will be entitled for (assigned to) the group managers on a specific LDAP server. We are using the concept of implied entitlements, illustrated in following diagram.


Figure: Implied account entitlements

The example illustrates following case:

Captain Jack Sparrow (User) is a captain (Role). Because he is a captain (Role), he should have account in Maritime Information System (Resource) and that account has to be assigned to the captains groups.

The XML role definition is as follows:

<m:role oid="9991">
    <c:name>Captain</c:name>
    <m:impliedAccount>
        <m:resourceRef oid="8882" type="ResourceType"/>
        <m:entitlement objectClass="mis:GroupObjectClass">
            <value>
                <mis:id>captains</mis:id>
            </value>
        </m:entitlement>
    </m:impliedAccount>
</m:role>

Assignments

Assignment is a generic concept of associating user with the things that he should have or belong to. Assignment may associate user with a role, organizational unit or any other kind of object. However, roles and organizational units are the most common object types that are assigned to a user.

See Assignment page for more details.

  • No labels