Interface ConfigManager

All Known Implementing Classes:
OpenUnisonConfigManager, UnisonConfigManagerImpl

public interface ConfigManager
The ConfigManager is the connection into all of Unison's resources and configurations
  • Method Details

    • getErrorPages

      Map<Integer,String> getErrorPages()
      Returns the error pages
    • getConfigXmlPath

      String getConfigXmlPath()
      Returns the full path to Unison's XML configuration
      Returns:
    • getAuthMechs

      HashMap<String,MechanismType> getAuthMechs()
      Returns a map of all configured authentication mechanism configurations
      Returns:
    • getCfg

      TremoloType getCfg()
      Returns the un-marshaled XML configuration
      Returns:
    • initialize

      Initializes a Unison configuration
      Parameters:
      registryName -
      Throws:
      jakarta.xml.bind.JAXBException
      Exception
      IOException
      FileNotFoundException
      InstantiationException
      IllegalAccessException
      ClassNotFoundException
      com.novell.ldap.LDAPException
      KeyStoreException
      NoSuchAlgorithmException
      CertificateException
      ProvisioningException
    • getAuthChains

      HashMap<String,AuthChainType> getAuthChains()
      Returns a map of Authentication Chain configurations based on the name of the chain
      Returns:
    • findURL

      UrlHolder findURL(String url) throws Exception
      Finds an application configuration based on a URL
      Parameters:
      url -
      Returns:
      Throws:
      Exception
    • getResultGroup

      ResultGroupType getResultGroup(String name)
      Returns a Result Group configuration based on its name
      Parameters:
      name -
      Returns:
    • getMyVD

      MyVDConnection getMyVD()
      Return the internal MyVD connection, can be used for searches and authentication
      Returns:
    • getSecretKey

      SecretKey getSecretKey(String alias)
      Returns a secret key from Unison's key store
      Parameters:
      alias -
      Returns:
    • getApp

      ApplicationType getApp(String name)
      Returns an application configuration based on the application's name
      Parameters:
      name -
      Returns:
    • loadFilters

      void loadFilters()
      Loads all filter configurations, DO NOT CALL
    • loadAuthMechs

      void loadAuthMechs() throws jakarta.servlet.ServletException
      Loads all authentication mechanisms, DO NOT CALL
      Throws:
      jakarta.servlet.ServletException
    • getAuthMech

      AuthMechanism getAuthMech(String uri)
      Retrieves an authentication mechanism implementation based on the URI of a request
      Parameters:
      uri -
      Returns:
    • getCertificate

      X509Certificate getCertificate(String alias)
      Retrieves a certificate from Unison's internal certificate store
      Parameters:
      alias -
      Returns:
    • getProvisioningEngine

      ProvisioningEngine getProvisioningEngine()
      Retrieves the Unison provisioning subsystem
      Returns:
    • reloadConfig

      void reloadConfig() throws Exception
      Reloads all configuration items, clears all threads
      Throws:
      Exception
    • getPrivateKey

      PrivateKey getPrivateKey(String alias)
      Returns a private key from Unison's internal key store
      Parameters:
      alias -
      Returns:
    • getKeyStore

      KeyStore getKeyStore()
      Returns Unison's key store
      Returns:
    • getKeyManagerFactory

      KeyManagerFactory getKeyManagerFactory()
      Returns Unison's Key Management Factory
      Returns:
    • addThread

      void addThread(StopableThread r)
      Adds a thread to the managed list of threads. Useful for "clean up" processes
      Parameters:
      r -
    • clearThreads

      void clearThreads()
      Stop all threads and clear them from Unison
    • getGlobalHttpClientConfig

      org.apache.http.client.config.RequestConfig getGlobalHttpClientConfig()
      Returns the global htto client configuration
      Returns:
    • getHttpClientSocketRegistry

      org.apache.http.config.Registry<org.apache.http.conn.socket.ConnectionSocketFactory> getHttpClientSocketRegistry()
      Returns the protocol registry for the http client
      Returns:
    • addReloadNotifier

      void addReloadNotifier(ReloadNotification notifier)
      Provide notifications to classes when the configuration is reloaded
      Parameters:
      notifier -
    • notifyReload

      void notifyReload()
      Notify listeners that the configuration is bring reloaded
    • isForceToSSL

      boolean isForceToSSL()
      True if all connections in plain text are to be redirected to encrypted text (HTTP/S only)
      Returns:
    • getOpenPort

      int getOpenPort()
      Returns the open port this service is listening on
      Returns:
    • getSecurePort

      int getSecurePort()
      Returns the secure port this service is listening on
      Returns:
    • getExternalOpenPort

      int getExternalOpenPort()
      Returns the open port, as seen by a client. For instance if Unison is running on port 8080 but there is a firewall port forwarding from port 80 this would return 80
      Returns:
    • getExternalSecurePort

      int getExternalSecurePort()
      Returns the secure port, as seen by a client. For instance if Unison is running on port 8443 but there is a firewall port forwarding from port 443 this would return 443
      Returns:
    • createAnonUser

      void createAnonUser(jakarta.servlet.http.HttpSession sharedSession)
      Resets the session's state to an anonymous user
      Parameters:
      sharedSession -
    • getAuthPath

      String getAuthPath()
      Returns the path to Unison's "auth" directory. If Unison is embedded this directory can be at different levels
      Returns:
    • getAuthFormsPath

      String getAuthFormsPath()
      Returns where Unison stores JSP pages for authentication (typically /auth/forms). If Unison is embedded this path may change.
      Returns:
    • getAuthIdPPath

      String getAuthIdPPath()
      Returns the path where Unison identity providers are configured. Typicaly /auth/idp however this may change if Unison is embedded.
      Returns:
    • getPaasUserPrinicipalAttribute

      String getPaasUserPrinicipalAttribute()
      When Unison is embedded, returns the name of the user attribute that will act as the user identifier.
      Returns:
    • setPaasUserPrinicipalAttribute

      void setPaasUserPrinicipalAttribute(String paasUserPrinicipalAttribute)
      When Unison is embedded, sets the name of the user attribute that will act as the user identifier.
    • getPaasRoleAttribute

      String getPaasRoleAttribute()
      When Unison is embedded, returns the name of the user attribute that will act as the roles identifier.
      Returns:
    • setPaasRoleAttribute

      void setPaasRoleAttribute(String paasRoleAttribute)
      When Unison is embedded, sets the name of the user attribute that will act as the roles identifier.
    • getContextPath

      String getContextPath()
      Returns the context path for Unison
      Returns:
    • getContext

      jakarta.servlet.ServletContext getContext()
      Returns Unison's servlet context
      Returns:
    • getAuthManager

      AuthManager getAuthManager()
    • getCustomAuthorizations

      Map<String,CustomAuthorization> getCustomAuthorizations()
      Returns a map of custom authorization implementations and names
      Returns:
    • getUpgradeManager

      HttpUpgradeRequestManager getUpgradeManager()
      Returns an implementation of the upgrade manager
      Returns:
    • getSSLContext

      SSLContext getSSLContext()
      Returns the SSLContext
      Returns:
    • buildHttpConfig

    • addResultGroup

      void addResultGroup(ResultGroupType rgt)
    • removeResultGroup

      void removeResultGroup(ResultGroupType rgtToRemove)
    • addCustomerAuthorization

      void addCustomerAuthorization(CustomAzRuleType azrt)
    • removeCustomAuthorization

      void removeCustomAuthorization(String azName)
    • getAuthFailMechanism

      MechanismType getAuthFailMechanism()
    • addAuthenticationMechanism

      void addAuthenticationMechanism(MechanismType mt)
    • removeAuthenticationMechanism

      void removeAuthenticationMechanism(String name)
    • getAuthFailChain

      AuthChainType getAuthFailChain()
    • addApplication

      List<UrlHolder> addApplication(ApplicationType app) throws Exception
      Throws:
      Exception
    • initializeUrls

      void initializeUrls(List<UrlHolder> holders) throws Exception
      Throws:
      Exception
    • deleteApp

      void deleteApp(String name)
    • getNotificationsMananager

      NotificationsManager getNotificationsMananager()