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 Summary
Modifier and TypeMethodDescriptionvoid
void
void
addReloadNotifier
(ReloadNotification notifier) Provide notifications to classes when the configuration is reloadedvoid
void
Adds a thread to the managed list of threads.void
void
Stop all threads and clear them from Unisonvoid
createAnonUser
(jakarta.servlet.http.HttpSession sharedSession) Resets the session's state to an anonymous uservoid
Finds an application configuration based on a URLReturns an application configuration based on the application's nameReturns a map of Authentication Chain configurations based on the name of the chainReturns where Unison stores JSP pages for authentication (typically /auth/forms).Returns the path where Unison identity providers are configured.getAuthMech
(String uri) Retrieves an authentication mechanism implementation based on the URI of a requestReturns a map of all configured authentication mechanism configurationsReturns the path to Unison's "auth" directory.getCertificate
(String alias) Retrieves a certificate from Unison's internal certificate storegetCfg()
Returns the un-marshaled XML configurationReturns the full path to Unison's XML configurationjakarta.servlet.ServletContext
Returns Unison's servlet contextReturns the context path for UnisonReturns a map of custom authorization implementations and namesReturns the error pagesint
Returns the open port, as seen by a client.int
Returns the secure port, as seen by a client.org.apache.http.client.config.RequestConfig
Returns the global htto client configurationorg.apache.http.config.Registry
<org.apache.http.conn.socket.ConnectionSocketFactory> Returns the protocol registry for the http clientReturns Unison's Key Management FactoryReturns Unison's key storegetMyVD()
Return the internal MyVD connection, can be used for searches and authenticationint
Returns the open port this service is listening onWhen Unison is embedded, returns the name of the user attribute that will act as the roles identifier.When Unison is embedded, returns the name of the user attribute that will act as the user identifier.getPrivateKey
(String alias) Returns a private key from Unison's internal key storeRetrieves the Unison provisioning subsystemgetResultGroup
(String name) Returns a Result Group configuration based on its namegetSecretKey
(String alias) Returns a secret key from Unison's key storeint
Returns the secure port this service is listening onReturns the SSLContextReturns an implementation of the upgrade managervoid
initialize
(String registryName) Initializes a Unison configurationvoid
initializeUrls
(List<UrlHolder> holders) boolean
True if all connections in plain text are to be redirected to encrypted text (HTTP/S only)void
Loads all authentication mechanisms, DO NOT CALLvoid
Loads all filter configurations, DO NOT CALLvoid
Notify listeners that the configuration is bring reloadedvoid
Reloads all configuration items, clears all threadsvoid
void
removeCustomAuthorization
(String azName) void
removeResultGroup
(ResultGroupType rgtToRemove) void
setPaasRoleAttribute
(String paasRoleAttribute) When Unison is embedded, sets the name of the user attribute that will act as the roles identifier.void
setPaasUserPrinicipalAttribute
(String paasUserPrinicipalAttribute) When Unison is embedded, sets the name of the user attribute that will act as the user identifier.
-
Method Details
-
getErrorPages
-
getConfigXmlPath
-
getAuthMechs
HashMap<String,MechanismType> getAuthMechs()Returns a map of all configured authentication mechanism configurations- Returns:
-
getCfg
-
initialize
void initialize(String registryName) throws jakarta.xml.bind.JAXBException, Exception, IOException, FileNotFoundException, InstantiationException, IllegalAccessException, ClassNotFoundException, com.novell.ldap.LDAPException, KeyStoreException, NoSuchAlgorithmException, CertificateException, ProvisioningException 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
-
getResultGroup
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
-
getApp
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.ServletExceptionLoads all authentication mechanisms, DO NOT CALL- Throws:
jakarta.servlet.ServletException
-
getAuthMech
Retrieves an authentication mechanism implementation based on the URI of a request- Parameters:
uri
-- Returns:
-
getCertificate
Retrieves a certificate from Unison's internal certificate store- Parameters:
alias
-- Returns:
-
getProvisioningEngine
-
reloadConfig
-
getPrivateKey
Returns a private key from Unison's internal key store- Parameters:
alias
-- Returns:
-
getKeyStore
-
getKeyManagerFactory
-
addThread
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
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
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
When Unison is embedded, sets the name of the user attribute that will act as the roles identifier. -
getContextPath
-
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
-
buildHttpConfig
void buildHttpConfig() throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException -
addResultGroup
-
removeResultGroup
-
addCustomerAuthorization
-
removeCustomAuthorization
-
getAuthFailMechanism
MechanismType getAuthFailMechanism() -
addAuthenticationMechanism
-
removeAuthenticationMechanism
-
getAuthFailChain
AuthChainType getAuthFailChain() -
addApplication
- Throws:
Exception
-
initializeUrls
-
deleteApp
-
getNotificationsMananager
NotificationsManager getNotificationsMananager()
-