Class BasicKeystoreKeyStrategyTool
java.lang.Object
net.shibboleth.shared.security.impl.BasicKeystoreKeyStrategyTool
Implements a tool for managing secret keys in accordance with the
BasicKeystoreKeyStrategy.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classManages command line parsing for application and the bean properties used by the tool.static classCommand line option conversion from String to File. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BasicKeystoreKeyStrategyTool.CommandLineArgsContainer for options that can be parsed from a command line.private org.slf4j.LoggerClass logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe main routine.static voidCommand line entry point.voidsetKeyAlias(String alias) Set the encryption key alias base name.voidsetKeyCount(int count) Set the number of keys to maintain.voidsetKeySize(int size) Set the size of the generated key.voidsetKeystoreFile(File file) Set the keystore file to create or modify.voidsetKeystorePassword(String password) Set the password for the keystore.voidsetKeystoreType(String type) Set the type of keystore to create.voidsetKeyType(String type) Set the type of key that will be generated.voidsetVersionFile(File file) Set the key versioning file to create or modify.
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
args
Container for options that can be parsed from a command line.
-
-
Constructor Details
-
BasicKeystoreKeyStrategyTool
public BasicKeystoreKeyStrategyTool()Constructor.
-
-
Method Details
-
setKeyType
Set the type of key that will be generated. Defaults to AES.- Parameters:
type- type of key that will be generated
-
setKeySize
Set the size of the generated key. Defaults to 128- Parameters:
size- size of the generated key
-
setKeyAlias
Set the encryption key alias base name.- Parameters:
alias- the encryption key alias base
-
setKeyCount
Set the number of keys to maintain. Defaults to 30.- Parameters:
count- number of keys to maintain
-
setKeystoreType
Set the type of keystore to create. Defaults to JCEKS.- Parameters:
type- keystore type
-
setKeystoreFile
Set the keystore file to create or modify.- Parameters:
file- keystore file
-
setKeystorePassword
Set the password for the keystore.- Parameters:
password- password for the keystore
-
setVersionFile
Set the key versioning file to create or modify.- Parameters:
file- key versioning file
-
changeKey
The main routine.- Throws:
Exception- if an error occurs
-
main
Command line entry point.- Parameters:
args- command line arguments- Throws:
Exception- if something goes wrong
-