|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openxri.config.impl.AbstractComponent
org.openxri.server.impl.AbstractServer
org.openxri.server.impl.BasicServer
org.openxri.server.impl.TrustedServer
public class TrustedServer
An extension to BasicServer that adds trust information to the XRD before it is sent out. TODO: Fix everything and implement trusted resolution correctly.
| Field Summary | |
|---|---|
static java.lang.String |
CONFIG_CERTIFICATE_LOCATION
|
static java.lang.String |
CONFIG_CERTIFICATE_LOCATION_DEFAULT
|
static java.lang.String |
CONFIG_PRIVATE_KEY_LOCATION
|
static java.lang.String |
CONFIG_PRIVATE_KEY_LOCATION_DEFAULT
|
static java.lang.String |
CONFIG_SAML_ISSUER
|
static java.lang.String |
CONFIG_SAML_ISSUER_DEFAULT
|
protected static org.apache.commons.logging.Log |
log
|
protected java.lang.String |
parentQueryName
|
| Fields inherited from class org.openxri.server.impl.AbstractServer |
|---|
store |
| Fields inherited from class org.openxri.config.impl.AbstractComponent |
|---|
properties |
| Constructor Summary | |
|---|---|
TrustedServer(java.util.Properties properties)
|
|
| Method Summary | |
|---|---|
protected Assertion |
createAssertion(java.lang.String sXMLID,
java.lang.String sParentID,
java.lang.String sResolved)
Generates an assertion that can be attached to the descriptor according to the rules of XRI trusted resolution. |
protected void |
finishXRD(XRD xrd,
Authority parentAuthority,
SubSegment subSegment,
Authority authority,
boolean bSigned)
Called before the server adds the XRD to the XRDS and moves on to the next authority. |
protected java.security.cert.X509Certificate[] |
getCertificateChain()
This method will read a certificate chain from a file and return it. |
protected java.security.PrivateKey |
getPrivateKey()
This method will read a private key from a file and return it. |
void |
init()
Initialize base-class attributes from configuration. |
protected boolean |
initXRD(XRD xrd,
Authority parentAuthority,
java.lang.String subSegmentName,
boolean signed)
Called before anything is added to a fresh XRD. |
protected boolean |
initXRDS(XRDS xrds,
java.lang.String query,
boolean bSigned)
Called before the server starts processing the request. |
protected void |
setParentQueryName(java.lang.String subSegment)
This is overriden by the TrustedServer which uses the parent subsegment name for generating SAML assertions. |
| Methods inherited from class org.openxri.server.impl.BasicServer |
|---|
finishXRDS |
| Methods inherited from class org.openxri.server.impl.AbstractServer |
|---|
lookupByNamespace, lookupByPath, lookupSelfDescribing, makeExceptionXrd, makeNotFoundXrd |
| Methods inherited from class org.openxri.config.impl.AbstractComponent |
|---|
getProperties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openxri.config.Component |
|---|
getProperties |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
public static final java.lang.String CONFIG_CERTIFICATE_LOCATION
public static final java.lang.String CONFIG_PRIVATE_KEY_LOCATION
public static final java.lang.String CONFIG_SAML_ISSUER
public static final java.lang.String CONFIG_CERTIFICATE_LOCATION_DEFAULT
public static final java.lang.String CONFIG_PRIVATE_KEY_LOCATION_DEFAULT
public static final java.lang.String CONFIG_SAML_ISSUER_DEFAULT
protected java.lang.String parentQueryName
| Constructor Detail |
|---|
public TrustedServer(java.util.Properties properties)
| Method Detail |
|---|
public void init()
AbstractServer
init in interface Componentinit in class BasicServer
protected boolean initXRDS(XRDS xrds,
java.lang.String query,
boolean bSigned)
throws ServerInternalException
AbstractServer
initXRDS in class BasicServerxrds - - A blank XRDS which we will complete.query - - The original XRI segment for which the request was made.bSigned - - Whether we are expected to return a signed descriptor.
ServerInternalException
protected boolean initXRD(XRD xrd,
Authority parentAuthority,
java.lang.String subSegmentName,
boolean signed)
throws ServerInternalException
AbstractServer
initXRD in class BasicServerxrd - - A blank XRD which we will fill.parentAuthority - - The authority describing this XRD.subSegmentName - - The name of the subsegment to be resolved.signed - - Whether we are expected to return a signed descriptor.
ServerInternalException
protected void finishXRD(XRD xrd,
Authority parentAuthority,
SubSegment subSegment,
Authority authority,
boolean bSigned)
throws ServerInternalException
AbstractServer
finishXRD in class BasicServerxrd - - A filled XRD ready to be appended to the XRDS.parentAuthority - - The authority describing this XRD.subSegment - - The subsegment leading to this XRD.authority - - The authority described by this XRD.bSigned - - Whether we are expected to return a signed descriptor.
ServerInternalException
protected Assertion createAssertion(java.lang.String sXMLID,
java.lang.String sParentID,
java.lang.String sResolved)
sXMLID - - The id attribute of the descriptorsParentID - - The authority id of the descriptorsResolved - - The resolved subsegment
protected java.security.cert.X509Certificate[] getCertificateChain()
throws ServerInternalException
ServerInternalException
protected java.security.PrivateKey getPrivateKey()
throws ServerInternalException
ServerInternalExceptionprotected void setParentQueryName(java.lang.String subSegment)
AbstractServer
setParentQueryName in class AbstractServersubSegment - The name of the subsegment that was resolved in the previous step.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||