9885125 Add support for managedBy to tokens

7 files Authored by npmccallum 8 years ago, Committed by mkosek 8 years ago,
    Add support for managedBy to tokens
    
    This also constitutes a rethinking of the token ACIs after the introduction
    of SELFDN support.
    
    Admins, as before, have full access to all token permissions.
    
    Normal users have read/search/compare access to all of the non-secret data
    for tokens assigned to them, whether managed by them or not. Users can add
    tokens if, and only if, they will also manage this token.
    
    Managers can also read/search/compare tokens they manage. Additionally,
    they can write non-secret data to their managed tokens and delete them.
    
    When a normal user self-creates a token (the default behavior), then
    managedBy is automatically set. When an admin creates a token for another
    user (or no owner is assigned at all), then managed by is not set. In this
    second case, the token is effectively read-only for the assigned owner.
    
    This behavior enables two important other behaviors. First, an admin can
    create a hardware token and assign it to the user as a read-only token.
    Second, when the user is deleted, only his self-managed tokens are deleted.
    All other (read-only) tokens are instead orphaned. This permits the same
    token object to be reasigned to another user without loss of any counter
    data.
    
    https://fedorahosted.org/freeipa/ticket/4228
    https://fedorahosted.org/freeipa/ticket/4259
    
    Reviewed-By: Jan Cholasta <jcholast@redhat.com>
    
        
file modified
+30 -4
file modified
+2 -2
file modified
+1 -1
file modified
+11 -5
file modified
+31 -7
file modified
+7 -2