com.atlassian.confluence.security.trust
Class DefaultTrustedApplicationsManager

java.lang.Object
  extended by com.atlassian.confluence.security.trust.DefaultTrustedApplicationsManager
All Implemented Interfaces:
KeyPairInitialiser, TrustedApplicationsManager, TrustedTokenFactory

public class DefaultTrustedApplicationsManager
extends java.lang.Object
implements TrustedApplicationsManager, KeyPairInitialiser, TrustedTokenFactory

Manager to support trusted communications between applications


Field Summary
protected  org.apache.log4j.Logger log
          Deprecated. 
 
Constructor Summary
DefaultTrustedApplicationsManager()
           
 
Method Summary
 void deleteTrustedApplication(ConfluenceTrustedApplication trustedApplication)
           
 java.util.Collection getAllTrustedApplications()
          Return a list of all the trusted application aliases.
 com.atlassian.security.auth.trustedapps.CurrentApplication getCurrentApplication()
          Return the public and private keys for the currently running instance
 TrustedToken getToken()
          Generates a token for the currently authenticated user.
 ConfluenceTrustedApplication getTrustedApplication(long id)
           
 ConfluenceTrustedApplication getTrustedApplicationByAlias(java.lang.String alias)
           
 ConfluenceTrustedApplication getTrustedApplicationByName(java.lang.String applicationName)
           
 void initConfluenceKey()
           
 void saveTrustedApplication(ConfluenceTrustedApplication trustedApplication)
           
 void setAsymmetricKeyFactory(AsymmetricKeyFactory asymmetricKeyFactory)
           
 void setKeyStoreDao(KeyStore keyStoreDao)
           
 void setSidManager(ConfluenceSidManager sidManager)
           
 void setTrustedApplicationDao(TrustedApplicationDao trustedApplicationDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

@Deprecated
protected final org.apache.log4j.Logger log
Deprecated. 
Constructor Detail

DefaultTrustedApplicationsManager

public DefaultTrustedApplicationsManager()
Method Detail

saveTrustedApplication

public void saveTrustedApplication(ConfluenceTrustedApplication trustedApplication)
Specified by:
saveTrustedApplication in interface TrustedApplicationsManager

deleteTrustedApplication

public void deleteTrustedApplication(ConfluenceTrustedApplication trustedApplication)
Specified by:
deleteTrustedApplication in interface TrustedApplicationsManager

getTrustedApplicationByAlias

public ConfluenceTrustedApplication getTrustedApplicationByAlias(java.lang.String alias)
Specified by:
getTrustedApplicationByAlias in interface TrustedApplicationsManager

getToken

public TrustedToken getToken()
Generates a token for the currently authenticated user. Note that the token has an embedded timestamp of generation. When transmitting this token to other applications it is important to note that the receiving server may impose age limits when accepting tokens. Thus it is important to use the token as soon as possible after retrieving it.

Specified by:
getToken in interface TrustedTokenFactory
Returns:
a trusted token for the current user

getAllTrustedApplications

public java.util.Collection getAllTrustedApplications()
Description copied from interface: TrustedApplicationsManager
Return a list of all the trusted application aliases.

Specified by:
getAllTrustedApplications in interface TrustedApplicationsManager

getCurrentApplication

public com.atlassian.security.auth.trustedapps.CurrentApplication getCurrentApplication()
Return the public and private keys for the currently running instance

Specified by:
getCurrentApplication in interface TrustedApplicationsManager
Returns:
application representing the current instance

initConfluenceKey

public void initConfluenceKey()
                       throws java.security.NoSuchProviderException,
                              java.security.NoSuchAlgorithmException
Specified by:
initConfluenceKey in interface KeyPairInitialiser
Throws:
java.security.NoSuchProviderException
java.security.NoSuchAlgorithmException

setKeyStoreDao

public void setKeyStoreDao(KeyStore keyStoreDao)

setTrustedApplicationDao

public void setTrustedApplicationDao(TrustedApplicationDao trustedApplicationDao)

setSidManager

public void setSidManager(ConfluenceSidManager sidManager)

setAsymmetricKeyFactory

public void setAsymmetricKeyFactory(AsymmetricKeyFactory asymmetricKeyFactory)

getTrustedApplication

public ConfluenceTrustedApplication getTrustedApplication(long id)
Specified by:
getTrustedApplication in interface TrustedApplicationsManager

getTrustedApplicationByName

public ConfluenceTrustedApplication getTrustedApplicationByName(java.lang.String applicationName)
Specified by:
getTrustedApplicationByName in interface TrustedApplicationsManager


Copyright © 2003-2010 Atlassian. All Rights Reserved.