@ProviderType
public static interface SolaceProperties.AuthenticationProperties
MessagingService
instances. The properties are for use with MessagingServiceClientBuilder.fromProperties(Properties)
.
Example usage:
final Properties authenticationProperties = new Properties();
authenticationProperties.setProperty(AuthenticationProperties.SCHEME, AuthenticationConstants.AUTHENTICATION_SCHEME_BASIC);
authenticationProperties.setProperty(AuthenticationProperties.SCHEME_BASIC_USER_NAME, "default");
authenticationProperties.setProperty(AuthenticationProperties.SCHEME_BASIC_PASSWORD, "default");
final MessagingServiceClientBuilder serviceBuilder = new MessagingServiceClientBuilder(ConfigurationProfile.V1);
final MessagingService service = serviceBuilder.fromProperties(authenticationProperties).build();
Alternatively, one of the AuthenticationStrategy
can be used with MessagingServiceClientBuilder.withAuthenticationStrategy(AuthenticationStrategy)
for
configuring the authentication-related properties to configure MessagingService
instances.
Example usage:
final MessagingServiceClientBuilder builder = new MessagingServiceClientBuilder(ConfigurationProfile.V1);
final MessagingService service = builder.withAuthenticationStrategy(BasicUserNamePassword.of("default", "default")).build();
MessagingServiceClientBuilder.fromProperties(Properties)
Modifier and Type | Field and Description |
---|---|
static String |
SCHEME
A property key to specify the authentication-scheme type.
|
static String |
SCHEME_BASIC_PASSWORD
A property key to specify password for basic authentication.
|
static String |
SCHEME_BASIC_USER_NAME
A property key to specify the user name for basic authentication.
|
static String |
SCHEME_CLIENT_CERT_KEYSTORE
A property key to specify the location of a keystore file for client certificate
authentication.
|
static String |
SCHEME_CLIENT_CERT_KEYSTORE_FORMAT
A property key to specify the type of keystore file for client certificate authentication.
|
static String |
SCHEME_CLIENT_CERT_KEYSTORE_PASSWORD
A property key to specify the keystore password.
|
static String |
SCHEME_CLIENT_CERT_PRIVATE_KEY_ALIAS
A property key to specify the private key alias for client certificate authentication if more
then one is stored in a keystore.
|
static String |
SCHEME_CLIENT_CERT_PRIVATE_KEY_PASSWORD
A property key to specify the private key password for client certificate authentication.
|
static String |
SCHEME_CLIENT_CERTIFICATE_USER_NAME
A property key to specify the user name for client-certificate authentication.
|
static String |
SCHEME_KERBEROS_INSTANCE_NAME
A property key to specify an instance name for Kerberos authentication.
|
static String |
SCHEME_KERBEROS_JAAS_CONFIG_RELOADABLE
A property key to specify if the JAAS Kerberos configuration file can be reloaded.
|
static String |
SCHEME_KERBEROS_JAAS_LOGIN_CONTEXT
A property key to specify Kerberos JAAS login-context for Kerberos authentication.
|
static String |
SCHEME_KERBEROS_MUTUAL_AUTH
A property key to specify if Kerberos mutual-authentication should be enabled.
|
static String |
SCHEME_KERBEROS_USER_NAME
A property key to specify the user name for kerberos authentication.
|
static String |
SCHEME_OAUTH2_ACCESS_TOKEN
A property key to define the access token for OAUTH 2.0 authentication.
|
static String |
SCHEME_OAUTH2_ISSUER_IDENTIFIER
A property key to define an optional Issuer Identifier URI for OAUTH 2.0 authentication.
|
static String |
SCHEME_OAUTH2_OIDC_ID_TOKEN
A property key to define the OIDC ID Token for OAUTH 2.0 authentication.
|
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="AUTHENTICATION_SCHEME", valueType=java.lang.String.class) static final String SCHEME
Possible values for configuration of authentication scheme are defined in SolaceConstants.AuthenticationConstants.AUTHENTICATION_SCHEME_BASIC
, SolaceConstants.AuthenticationConstants.AUTHENTICATION_SCHEME_KERBEROS
, SolaceConstants.AuthenticationConstants.AUTHENTICATION_SCHEME_CLIENT_CERT
. SolaceConstants.AuthenticationConstants.AUTHENTICATION_SCHEME_OAUTH2
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="PASSWORD", valueType=java.lang.String.class) static final String SCHEME_BASIC_PASSWORD
@PropertiesKeyMapping(mappedClass=com.solace.messaging.util.internal.ExtendedSolaceProperties.class, mappedFieldName="SCHEME_BASIC_USER_NAME", valueType=java.lang.String.class) static final String SCHEME_BASIC_USER_NAME
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="SSL_KEY_STORE", valueType=java.lang.String.class) static final String SCHEME_CLIENT_CERT_KEYSTORE
JAVA_HOME/jre/lib/security/cacerts
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="SSL_KEY_STORE_FORMAT", valueType=java.lang.String.class) static final String SCHEME_CLIENT_CERT_KEYSTORE_FORMAT
jks
or pkcs12
. Note that the default Java keystore-type
is different in various Java versions. Before Java 9, it was JKS, in Java 9 and higher it is
PKCS12.@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="SSL_KEY_STORE_PASSWORD", valueType=java.lang.String.class) static final String SCHEME_CLIENT_CERT_KEYSTORE_PASSWORD
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="SSL_PRIVATE_KEY_ALIAS", valueType=java.lang.String.class) static final String SCHEME_CLIENT_CERT_PRIVATE_KEY_ALIAS
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="SSL_PRIVATE_KEY_PASSWORD", valueType=java.lang.String.class) static final String SCHEME_CLIENT_CERT_PRIVATE_KEY_PASSWORD
@PropertiesKeyMapping(mappedClass=com.solace.messaging.util.internal.ExtendedSolaceProperties.class, mappedFieldName="SCHEME_CLIENT_CERTIFICATE_USER_NAME", valueType=java.lang.String.class) static final String SCHEME_CLIENT_CERTIFICATE_USER_NAME
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="KRB_SERVICE_NAME", valueType=java.lang.String.class) static final String SCHEME_KERBEROS_INSTANCE_NAME
instance
part of the Kerberos principal
identity; the entire identity to be setup on a KDC
(Key Distribution Center that issues Kerberos tickets) looks like
[KerberosPrincipalInstanceName]@ [hostname], where [hostname] is the hostname of a
PubSub+ broker.@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="JAAS_CONFIG_FILE_RELOAD_ENABLED", valueType=boolean.class) static final String SCHEME_KERBEROS_JAAS_CONFIG_RELOADABLE
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="JAAS_LOGIN_CONTEXT", valueType=java.lang.String.class) static final String SCHEME_KERBEROS_JAAS_LOGIN_CONTEXT
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="KRB_MUTUAL_AUTHENTICATION", valueType=boolean.class) static final String SCHEME_KERBEROS_MUTUAL_AUTH
@PropertiesKeyMapping(mappedClass=com.solace.messaging.util.internal.ExtendedSolaceProperties.class, mappedFieldName="SCHEME_KERBEROS_USER_NAME", valueType=java.lang.String.class) static final String SCHEME_KERBEROS_USER_NAME
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="OAUTH2_ACCESS_TOKEN", valueType=java.lang.String.class) static final String SCHEME_OAUTH2_ACCESS_TOKEN
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="OAUTH2_ISSUER_IDENTIFIER", valueType=java.lang.String.class) static final String SCHEME_OAUTH2_ISSUER_IDENTIFIER
@PropertiesKeyMapping(mappedClass=com.solacesystems.jcsmp.JCSMPProperties.class, mappedFieldName="OIDC_ID_TOKEN", valueType=java.lang.String.class) static final String SCHEME_OAUTH2_OIDC_ID_TOKEN
Copyright 2019-2024 Solace Corporation. All rights reserved.