Methods Summary |
---|
static void | addCredentials(javax.security.auth.Subject subject, javax.resource.spi.security.PasswordCredential cred)
AddCredentialsAction action = new AddCredentialsAction(subject, cred);
AccessController.doPrivileged(action);
|
static void | addPrincipals(javax.security.auth.Subject subject, java.security.Principal p)
AddPrincipalsAction action = new AddPrincipalsAction(subject, p);
AccessController.doPrivileged(action);
|
static void | addRoles(javax.security.auth.Subject subject, java.util.Set runAsRoles)
if( System.getSecurityManager() != null )
{
AddRolesActions.PRIVILEGED.addRoles(subject, runAsRoles);
}
else
{
AddRolesActions.NON_PRIVILEGED.addRoles(subject, runAsRoles);
}
|
private static java.security.acl.Group | addSubjectRoles(javax.security.auth.Subject theSubject, java.util.Set roles)
Set subjectGroups = theSubject.getPrincipals(Group.class);
Iterator iter = subjectGroups.iterator();
Group roleGrp = null;
while (iter.hasNext())
{
Group grp = (Group) iter.next();
String name = grp.getName();
if (name.equals("Roles"))
roleGrp = grp;
}
// Create the Roles group if it was not found
if (roleGrp == null)
{
roleGrp = new SimpleGroup("Roles");
theSubject.getPrincipals().add(roleGrp);
}
iter = roles.iterator();
while (iter.hasNext())
{
Principal role = (Principal) iter.next();
roleGrp.addMember(role);
}
return roleGrp;
|
static void | removeCredentials(javax.security.auth.Subject subject, javax.resource.spi.ManagedConnectionFactory mcf)
RemoveCredentialsAction action = new RemoveCredentialsAction(subject, mcf);
AccessController.doPrivileged(action);
|