Check if this class is the master handle
- Precondition:
- Master handle must be registered
- Postcondition:
- None
- Todo:
- Make it.
-
popCurrentRole()
- Pop the topmost role from the current role stack.
-
pushCurrentRole(Role)
- Push new role as the topmost role on the current role stack.
-
wakeup()
- Wakeup a frozen access control handle.
AccessControlHandle
public AccessControlHandle(AccessControlHandle ach) throws AccessHandleException
- Construct a slave AccessControlHandle.
An access control handle is constructed for an class/user
or a module/random user pair,
storing the set of active roles.
- Precondition:
- Can only be meaningfully called by
AccessMan.registerSignedApplication() or
AccessMan.registerSignedModule().
All three parameters should
be non-null.
- Postcondition:
- The object returned cannot be forged except if copying the returned
object, even by calling this constructor again. This is important,
because access control handles must authenticate applications.
- Todo:
- (nothing)
- Parameters:
- ach - Master acces control handle fot the subject..
- Returns:
- access control handle
- See Also:
- ClassProfile, UserProfile, Role, registerSignedApplication, registerSignedModule
getClassProfile
public final ClassProfile getClassProfile()
- Get class profile.
getUserProfile
public final UserProfile getUserProfile()
- Get user profile.
getActiveRoles
public final Hashtable getActiveRoles()
- Get active roles.
- Todo:
- Guard access to active_role using access control...?
getInfo
public final String getInfo()
- Return a short string uniquely identifying this access control handle.
Useful for logging.
finish
public void finish()
- Finish with an access control handle.
This method destroys all internal references to the access control handle,
so that it can be garbage collected. Also all reference made by this
handle to role and capability instance are removed as well. This method
should be called just before an application exits.
- Precondition:
- Access manager must have been initialised.
- Postcondition:
- (none)
- Todo:
- (nothing)
isCertified
public final boolean isCertified()
- Check whether the class corresponding to the access control
handle is certified.
- Precondition:
- Access manager must have been initialised.
- Postcondition:
- (none)
- Todo:
- (nothing)
- Returns:
- true if the class profile corresponds to a certified
class, false if the class should not be trusted.
addRole
public void addRole(Role r)
- Add a role to an access control handle.
This method add a new role to the access control handle.
- Precondition:
- Access manager must have been initialised.
- The persistent role must have been recalled from archive OR
- The role must exits as a template.
- Postcondition:
- A new role is included in the handle
- Todo:
- (nothing)
- Parameters:
- r - Persistent/Template Role
getRole
public Role getRole(String role_name)
- Get a role in an access control handle giving its name
- Precondition:
- None
- Postcondition:
- None
- Todo:
- (nothing)
- Parameters:
- role_name - The name of the role to get.
getRoleNames
public Vector getRoleNames()
- Gives the names of all roles in an access control handle.
- Precondition:
- None
- Postcondition:
- None
- Todo:
- (nothing)
- Returns:
- a vector containing the name of all roles in the handle.
freeze
public boolean freeze()
- Freeze an access control handle.
All operation on the handle are disabled or returns
false until the handle is made available again using "continue".
- Precondition:
- None
- Postcondition:
- None
- Todo:
- Make it.
- Returns:
- True if freeze succeeds or already frozen, false otherwise.
- See Also:
- wakeup, isFrozen
wakeup
public boolean wakeup()
- Wakeup a frozen access control handle.
Will reverse the effect of a freeze
- Precondition:
- None
- Postcondition:
- None
- Todo:
- Make it.
- Returns:
- True if wakeup succeeds or not frozen, false otherwise.
- See Also:
- freeze, isFrozen
isFrozen
public boolean isFrozen()
- Check if a handle is frozen
Returns true if handle is frozen.
- Precondition:
- None
- Postcondition:
- None
- Todo:
- Make it.
- Returns:
- True if handle is frozen, false otherwise.
- See Also:
- freeze, wakeup
popCurrentRole
public static Role popCurrentRole() throws RoleException
- Pop the topmost role from the current role stack.
- Precondition:
- Access manager must have been initialised.
- Postcondition:
- The next role on the stack is the new current role
- Todo:
- Nothing
- Returns:
- The current role before the call
- Throws: RoleException
- if the current stack is empty
pushCurrentRole
public static void pushCurrentRole(Role r)
- Push new role as the topmost role on the current role stack.
- Precondition:
- Access manager must have been initialised.
- Postcondition:
- Unchanged, leaves current role stack intact
- Todo:
- Nothing
getLoginRole
public Role getLoginRole()
- Returns the LoginRole for the master handle
- Precondition:
- None
- Postcondition:
- None
- Todo:
- Nothing
getClassRole
public Role getClassRole()
- Returns the ClassRole for the master handle
- Precondition:
- None
- Postcondition:
- None
- Todo:
- Nothing
getLoginClassRole
public Role getLoginClassRole()
- Returns the LoginClassRole for the master handle
- Precondition:
- None
- Postcondition:
- None
- Todo:
- Nothing
isMaster
public boolean isMaster()
- Check if this class is the master handle
- Precondition:
- Master handle must be registered
- Postcondition:
- None
- Todo:
- Make it.
- Returns:
- True if this handle is master, false if not.
hasRight
public final boolean hasRight(String capa_name)
- Verify whether a capability is in the handle and valid.
Check whether the capability belongs to any enabled role, and if so,
perform additional checks for the particular type of capabilty. If these
checks fails, hasRight() returns false, otherwise it
returns true. If the capability belongs to one or more disabled
user roles, the
user is first prompted to enable one of the roles the capability belongs
to. If the user does not enable any of these roles,
hasRight() returns false.
If the capability does not belong to any roles in the handle, it is not valid.
- Parameters:
- capa_name - name of capability to verify
- Returns:
- true if the capability is valid, false if not.
- See Also:
- Capability, Role
All Packages Class Hierarchy This Package Previous Next Index