|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.security.sso.Secret | +--com.novell.security.sso.SharedSecret
A class that represents a shared secret. Shared secrets are secrets that are
in a format that encourages the sharing of secrets by single sign on-enabling
applications (SSO apps). Shared secrets that are written by one application
will be able to be read by another application as long as each application
uses the shared secret format. This class automates the task of conforming to
this format so that developers of SSO apps can take
advantage of the format without having to worry about any of the details. For
example, all escaping and unescaping are automatically performed by this API.
The shared secret format is provided below as a reference.
This class uses the SharedEntry
class to represent the key/value
pairs (shared secret entries) that make up the shared secret value.
In order to support all implementations, NCP and JNDI for example, this class
wraps another secret. Thus, this class has an inheritance relationship as
well as a composition relationship with the Secret class. Calls to this
method are delegated to the wrapped secret. This class formats the data
according to this specification before delegating the call. The wrapped
secret type is determined by how an object of this class was created. The
constructors that take a Secret object as a parameter will set that object as
the wrapped secret. The constructors that take a SecretStore object will
create a new Secret object by calling secretStore.getSecret(id) and then set
that newly returned Secret as the wrapped Secret.
By definition, when modifying shared secrets you should only modify those
entries that you directly depend on. In other words, if another SSO app
is dependent on an entry that is in a shared secret that you use,
you should not delete this entry when modifying other entries. In order to
encourage this, two constructors have been added that allow you to instruct
the constructor to automatically perform a read operation that will bring
into memory all existing entries. The constructors without the isToAutoLoad
parameter will call their corresponding constructors with the the
isToAutoLoad parameter set to true. If you desire to delay the read
operation you may pass in false for the isToAutoLoad parameter and then make
the read call manually later.
Application Type | Description | Example |
---|---|---|
Windows application | program.exe | Grpwise.exe |
Web application | Unique URI | novell.com |
Mainframe/host application | host application name | MyHostApplication |
Shared Secret | Identifier | Value |
---|---|---|
Groupwise client application | SS_App:Grpwise.exe | SS_CredSet:Groupwise[linefeed]NameCtrlID=1002[linefeed]PassCtrlID=1003[null] |
Groupwise Webaccess application | SS_App:webaccess.novell.com | FormName=loginForm[linefeed]SS_CredSet:Groupwise[null] |
Groupwise credential set | SS_CredSet:Groupwise | Username=johndoe[linefeed]Password=johnpass[null] |
SharedEntry
, Serialized FormField Summary | |
static String |
APPLICATION_TYPE
The shared secret application type. |
static String |
CREDENTIAL_TYPE
The shared secret credset type. |
Constructor Summary | |
SharedSecret(Secret secret)
Constructs a shared secret by wrapping another secret. |
|
SharedSecret(Secret secret,
boolean isToAutoLoad)
Constructs a shared secret by wrapping another secret. |
|
SharedSecret(SecretStore secretStore,
String secretType,
String name)
Constructs a new shared secret. |
|
SharedSecret(SecretStore secretStore,
String secretType,
String name,
boolean isToAutoLoad)
Constructs a new shared secret. |
Method Summary | |
void |
addEntry(SharedEntry entry)
Adds an entry. |
void |
clearEntries()
Clears out the entries. |
boolean |
equals(Object obj)
This method call is delegated to the wrapped secret. |
boolean |
exists()
This method call is delegated to the wrapped secret. |
Date |
getAccessTime()
This method call is delegated to the wrapped secret. |
Date |
getCreateTime()
This method call is delegated to the wrapped secret. |
Set |
getCredSetEntries()
Returns an unmodifiable Set of the all the CredSet entries. |
Collection |
getEntries()
Returns an unmodifiable Collection of the entries. |
SharedEntry |
getEntry(String key)
Returns the SharedEntry identified by the key. |
Date |
getModifyTime()
This method call is delegated to the wrapped secret. |
String |
getName()
Returns the shared secret name. |
String |
getSecretType()
Returns the shared secret type. |
int |
getStatus()
This method call is delegated to the wrapped secret. |
byte[] |
getValue()
This method call is delegated to the wrapped secret. |
int |
hashCode()
This method call is delegated to the wrapped secret. |
boolean |
isCheckingSecretIDCollision()
This method call is delegated to the wrapped secret. |
static boolean |
isSharedSecret(Secret secret)
Returns true if the secret is a SharedSecret and false if not. |
static boolean |
isSharedSecretIdentifier(String identifier)
Returns true if the secret identifier is a SharedSecret identifier and false if not. |
void |
removeEntry(SharedEntry entry)
Removes the entry. |
void |
setCheckingSecretIDCollision(boolean policy)
This method call is delegated to the wrapped secret. |
void |
setEnhancedProtectionPassword(char[] erPass)
This method call is delegated to the wrapped secret. |
void |
setValue()
Set the secret value of this secret in SecretStore. |
void |
unsetEnhancedProtectionPassword()
This method call is delegated to the wrapped secret. |
void |
update(Secret targetSecret,
int flags)
This method call is delegated to the wrapped secret. |
Methods inherited from class com.novell.security.sso.Secret |
create, create, delete, delete, exists, getAutoCreateIDPolicy, getEnhancedProtectedPolicy, isEnhancedProtected, isEnhancedProtectedWithPassword, read, read, setAutoCreateIDPolicy, setEnhancedProtected, setEnhancedProtectedPolicy, setValue, setValue, sync, toString, update |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String APPLICATION_TYPE
public static final String CREDENTIAL_TYPE
Constructor Detail |
public SharedSecret(Secret secret)
secret
- The secret that will be wrapped by this secret.SharedSecret(SecretStore secretStore, String secretType, String name)
public SharedSecret(Secret secret, boolean isToAutoLoad)
secret
- The secret that will be wrapped by this secret.isToAutoLoad
- Specify true to cause a read operation to occur
automatically just after construction.SharedSecret(SecretStore secretStore, String secretType, String name)
public SharedSecret(SecretStore secretStore, String secretType, String name)
secretStore
- The SecretStore.secretType
- The type of v-GO secret.name
- The name of the shared secret.SharedSecret(Secret secret)
public SharedSecret(SecretStore secretStore, String secretType, String name, boolean isToAutoLoad)
secretStore
- The SecretStore.secretType
- The type of v-GO secret.name
- The name of the shared secret.isToAutoLoad
- Specify true to cause a read operation to occur
automatically just after construction.SharedSecret(Secret secret)
Method Detail |
public Date getAccessTime() throws SSException
getAccessTime
in class Secret
SSException
- If a SSException occurred.public Date getCreateTime() throws SSException
getCreateTime
in class Secret
SSException
- If a SSException occurred.public Set getCredSetEntries() throws SSException
SSException
- If a SSException occurred.addEntry(SharedEntry entry)
,
removeEntry(SharedEntry entry)
public Collection getEntries() throws SSException
SSException
- If a SSException occurred.addEntry(SharedEntry entry)
,
removeEntry(SharedEntry entry)
public SharedEntry getEntry(String key) throws SSException
key
- The SharedEntry key.SSException
- If a SSException occurred.addEntry(SharedEntry entry)
,
removeEntry(SharedEntry entry)
public Date getModifyTime() throws SSException
getModifyTime
in class Secret
SSException
- If a SSException occurred.public String getName()
public String getSecretType()
public boolean isCheckingSecretIDCollision()
isCheckingSecretIDCollision
in class Secret
setValue()
method is checking for secret ID
collisions and false if not.public static boolean isSharedSecret(Secret secret)
secret
- The Secret that will be tested.public static boolean isSharedSecretIdentifier(String identifier)
identifier
- The secret identifier that will be tested.public void setCheckingSecretIDCollision(boolean policy)
setCheckingSecretIDCollision
in class Secret
policy
- the checking secretID collision policy.public void setEnhancedProtectionPassword(char[] erPass)
setEnhancedProtectionPassword
in class Secret
erPass
- Specifies the enhanced protection password.public int getStatus() throws SSException
getStatus
in class Secret
SSException
- If a SSException occurred.public byte[] getValue() throws SSException
getValue
in class Secret
SSException
- If a SSException occurred.SecurityException
- If a security manager exists and its
SecurityManager.checkPermission method denies read access
to this secret.Secret.read(int flags)
,
Secret.setValue(byte[] value)
,
SSPermission
public void setValue() throws SSException
Secret.setValue(byte[] value, int flags)
with a value of null and a
flags value of 0. See the javadoc for the Secret class for more information.SSException
- If a SSException occurred.SecurityException
- If a security manager exists and its
SecurityManager.checkPermission method denies write access
to this secret.Secret.setValue(byte[] value, int flags)
,
SSPermission
public void addEntry(SharedEntry entry)
entry
- The SharedEntry that will be added.getEntry(String key)
,
getEntries()
,
removeEntry(SharedEntry entry)
public void clearEntries()
public boolean equals(Object obj)
equals
in class Secret
obj
- The object with which to compare this secret.public boolean exists() throws SSException
exists
in class Secret
SSException
- If a SSException occurred.public int hashCode()
hashCode
in class Secret
public void removeEntry(SharedEntry entry)
entry
- The SharedEntry that will be removed.getEntry(String key)
,
getEntries()
,
addEntry(SharedEntry entry)
public void unsetEnhancedProtectionPassword()
unsetEnhancedProtectionPassword
in class Secret
com.novell.security.sso.Secret
Secret.setEnhancedProtectionPassword(char[] erPass)
public void update(Secret targetSecret, int flags) throws SSException
update
in class Secret
targetSecret
- The target Secret.flags
- The flags for this operation.SSException
- If a SSException occurred.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |