com.atlassian.security.auth.trustedapps
Class BaseEncryptionProvider

java.lang.Object
  extended bycom.atlassian.security.auth.trustedapps.BaseEncryptionProvider
All Implemented Interfaces:
EncryptionProvider
Direct Known Subclasses:
BouncyCastleEncryptionProvider

public abstract class BaseEncryptionProvider
extends java.lang.Object
implements EncryptionProvider

Base class for encryption provider, provides methods that are not crypto-specific


Constructor Summary
BaseEncryptionProvider()
           
 
Method Summary
 java.lang.String generateUID()
          Generate a unique 32 character String ID.
 Application getApplicationCertificate(java.lang.String baseUrl)
          Retrieve the application certificate from some other application, over HTTP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.security.auth.trustedapps.EncryptionProvider
createEncryptedCertificate, decodeEncryptedCertificate, generateNewKeyPair, toPrivateKey, toPublicKey
 

Constructor Detail

BaseEncryptionProvider

public BaseEncryptionProvider()
Method Detail

getApplicationCertificate

public Application getApplicationCertificate(java.lang.String baseUrl)
                                      throws ApplicationRetriever.RetrievalException
Description copied from interface: EncryptionProvider
Retrieve the application certificate from some other application, over HTTP. Will look for the certificate at ${baseUrl}/admin/appTrustCertificate. TODO: document the exception policy

Specified by:
getApplicationCertificate in interface EncryptionProvider
Parameters:
baseUrl - the base URL of the application to be queried
Returns:
the retrieved application certificate
Throws:
ApplicationRetriever.RetrievalException

generateUID

public java.lang.String generateUID()
Description copied from interface: EncryptionProvider
Generate a unique 32 character String ID. The default implementation combines the local IP address, a secure random number, the current time, and the identity hashcode of a newly created object.

Specified by:
generateUID in interface EncryptionProvider
Returns:
a 32 character unique ID string


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.