Package org.apache.bookkeeper.util
Class CertUtils
- java.lang.Object
-
- org.apache.bookkeeper.util.CertUtils
-
public abstract class CertUtils extends java.lang.Object
Certificate parsing utilities.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OU_CLUSTER_NAME_CODE
static java.lang.String
OU_CODE_SEPARATOR
(package private) static java.util.regex.Pattern
OU_GENERAL_NAME_REGEX
static java.lang.String
OU_NAME_SEPARATOR
(package private) static java.util.regex.Pattern
OU_NAME_SPLITTER
static java.lang.String
OU_ROLE_NAME_CODE
static java.lang.String
OU_VALUES_SEPARATOR
(package private) static java.util.regex.Pattern
OU_VALUES_SPLITTER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.String>
getOUMap(java.security.cert.X509Certificate cert)
static java.util.Map<java.lang.String,java.lang.String>
getOUMapFromOUString(java.lang.String ou)
static java.lang.String
getOUString(java.security.cert.X509Certificate cert)
static java.lang.String
getOUStringFromSubject(java.lang.String subject)
static java.lang.String[]
getRolesFromOU(java.security.cert.X509Certificate cert)
static java.lang.String[]
getRolesFromOUMap(java.util.Map<java.lang.String,java.lang.String> ouMap)
-
-
-
Field Detail
-
OU_ROLE_NAME_CODE
public static final java.lang.String OU_ROLE_NAME_CODE
- See Also:
- Constant Field Values
-
OU_CLUSTER_NAME_CODE
public static final java.lang.String OU_CLUSTER_NAME_CODE
- See Also:
- Constant Field Values
-
OU_VALUES_SEPARATOR
public static final java.lang.String OU_VALUES_SEPARATOR
- See Also:
- Constant Field Values
-
OU_CODE_SEPARATOR
public static final java.lang.String OU_CODE_SEPARATOR
- See Also:
- Constant Field Values
-
OU_NAME_SEPARATOR
public static final java.lang.String OU_NAME_SEPARATOR
- See Also:
- Constant Field Values
-
OU_VALUES_SPLITTER
static final java.util.regex.Pattern OU_VALUES_SPLITTER
-
OU_GENERAL_NAME_REGEX
static final java.util.regex.Pattern OU_GENERAL_NAME_REGEX
-
OU_NAME_SPLITTER
static final java.util.regex.Pattern OU_NAME_SPLITTER
-
-
Method Detail
-
getOUString
public static java.lang.String getOUString(java.security.cert.X509Certificate cert) throws java.io.IOException
- Throws:
java.io.IOException
-
getOUStringFromSubject
public static java.lang.String getOUStringFromSubject(java.lang.String subject) throws java.io.IOException
- Throws:
java.io.IOException
-
getOUMapFromOUString
public static java.util.Map<java.lang.String,java.lang.String> getOUMapFromOUString(java.lang.String ou) throws java.io.IOException
- Throws:
java.io.IOException
-
getOUMap
public static java.util.Map<java.lang.String,java.lang.String> getOUMap(java.security.cert.X509Certificate cert) throws java.io.IOException
- Throws:
java.io.IOException
-
getRolesFromOU
public static java.lang.String[] getRolesFromOU(java.security.cert.X509Certificate cert) throws java.io.IOException
- Throws:
java.io.IOException
-
getRolesFromOUMap
public static java.lang.String[] getRolesFromOUMap(java.util.Map<java.lang.String,java.lang.String> ouMap) throws java.io.IOException
- Throws:
java.io.IOException
-
-