Class HostInfo
- All Implemented Interfaces:
Serializable,Comparable<HostInfo>,Comparator<HostInfo>,org.bedework.caldav.server.sysinterface.Host,org.bedework.util.logging.Logged
Currently we are adding dynamic look-up and DKIM security to the model. Even with that in place there will be a need for hard-wired connections, with and without DKIM.
To increase security we should use some form of authentication. However, if we use servlet authentication we need to create accounts to authenticate against. Those accounts need to be given to administrators at other sites which is probably unacceptable. On the other hand we can run it through the unauthenticated service and check the id/pw ourselves.
The information here can be used for outgoing or can provide us with information to handle incoming requests. For incoming we need to resolve the host name and we then search for an entry prefixed with *IN*. We'll need to progressively shorten the name by removing leading elements until we get a match or there's nothing left. For example, if we get an incoming request for cal.example.org we check:
- *IN*cal.example.org
- *IN*example.org
- *IN*org
- *IN*
The last entry, if it exists, provides a default behavior. If absent we disallow all unidentified incoming requests. If present they must satisfy the requirements specified, e.g. DKIM
To avoid any need to rebuild the db the host info shown here doesn't match up to the column names in the db. At some point we'll fix that.
- Author:
- Mike Douglass douglm - rpi.edu
- See Also:
-
Field Summary
Fields inherited from class org.bedework.util.config.ConfigBase
ns -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDkimPublicKey(String selector, String val) Add a dkim public keyintintbooleangetDkimPublicKey(String selector) Get a dkim public keygetFbUrl()booleanTrue if we delivered our public key for use for dkimbooleanintgetPort()booleanbooleanbooleanbooleanbooleaninthashCode()voidremoveDkimPublicKey(String selector) Remove a dkim public keyvoidvoidsetCaldavPrincipal(String val) voidsetCaldavUrl(String val) voidsetDkimPublicKey(String selector, String val) Set a dkim public keyvoidsetDkimPublicKeys(List<String> val) voidvoidsetHostname(String val) Set the hostnamevoidvoidvoidsetIScheduleUrl(String val) voidsetIScheduleUsePublicKey(boolean val) voidsetLocalService(boolean val) Set localService flagvoidsetPort(int val) voidsetSecure(boolean val) voidsetSupportsBedework(boolean val) voidsetSupportsCaldav(boolean val) voidsetSupportsFreebusy(boolean val) voidsetSupportsISchedule(boolean val) toString()voidtoStringSegment(org.bedework.base.ToString ts) Methods inherited from class org.bedework.util.config.ConfigBase
addListProperty, compareTo, fromXml, fromXml, fromXml, getLastChanged, getLogger, getName, getProperty, markChanged, removeProperty, setListProperty, setName, toProperties, toXmlMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Constructor Details
-
HostInfo
public HostInfo()
-
-
Method Details
-
setHostname
Set the hostname- Parameters:
val- hostname
-
getHostname
- Specified by:
getHostnamein interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String hostname
-
setPort
public void setPort(int val) - Parameters:
val- port
-
getPort
public int getPort()- Specified by:
getPortin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- int
-
setSecure
public void setSecure(boolean val) - Parameters:
val- true for ssh
-
getSecure
public boolean getSecure()- Specified by:
getSecurein interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String
-
setLocalService
public void setLocalService(boolean val) Set localService flag- Parameters:
val- boolean localService
-
getLocalService
public boolean getLocalService()- Specified by:
getLocalServicein interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- boolean localService
-
setCaldavUrl
- Parameters:
val- String
-
getCaldavUrl
- Specified by:
getCaldavUrlin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String
-
setCaldavPrincipal
- Parameters:
val- String
-
getCaldavPrincipal
- Specified by:
getCaldavPrincipalin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String
-
setCaldavCredentials
- Parameters:
val- String
-
getCaldavCredentials
- Specified by:
getCaldavCredentialsin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String
-
setIScheduleUrl
- Parameters:
val- String
-
getIScheduleUrl
- Specified by:
getIScheduleUrlin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String
-
setISchedulePrincipal
- Parameters:
val- String
-
getISchedulePrincipal
- Specified by:
getISchedulePrincipalin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String
-
setIScheduleCredentials
- Parameters:
val- String
-
setDkimPublicKeys
- Parameters:
val- the dkim public keys
-
getDkimPublicKeys
- Specified by:
getDkimPublicKeysin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String val
-
getIScheduleCredentials
- Specified by:
getIScheduleCredentialsin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String
-
addDkimPublicKey
Add a dkim public key- Parameters:
selector- key selectorval- the key
-
getDkimPublicKey
Get a dkim public key- Parameters:
selector- for the key- Returns:
- value or null
-
removeDkimPublicKey
Remove a dkim public key- Parameters:
selector- for the key
-
setDkimPublicKey
Set a dkim public key- Parameters:
selector- for the keyval- the key
-
setIScheduleUsePublicKey
public void setIScheduleUsePublicKey(boolean val) - Parameters:
val- boolean
-
getIScheduleUsePublicKey
public boolean getIScheduleUsePublicKey()True if we delivered our public key for use for dkim- Specified by:
getIScheduleUsePublicKeyin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- boolean
-
setFbUrl
- Parameters:
val- String
-
getFbUrl
- Specified by:
getFbUrlin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- String
-
setSupportsBedework
public void setSupportsBedework(boolean val) - Parameters:
val- boolean true if supports Bedework
-
getSupportsBedework
public boolean getSupportsBedework()- Specified by:
getSupportsBedeworkin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- boolean true if caldav supported
-
setSupportsCaldav
public void setSupportsCaldav(boolean val) - Parameters:
val- boolean true if supports CalDAV
-
getSupportsCaldav
public boolean getSupportsCaldav()- Specified by:
getSupportsCaldavin interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- boolean true if caldav supported
-
setSupportsISchedule
public void setSupportsISchedule(boolean val) - Parameters:
val- boolean true if supports iSchedule
-
getSupportsISchedule
public boolean getSupportsISchedule()- Specified by:
getSupportsISchedulein interfaceorg.bedework.caldav.server.sysinterface.Host- Returns:
- boolean true if iSchedule supported
-
setSupportsFreebusy
public void setSupportsFreebusy(boolean val) - Parameters:
val- boolean true if supports Freebusy
-
getSupportsFreebusy
public boolean getSupportsFreebusy()- Specified by:
getSupportsFreebusyin interfaceorg.bedework.caldav.server.sysinterface.Host
-
toStringSegment
public void toStringSegment(org.bedework.base.ToString ts) - Overrides:
toStringSegmentin classorg.bedework.util.config.ConfigBase<HostInfo>
-
compare
- Specified by:
comparein interfaceComparator<HostInfo>
-
compareTo
- Specified by:
compareToin interfaceComparable<HostInfo>
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.bedework.util.config.ConfigBase<HostInfo>
-
equals
- Specified by:
equalsin interfaceComparator<HostInfo>- Overrides:
equalsin classObject
-
toString
- Overrides:
toStringin classorg.bedework.util.config.ConfigBase<HostInfo>
-