/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: IdRemoteServicesImpl.java,v 1.23 2010/01/06 01:58:26 veiming Exp $
*
* Portions Copyrighted 2013-2015 ForgeRock AS.
*/
/*
* Class that implements the remote services that are needed for IdRepo.
*/
// TODO: Use a different JAX-RPC interface
private static boolean sendRestrictionContext;
protected IdRemoteServicesImpl() {
/*
* Here we set sendRestrictionContext by checking a property
* in agent configuration file and also if the server is
* sending back the right version string indicating that it
* supports cookie hijacking.
*/
if (DEBUG.messageEnabled()) {
" = " +sendRestrictionContext);
}
}
if (sendRestrictionContext) {
try {
}
} catch (NumberFormatException e) {
} catch (SSOException e) {
} catch (SMSException e) {
}
}
if (DEBUG.messageEnabled()) {
"IdRemoteServicesImpl.<init>: sendRestrictionContext = " +
}
// Initialize JAX-RPC SOAP client
}
+ "Creating new Instance of IdRemoteServicesImpl()");
instance = new IdRemoteServicesImpl();
}
return instance;
}
throws SSOException, IdRepoException {
if (exception instanceof SSOException) {
throw (SSOException) exception;
} else if (exception instanceof IdRepoException) {
throw (IdRepoException) exception;
} else {
if (DEBUG.errorEnabled()) {
"IdRemoteServicesImpl.processException(): " +
}
}
}
/**
* Returns <code>true</code> if the data store has successfully
* authenticated the identity with the provided credentials. In case the
* data store requires additional credentials, the list would be returned
* via the <code>IdRepoException</code> exception.
*
* @param orgName
* realm name to which the identity would be authenticated
* @param credentials
* Array of callback objects containing information such as
* username and password.
*
* @return <code>true</code> if data store authenticates the identity;
* else <code>false</code>
*/
if (DEBUG.messageEnabled()) {
+ " Not supported for remote clients");
}
// Not supported for remote
return false;
}
{
try {
"create_idrepo", objs),
}
}
try {
}
}
public Map getAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN,
if (isString) {
try {
}
}
}
return res;
} else {
}
}
private Map<String, byte[][]> getBinaryAttributes(SSOToken token, IdType type, String name, Set<String> attrNames,
try {
if (encodedAttributes != null) {
int counter = 0;
}
}
}
}
return ret;
}
try {
"getAttributes2_idrepo", objs),
}
}
}
return res;
}
throws IdRepoException, SSOException {
try {
}
}
throws IdRepoException, SSOException {
int filterOp;
} else {
}
try {
}
}
try {
}
}
try {
}
}
try {
amsdkDN };
}
}
throws IdRepoException, SSOException {
try {
"getAssignedServices_idrepo", objs),
}
return resultSet;
}
throws IdRepoException, SSOException {
try {
if (DEBUG.messageEnabled()) {
+ "; amOrgName=" + amOrgName
+ "; amsdkDN=" + amsdkDN);
}
"getServiceAttributes_idrepo", objs),
}
return resultMap;
}
try {
if (DEBUG.messageEnabled()) {
+ "; amOrgName=" + amOrgName
+ "; amsdkDN=" + amsdkDN);
}
"getBinaryServiceAttributes_idrepo", objs),
} catch (RemoteException rex) {
"IdRemoteServicesImpl.getBinaryServiceAttributes_idrepo: " +
"caught exception=", rex);
}
return resultMap;
}
/**
* Non-javadoc, non-public methods
* Get the service attributes of the name identity. Traverse to the global
* configuration if necessary until all attributes are found or reached
* the global area whichever occurs first.
*
* @param token is the sso token of the person performing this operation.
* @param type is the identity type of the name parameter.
* @param name is the identity we are interested in.
* @param serviceName is the service we are interested in
* @param attrNames are the name of the attributes wer are interested in.
* @param amOrgName is the orgname.
* @param amsdkDN is the amsdkDN.
* @throws IdRepoException if there are repository related error conditions.
* @throws SSOException if user's single sign on token is invalid.
*/
try {
if (DEBUG.messageEnabled()) {
+ "getServiceAttributesAscending type=" + type
}
"getServiceAttributesAscending_idrepo", objs),
}
return resultMap;
}
throws IdRepoException, SSOException {
try {
}
}
try {
if (DEBUG.messageEnabled()) {
"; amsdkDN=" + amsdkDN);
}
amsdkDN };
}
}
throws IdRepoException, SSOException {
try {
"getMembers_idrepo", objs),
}
}
}
return idResults;
}
throws IdRepoException, SSOException {
try {
"getMemberships_idrepo", objs),
}
}
}
return idResults;
}
throws IdRepoException, SSOException {
try {
}
}
try {
amOrgName };
"getSupportedOperations_idrepo", objs),
}
}
}
return results;
}
throws IdRepoException, SSOException {
try {
"getSupportedTypes_idrepo", objs),
}
}
}
return results;
}
{
try {
isExists =
null));
}
return isExists.booleanValue();
}
try {
"isActive_idrepo", objs),
}
return isActive.booleanValue();
}
try {
}
}
int type) {
// Nothing to do!
}
public void clearIdRepoPlugins() {
// Nothing to do!
}
public void reloadIdRepoServiceSchema() {
// Do Nothing !!
}
public void reinitialize() {
// Do Nothing !!
}
try {
"getFullyQualifiedNames_idrepo", objs),
// Convert to CaseInsensitiveHashSet
}
if (DEBUG.warningEnabled()) {
"IdRemoteServicesImpl.getFullyQualifiedNames_idrepo: " +
"caught exception=", ex);
}
if (ex instanceof IdRepoException) {
throw ((IdRepoException) ex);
}
}
return (answer);
}
if (m != null) {
new CaseInsensitiveHashMap();
}
}
}
}
}
return results;
}
if (!sendRestrictionContext) {
}
}
) throws IdRepoException, SSOException {
try {
"getSpecialIdentities_idrepo", objs),
}
}
}