Search in sources :

Example 1 with SSOServerRealmFedInfo

use of com.sun.identity.monitoring.SSOServerRealmFedInfo in project OpenAM by OpenRock.

the class ConfigFedMonitoring method getAllRealms.

private void getAllRealms(String startRealm) {
    String classMethod = "ConfigFedMonitoring.getAllRealms: ";
    // until IDPs/SPs per realm instrum
    boolean skipSAML2Entities = true;
    StringBuffer sb = new StringBuffer(classMethod);
    sb.append("orgnames starting from ").append(startRealm).append(":\n");
    sb.append("  ").append(startRealm).append("\n");
    List rList = getRealmsList(startRealm);
    try {
        CircleOfTrustManager cotmgr = new CircleOfTrustManager();
        SAML2MetaManager saml2Mgr = new SAML2MetaManager();
        IDFFMetaManager idffmgr = new IDFFMetaManager(ssoToken);
        for (Iterator it = rList.iterator(); it.hasNext(); ) {
            String thisRealm = (String) it.next();
            Set cots = getCOTs(thisRealm, cotmgr);
            Map s2Ents = null;
            if (!skipSAML2Entities) {
                s2Ents = getSAML2Entities(thisRealm, saml2Mgr);
            }
            Map wsEnts = getWSFedEntities(thisRealm);
            Map idffentMap = getIDFFEntities(thisRealm, idffmgr);
            /*
                 *  getCOTMembers(thisRealm, cot, cotmgr, cotsb)
                 *  can get the members of the COT, but there isn't
                 *  a (MIB) entry that right now.
                 */
            Map membMap = getCOTMembers(thisRealm, cots, cotmgr);
            SSOServerRealmFedInfo srfi = new SSOServerRealmFedInfo.SSOServerRealmFedInfoBuilder(thisRealm).cots(cots).samlv2Entities(s2Ents).wsEntities(wsEnts).idffEntities(idffentMap).membEntities(membMap).build();
            Agent.federationConfig(srfi);
        }
    } catch (SAML2MetaException e) {
        debug.error(classMethod + "SAML2 ex: " + e.getMessage());
    } catch (COTException e) {
        debug.error(classMethod + "COT ex: " + e.getMessage());
    } catch (IDFFMetaException e) {
        debug.error(classMethod + "IDFF ex: " + e.getMessage());
    }
}
Also used : CircleOfTrustManager(com.sun.identity.cot.CircleOfTrustManager) Set(java.util.Set) IDFFMetaException(com.sun.identity.federation.meta.IDFFMetaException) SAML2MetaManager(com.sun.identity.saml2.meta.SAML2MetaManager) COTException(com.sun.identity.cot.COTException) IDFFMetaManager(com.sun.identity.federation.meta.IDFFMetaManager) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) List(java.util.List) SSOServerRealmFedInfo(com.sun.identity.monitoring.SSOServerRealmFedInfo) HashMap(java.util.HashMap) Map(java.util.Map) SAML2MetaException(com.sun.identity.saml2.meta.SAML2MetaException)

Aggregations

COTException (com.sun.identity.cot.COTException)1 CircleOfTrustManager (com.sun.identity.cot.CircleOfTrustManager)1 IDFFMetaException (com.sun.identity.federation.meta.IDFFMetaException)1 IDFFMetaManager (com.sun.identity.federation.meta.IDFFMetaManager)1 SSOServerRealmFedInfo (com.sun.identity.monitoring.SSOServerRealmFedInfo)1 SAML2MetaException (com.sun.identity.saml2.meta.SAML2MetaException)1 SAML2MetaManager (com.sun.identity.saml2.meta.SAML2MetaManager)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1