/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 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: ImportBulkFederationData.java,v 1.6 2009/10/29 00:03:50 exu Exp $
*
*/
/**
* Import Bulk Federation Data.
* The input file is generated by <code>BulkFederation</code> class.
*/
boolean isIDP;
/**
* Imports bulk federation data.
*
* @param rc Request Context.
* @throws CLIException if unable to process this request.
*/
throws CLIException {
super.handleRequest(rc);
ldapLogin();
"ATTEMPT_IMPORT_BULK_FED_DATA", params);
try {
"SUCCEEDED_IMPORT_BULK_FED_DATA", params);
"SUCCEEDED_IMPORT_BULK_FED_DATA", params);
} else {
throw new CLIException(
getResourceString("unsupported-specification"),
}
} catch (CLIException e) {
"FAILED_IMPORT_BULK_FED_DATA", args);
throw e;
}
}
private void idffGetRoleAndEntityId()
throws CLIException {
try {
"import-bulk-federation-data-unknown-metaalias"),
}
} catch (IDFFMetaException e) {
debugError("ImportBulkFederationData.idffGetRoleAndEntityId", e);
"import-bulk-federation-data-unknown-metaalias"),
}
}
private void saml2GetRoleAndEntityId()
throws CLIException {
try {
"import-bulk-federation-data-unknown-metaalias"),
}
} catch (SAML2MetaException e) {
debugError("ImportBulkFederationData.idffGetRoleAndEntityId", e);
"import-bulk-federation-data-unknown-metaalias"),
}
}
throws CLIException {
}
"import-bulk-federation-data-succeeded"));
}
throws CLIException {
}
"import-bulk-federation-data-succeeded"));
}
throws CLIException {
try {
//expecting uId|nameId format
if (len > 0) {
"import-bulk-federation-data-incorrect-data-format"),
}
}
}
} catch (IOException e) {
throw new CLIException(e.getMessage(),
} finally {
try {
} catch (IOException ex) {
//ignored
}
}
}
}
throws CLIException {
) {
throw new CLIException(getResourceString(
"import-bulk-federation-data-incorrect-file-format"),
}
}
/*
* The remote entity id from the input file should match the
* entity id of this metaalias.
*/
throws CLIException {
) {
throw new CLIException(getResourceString(
"import-bulk-federation-data-incorrect-file-format"),
}
"import-bulk-federation-data-incorrect-entity-id"), param),
}
}
/*
* The role from the input file should NOT match the role of this metaalias.
* i.e. from the file contains IDP, then this metaalias should have SP role.
*/
throws CLIException {
) {
throw new CLIException(getResourceString(
"import-bulk-federation-data-incorrect-file-format"),
}
throw new CLIException(getResourceString(
"import-bulk-federation-data-incorrect-role"),
}
}
/*
* The specification from the input file should match the entered
* specification. either idff or saml2
*/
throws CLIException {
) {
throw new CLIException(getResourceString(
"import-bulk-federation-data-incorrect-file-format"),
}
throw new CLIException(getResourceString(
"import-bulk-federation-data-incorrect-spec"),
}
}
throws CLIException {
try {
if (isIDP) {
IFSConstants.LOCAL_NAME_IDENTIFIER, false);
} else {
IFSConstants.REMOTE_NAME_IDENTIFIER, false);
}
}
}
} catch (FSAccountMgmtException e) {
debugError("ImportBulkFederationData.idffFederateUser", e);
getResourceString("import-bulk-federation-data-cannot-federate"),
} catch (SAMLException e) {
debugError("ImportBulkFederationData.idffFederateUser", e);
getResourceString("bulk-federation-cannot-federate"),
} catch (IdRepoException e) {
debugError("ImportBulkFederationData.idffFederateUser", e);
} catch (SSOException e) {
debugError("ImportBulkFederationData.idffFederateUser", e);
}
}
throws CLIException {
try {
"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent");
if (isIDP) {
} else {
}
}
}
} catch (SAML2Exception e) {
debugError("ImportBulkFederationData.idffFederateUser", e);
getResourceString("import-bulk-federation-data-cannot-federate"),
} catch (IdRepoException e) {
debugError("ImportBulkFederationData.idffFederateUser", e);
} catch (SSOException e) {
debugError("ImportBulkFederationData.idffFederateUser", e);
}
}
}