|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.ebxml.registry.security.authentication.AuthenticationServiceImpl
Manages authentication functionality for the registry. This includes managemnet of user public keys in the server key store.
Field Summary | |
static java.lang.String |
ALIAS_ADRIAN
|
static java.lang.String |
ALIAS_CY
|
static java.lang.String |
ALIAS_FARRUKH
|
static java.lang.String |
ALIAS_NIKOLA
|
static java.lang.String |
ALIAS_REGISTRY_GUEST
|
static java.lang.String |
ALIAS_REGISTRY_OPERATOR
|
Constructor Summary | |
protected |
AuthenticationServiceImpl()
|
Method Summary | |
java.lang.String |
getAliasFromUser(org.oasis.ebxml.registry.bindings.rim.User user)
Gets the alias within the KeyStore for a User |
java.security.cert.X509Certificate |
getCertificate(java.lang.String alias)
|
java.security.cert.Certificate[] |
getCertificateChain(java.lang.String alias)
|
java.security.cert.X509Certificate |
getCertificateFromUser(org.oasis.ebxml.registry.bindings.rim.User user)
Gets the alias within the KeyStore for a User |
static AuthenticationServiceImpl |
getInstance()
|
java.security.KeyStore |
getKeyStore()
Get the keystore whose path is specified by getKeyStoreFileName() . |
java.lang.String |
getKeyStoreFileName()
|
java.lang.String |
getKeyStorePassword()
|
java.security.PrivateKey |
getPrivateKey(java.lang.String alias,
java.lang.String password)
|
java.security.KeyStore |
getTrustAnchorsKeyStore()
|
org.oasis.ebxml.registry.bindings.rim.User |
getUserFromAlias(java.lang.String alias)
Gets the User that is associated with the KeyInfo provided within the XMLSignature signature. |
org.oasis.ebxml.registry.bindings.rim.User |
getUserFromXMLSignature(org.apache.xml.security.signature.XMLSignature signature)
Gets the User that is associated with the KeyInfo provided within the XMLSignature signature. |
static void |
main(java.lang.String[] args)
|
protected void |
registerUserCertificate(java.lang.String userId,
org.apache.xml.security.signature.XMLSignature signature)
Add a certificate entry in the keystore. |
void |
validateCertificate(org.apache.xml.security.signature.XMLSignature signature)
Check if the signatures CA is trusted by the registry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String ALIAS_REGISTRY_OPERATOR
public static java.lang.String ALIAS_REGISTRY_GUEST
public static java.lang.String ALIAS_FARRUKH
public static java.lang.String ALIAS_NIKOLA
public static java.lang.String ALIAS_CY
public static java.lang.String ALIAS_ADRIAN
Constructor Detail |
protected AuthenticationServiceImpl()
Method Detail |
public java.security.KeyStore getTrustAnchorsKeyStore() throws RegistryException
RegistryException
public java.security.KeyStore getKeyStore() throws RegistryException
getKeyStoreFileName()
.
Note that all the methods that access the keystore MUST access the keystore
via this method. Do not access the keystore directly by accessing the keystore
field. Otherwise the checking the write lock to keystore will be bypassed.
RegistryException
public java.security.PrivateKey getPrivateKey(java.lang.String alias, java.lang.String password) throws RegistryException
RegistryException
public java.security.cert.X509Certificate getCertificate(java.lang.String alias) throws RegistryException
RegistryException
public java.security.cert.Certificate[] getCertificateChain(java.lang.String alias) throws RegistryException
RegistryException
public static AuthenticationServiceImpl getInstance()
public java.lang.String getKeyStoreFileName() throws RegistryException
RegistryException
public java.lang.String getKeyStorePassword() throws RegistryException
RegistryException
public void validateCertificate(org.apache.xml.security.signature.XMLSignature signature) throws UserRegistrationException, RegistryException
UserRegistrationException
- if the certificate issuing CA is not trusted.
RegistryException
- if the certificates cannot be verified for some other reasons, such as unable to load
trust anchors keystorepublic java.lang.String getAliasFromUser(org.oasis.ebxml.registry.bindings.rim.User user) throws RegistryException
RegistryException
public java.security.cert.X509Certificate getCertificateFromUser(org.oasis.ebxml.registry.bindings.rim.User user) throws RegistryException
RegistryException
public org.oasis.ebxml.registry.bindings.rim.User getUserFromAlias(java.lang.String alias) throws RegistryException
RegistryException
- no matching User is found. May need more specific Exception??public org.oasis.ebxml.registry.bindings.rim.User getUserFromXMLSignature(org.apache.xml.security.signature.XMLSignature signature) throws RegistryException
RegistryException
- no matching User is found. May need more specific Exception??protected void registerUserCertificate(java.lang.String userId, org.apache.xml.security.signature.XMLSignature signature) throws RegistryException
userId
- The alias of the certificatesignature
- The XMLSignature containing the certificate
UserRegistration
- fails if the keystore already contrains the entry
whose alias is equal to userId
RegistryException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |