Class SAMLv2ModelImpl

    • Constructor Detail

      • SAMLv2ModelImpl

        public SAMLv2ModelImpl​(jakarta.servlet.http.HttpServletRequest req,
                               Map map)
    • Method Detail

      • getStandardIdentityProviderAttributes

        public Map getStandardIdentityProviderAttributes​(String realm,
                                                         String entityName)
                                                  throws AMConsoleException
        Returns a map with standard identity provider attributes and values.
        Specified by:
        getStandardIdentityProviderAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with standard attribute values of Identity Provider.
        Throws:
        AMConsoleException - if unable to retrieve the Identity Provider attrubutes based on the realm and entityName passed.
      • getExtendedIdentityProviderAttributes

        public Map<String,​List<String>> getExtendedIdentityProviderAttributes​(String realm,
                                                                                    String entityName)
                                                                             throws AMConsoleException
        Returns a map with extended identity provider attributes and values.
        Specified by:
        getExtendedIdentityProviderAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with extended attribute values of Identity Provider.
        Throws:
        AMConsoleException - if unable to retrieve the Identity Provider attrubutes based on the realm and entityName passed.
      • getMetaalias

        public String getMetaalias​(String realm,
                                   String entityName,
                                   String role)
                            throws AMConsoleException
        Returns the metaAlias of the entity.
        Specified by:
        getMetaalias in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        role - the Role of entity.
        Returns:
        the metaAlias of the entity.
        Throws:
        AMConsoleException - if unable to retrieve metaAlias.
      • getStandardServiceProviderAttributes

        public Map getStandardServiceProviderAttributes​(String realm,
                                                        String entityName)
                                                 throws AMConsoleException
        Returns a map with standard service provider attributes and values.
        Specified by:
        getStandardServiceProviderAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with standard attribute values of Service Provider.
        Throws:
        AMConsoleException - if unable to retrieve the Service Provider attrubutes based on the realm and entityName passed.
      • getAssertionConsumerServices

        public List getAssertionConsumerServices​(String realm,
                                                 String entityName)
                                          throws AMConsoleException
        Returns a List with Assertion Consumer Service attributes and values.
        Specified by:
        getAssertionConsumerServices in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        List with Assertion Consumer values of Service Provider.
        Throws:
        AMConsoleException - if unable to retrieve the Service Provider Assertion Consumer values based on the realm and entityName passed.
      • getExtendedServiceProviderAttributes

        public Map getExtendedServiceProviderAttributes​(String realm,
                                                        String entityName)
                                                 throws AMConsoleException
        Returns a map with extended service provider attributes and values.
        Specified by:
        getExtendedServiceProviderAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with extended attribute values of Service Provider.
        Throws:
        AMConsoleException - if unable to retrieve the Service Provider attrubutes based on the realm and entityName passed.
      • setIDPStdAttributeValues

        public void setIDPStdAttributeValues​(String realm,
                                             String entityName,
                                             Map idpStdValues)
                                      throws AMConsoleException
        Saves the standard attribute values for the Identiy Provider.
        Specified by:
        setIDPStdAttributeValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        idpStdValues - Map which contains the standard attribute values.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • setIDPExtAttributeValues

        public void setIDPExtAttributeValues​(String realm,
                                             String entityName,
                                             Map idpExtValues,
                                             String location)
                                      throws AMConsoleException
        Saves the extended attribute values for the Identiy Provider.
        Specified by:
        setIDPExtAttributeValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        idpExtValues - Map which contains the standard attribute values.
        location - has the information whether remote or hosted.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • setSPStdAttributeValues

        public void setSPStdAttributeValues​(String realm,
                                            String entityName,
                                            Map spStdValues,
                                            List assertionConsumer)
                                     throws AMConsoleException
        Saves the standard attribute values for the Service Provider.
        Specified by:
        setSPStdAttributeValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        spStdValues - Map which contains the standard attribute values.
        assertionConsumer - List with assertion consumer service values.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • setSPExtAttributeValues

        public void setSPExtAttributeValues​(String realm,
                                            String entityName,
                                            Map spExtValues,
                                            String location)
                                     throws AMConsoleException
        Saves the extended attribute values for the Service Provider.
        Specified by:
        setSPExtAttributeValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        spExtValues - Map which contains the standard attribute values.
        location - has the information whether remote or hosted.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • updateKeyinfo

        public void updateKeyinfo​(String realm,
                                  String entityName,
                                  Map<String,​Set<String>> extValues,
                                  Map<String,​Set<String>> stdValues,
                                  boolean isIDP)
                           throws AMConsoleException
        Saves the signing and encryption values for the entity.
        Specified by:
        updateKeyinfo in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        extValues - Map which contains the extended attribute values.
        stdValues - Map which contains the standard attribute values.
        isIDP - has information whether entity is an idp or sp.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • getPEPDescriptor

        public Map getPEPDescriptor​(String realm,
                                    String entityName)
                             throws AMConsoleException
        Returns a Map of PEP descriptor data.(Standard Metadata)
        Specified by:
        getPEPDescriptor in interface SAMLv2Model
        Parameters:
        realm - realm of Entity
        entityName - entity name of Entity Descriptor.
        Returns:
        key-value pair Map of PEP descriptor data.
        Throws:
        AMConsoleException - if unable to retrieve the PEP standard metadata attributes
      • getPDPDescriptor

        public Map getPDPDescriptor​(String realm,
                                    String entityName)
                             throws AMConsoleException
        Returns a Map of PDP descriptor data.(Standard Metadata)
        Specified by:
        getPDPDescriptor in interface SAMLv2Model
        Parameters:
        realm - realm of Entity
        entityName - entity name of Entity Descriptor.
        Returns:
        key-value pair Map of PDP descriptor data.
        Throws:
        AMConsoleException - if unable to retrieve the PDP standard metadata attribute
      • getPEPConfig

        public Map getPEPConfig​(String realm,
                                String entityName,
                                String location)
                         throws AMConsoleException
        Returns a Map containing the extended metadata for the PEP.
        Specified by:
        getPEPConfig in interface SAMLv2Model
        Parameters:
        realm - where entity exists.
        entityName - name of entity descriptor.
        location - if the entity is remote or hosted.
        Returns:
        key-value pair Map of PEP config data.
        Throws:
        AMConsoleException - if unable to retrieve the PEP extended metadata attribute
      • getPDPConfig

        public Map getPDPConfig​(String realm,
                                String entityName,
                                String location)
                         throws AMConsoleException
        Returns a Map of PDP Config data. (Extended Metadata)
        Specified by:
        getPDPConfig in interface SAMLv2Model
        Parameters:
        realm - realm of Entity
        entityName - entity name of Entity Descriptor
        location - location of entity(hosted or remote)
        Returns:
        key-value pair Map of PPP config data.
        Throws:
        AMConsoleException - if unable to retrieve the PDP extended metadata attribute
      • updatePDPDescriptor

        public void updatePDPDescriptor​(String realm,
                                        String entityName,
                                        Map attrValues)
                                 throws AMConsoleException
        Save standard metadata for PDP descriptor.
        Specified by:
        updatePDPDescriptor in interface SAMLv2Model
        Parameters:
        realm - realm of Entity.
        entityName - entity name of Entity Descriptor.
        attrValues - key-value pair Map of PDP standed data.
        Throws:
        AMConsoleException - if fails to modify/save the PDP standard metadata attribute
      • updatePDPConfig

        public void updatePDPConfig​(String realm,
                                    String entityName,
                                    String location,
                                    Map attrValues)
                             throws AMConsoleException
        Save extended metadata for PDP Config.
        Specified by:
        updatePDPConfig in interface SAMLv2Model
        Parameters:
        realm - realm of Entity.
        entityName - entity name of Entity Descriptor.
        location - entity is remote or hosted.
        attrValues - key-value pair Map of PDP extended config.
        Throws:
        AMConsoleException - if fails to modify/save the PDP extended metadata attribute
      • updatePEPDescriptor

        public void updatePEPDescriptor​(String realm,
                                        String entityName,
                                        Map attrValues)
                                 throws AMConsoleException
        Save the standard metadata for PEP descriptor.
        Specified by:
        updatePEPDescriptor in interface SAMLv2Model
        Parameters:
        realm - realm of Entity.
        entityName - entity name of Entity Descriptor.
        attrValues - key-value pair Map of PEP descriptor data. throws AMConsoleException if there is an error.
        Throws:
        AMConsoleException - if there is an error
      • updatePEPConfig

        public void updatePEPConfig​(String realm,
                                    String entityName,
                                    String location,
                                    Map attrValues)
                             throws AMConsoleException
        Save the extended metadata for PEP Config.
        Specified by:
        updatePEPConfig in interface SAMLv2Model
        Parameters:
        realm - realm of Entity
        entityName - entity name of Entity Descriptor.
        location - entity is remote or hosted
        attrValues - key-value pair Map of PEP extended config.
        Throws:
        AMConsoleException - if fails to modify/save the PEP extended metadata attributes
      • getStandardAttributeAuthorityAttributes

        public Map getStandardAttributeAuthorityAttributes​(String realm,
                                                           String entityName)
                                                    throws AMConsoleException
        Returns a map with standard AttributeAuthority attributes and values.
        Specified by:
        getStandardAttributeAuthorityAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with AttributeAuthority values.
        Throws:
        AMConsoleException - if unable to retrieve std AttributeAuthority values based on the realm and entityName passed.
      • getExtendedAttributeAuthorityAttributes

        public Map getExtendedAttributeAuthorityAttributes​(String realm,
                                                           String entityName)
                                                    throws AMConsoleException
        Returns a map with extended AttributeAuthority attributes and values.
        Specified by:
        getExtendedAttributeAuthorityAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with extended AttributeAuthority values.
        Throws:
        AMConsoleException - if unable to retrieve ext AttributeAuthority attributes based on the realm and entityName passed.
      • getStandardAuthnAuthorityAttributes

        public Map getStandardAuthnAuthorityAttributes​(String realm,
                                                       String entityName)
                                                throws AMConsoleException
        Returns a map with standard AuthnAuthority attributes and values.
        Specified by:
        getStandardAuthnAuthorityAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with AuthnAuthority values.
        Throws:
        AMConsoleException - if unable to retrieve std AuthnAuthority values based on the realm and entityName passed.
      • getExtendedAuthnAuthorityAttributes

        public Map getExtendedAuthnAuthorityAttributes​(String realm,
                                                       String entityName)
                                                throws AMConsoleException
        Returns a map with extended AuthnAuthority attributes and values.
        Specified by:
        getExtendedAuthnAuthorityAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with extended AuthnAuthority values.
        Throws:
        AMConsoleException - if unable to retrieve ext AuthnAuthority attributes based on the realm and entityName passed.
      • getStandardAttrQueryAttributes

        public Map getStandardAttrQueryAttributes​(String realm,
                                                  String entityName)
                                           throws AMConsoleException
        Returns a map with standard AttrQuery attributes and values.
        Specified by:
        getStandardAttrQueryAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with AttrQuery values.
        Throws:
        AMConsoleException - if unable to retrieve std AttrQuery values based on the realm and entityName passed.
      • getExtendedAttrQueryAttributes

        public Map getExtendedAttrQueryAttributes​(String realm,
                                                  String entityName)
                                           throws AMConsoleException
        Returns a map with extended AttrQuery attributes and values.
        Specified by:
        getExtendedAttrQueryAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with extended AttrQuery values.
        Throws:
        AMConsoleException - if unable to retrieve ext AttrQuery attributes based on the realm and entityName passed.
      • setStdAttributeAuthorityValues

        public void setStdAttributeAuthorityValues​(String realm,
                                                   String entityName,
                                                   Map attrAuthValues)
                                            throws AMConsoleException
        Saves the standard attribute values for Attribute Authority.
        Specified by:
        setStdAttributeAuthorityValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        attrAuthValues - Map which contains standard attribute auth values.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • setExtAttributeAuthorityValues

        public void setExtAttributeAuthorityValues​(String realm,
                                                   String entityName,
                                                   Map attrAuthExtValues,
                                                   String location)
                                            throws AMConsoleException
        Saves the extended attribute values for Attribute Authority.
        Specified by:
        setExtAttributeAuthorityValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        attrAuthExtValues - Map which contains the extended values.
        location - has the information whether remote or hosted.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • setStdAuthnAuthorityValues

        public void setStdAuthnAuthorityValues​(String realm,
                                               String entityName,
                                               Map authnAuthValues)
                                        throws AMConsoleException
        Saves the standard attribute values for Authn Authority.
        Specified by:
        setStdAuthnAuthorityValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        authnAuthValues - Map which contains standard authn authority values.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • setExtauthnAuthValues

        public void setExtauthnAuthValues​(String realm,
                                          String entityName,
                                          Map authnAuthExtValues,
                                          String location)
                                   throws AMConsoleException
        Saves the extended attribute values for Authn Authority.
        Specified by:
        setExtauthnAuthValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        authnAuthExtValues - Map which contains the extended values.
        location - has the information whether remote or hosted.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • setStdAttributeQueryValues

        public void setStdAttributeQueryValues​(String realm,
                                               String entityName,
                                               Map attrQueryValues)
                                        throws AMConsoleException
        Saves the standard attribute values for Attribute Query.
        Specified by:
        setStdAttributeQueryValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        attrQueryValues - Map which contains standard attribute query values.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • setExtAttributeQueryValues

        public void setExtAttributeQueryValues​(String realm,
                                               String entityName,
                                               Map attrQueryExtValues,
                                               String location)
                                        throws AMConsoleException
        Saves the extended attribute values for Attribute Query.
        Specified by:
        setExtAttributeQueryValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        attrQueryExtValues - Map which contains the extended values.
        location - has the information whether remote or hosted.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • getStandardAffiliationAttributes

        public Map getStandardAffiliationAttributes​(String realm,
                                                    String entityName)
                                             throws AMConsoleException
        Returns a map with standard Affiliation attributes and values.
        Specified by:
        getStandardAffiliationAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with Affiliation values.
        Throws:
        AMConsoleException - if unable to retrieve std Affiliation values based on the realm and entityName passed.
      • getExtendedAffiliationyAttributes

        public Map getExtendedAffiliationyAttributes​(String realm,
                                                     String entityName)
                                              throws AMConsoleException
        Returns a map with extended Affiliation attributes and values.
        Specified by:
        getExtendedAffiliationyAttributes in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        Returns:
        Map with extended Affiliation values.
        Throws:
        AMConsoleException - if unable to retrieve ext Affiliation attributes based on the realm and entityName passed.
      • setStdAffilationValues

        public void setStdAffilationValues​(String realm,
                                           String entityName,
                                           Map affiliationValues,
                                           Set members)
                                    throws AMConsoleException
        Saves the standard attribute values for Affilaition.
        Specified by:
        setStdAffilationValues in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        entityName - is the entity id.
        affiliationValues - Map which contains standard affiliation values.
        members - Set which contains all members.
        Throws:
        AMConsoleException - if saving of attribute value fails.
      • getallSPEntities

        public Set getallSPEntities​(String realm)
                             throws AMConsoleException
        Returns a set with all the Service Providers under the realm.
        Specified by:
        getallSPEntities in interface SAMLv2Model
        Parameters:
        realm - to which the entity belongs.
        Returns:
        Set with all service providers under the realm passed.
        Throws:
        AMConsoleException - if unable to retrieve service providers.
      • getSPEXDataMap

        public Map getSPEXDataMap()
        Returns SAMLv2 Extended Service Provider attribute values.
        Specified by:
        getSPEXDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Service Provider attribute values.
      • getIDPEXDataMap

        public Map getIDPEXDataMap()
        Returns SAMLv2 Extended Identity Provider attribute values.
        Specified by:
        getIDPEXDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Identity Provider attribute values.
      • getSPEXACDataMap

        public Map getSPEXACDataMap()
        Returns SAMLv2 Extended Service Provider attribute for Assertion Content.
        Specified by:
        getSPEXACDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Service Provider attribute for Assertion Content.
      • getSPEXAPDataMap

        public Map getSPEXAPDataMap()
        Returns SAMLv2 Extended Service Provider values for Assertion Processing.
        Specified by:
        getSPEXAPDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Service Provider values for Assertion Processing.
      • getSPEXSDataMap

        public Map getSPEXSDataMap()
        Returns SAMLv2 Extended Service Provider attribute values for Services.
        Specified by:
        getSPEXSDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Service Provider attribute values for Services.
      • getSPEXAdDataMap

        public Map getSPEXAdDataMap()
        Returns SAMLv2 Extended Service Provider attribute values for Advanced.
        Specified by:
        getSPEXAdDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Service Provider attribute values for Advanced.
      • getIDPEXACDataMap

        public Map getIDPEXACDataMap()
        Returns SAMLv2 Extended Identity Provider values for Assertion Content.
        Specified by:
        getIDPEXACDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Identity Provider values for Assertion Content.
      • getIDPEXAPDataMap

        public Map getIDPEXAPDataMap()
        Returns SAMLv2 Extended Identity Provider values for Assertion Processing.
        Specified by:
        getIDPEXAPDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Identity Provider values for Assertion Processing.
      • getIDPEXSDataMap

        public Map getIDPEXSDataMap()
        Returns SAMLv2 Extended Identity Provider attribute values for Services.
        Specified by:
        getIDPEXSDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Identity Provider attribute values for Services.
      • getIDPEXAdDataMap

        public Map getIDPEXAdDataMap()
        Returns SAMLv2 Extended Identity Provider attribute values for Advanced.
        Specified by:
        getIDPEXAdDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Identity Provider attribute values for Advanced.
      • getattrAuthEXDataMap

        public Map getattrAuthEXDataMap()
        Returns SAMLv2 Extended Attribute Authority values.
        Specified by:
        getattrAuthEXDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Attribute Authority values.
      • getauthnAuthEXDataMap

        public Map getauthnAuthEXDataMap()
        Returns SAMLv2 Extended Authn Authority values.
        Specified by:
        getauthnAuthEXDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Authn Authority values.
      • getattrQueryEXDataMap

        public Map getattrQueryEXDataMap()
        Returns SAMLv2 Extended Attribute Query values.
        Specified by:
        getattrQueryEXDataMap in interface SAMLv2Model
        Returns:
        SAMLv2 Extended Attribute Query values.
      • getXacmlPEPExtendedMetaMap

        public Map getXacmlPEPExtendedMetaMap()
        Description copied from interface: SAMLv2Model
        Returns SAMLv2 Xacml PEP ExtendedMeta
        Specified by:
        getXacmlPEPExtendedMetaMap in interface SAMLv2Model
        Returns:
        SAMLv2 Xacml PEP Extended Meta.
      • getXacmlPDPExtendedMetaMap

        public Map getXacmlPDPExtendedMetaMap()
        Description copied from interface: SAMLv2Model
        Returns SAMLv2 Xacml PDP ExtendedMeta
        Specified by:
        getXacmlPDPExtendedMetaMap in interface SAMLv2Model
        Returns:
        SAMLv2 Xacml PDP Extended Meta.