Package org.acemq.workloads.scenario
Record Class ScenarioFile.SecurityJson
java.lang.Object
java.lang.Record
org.acemq.workloads.scenario.ScenarioFile.SecurityJson
- Record Components:
mode-requiredto verify,insecureto accept any certificate,disabledfor no TLS at alltruststore- a PKCS#12 or JKS keystore holding the CA to trust, and a client certificate when one is neededtruststorePassword- the password for it. Read from the file and never written back to one -- see belowallowDevelopmentCertificates- whether a certificate marked as a development one is acceptable. Brokers that generate their own certificate on first boot mark it; a production run should refuse it, and that is the default.
- Enclosing class:
ScenarioFile
public static record ScenarioFile.SecurityJson(String mode, String truststore, String truststorePassword, Boolean allowDevelopmentCertificates)
extends Record
How to reach a broker over TLS.
The URL decides whether TLS is used at all -- amqps:// or nothing. What a URL
cannot carry is which certificates to believe, and that is what this is for: a private
certificate authority, or a client certificate, in a keystore.
-
Constructor Summary
ConstructorsConstructorDescriptionSecurityJson(String mode, String truststore, String truststorePassword, Boolean allowDevelopmentCertificates) Creates an instance of aSecurityJsonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowDevelopmentCertificatesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.org.acemq.amqp.security.Securityfinal StringtoString()Returns a string representation of this record class.Returns the value of thetruststorerecord component.Returns the value of thetruststorePasswordrecord component.
-
Constructor Details
-
SecurityJson
public SecurityJson(String mode, String truststore, String truststorePassword, Boolean allowDevelopmentCertificates) Creates an instance of aSecurityJsonrecord class.- Parameters:
mode- the value for themoderecord componenttruststore- the value for thetruststorerecord componenttruststorePassword- the value for thetruststorePasswordrecord componentallowDevelopmentCertificates- the value for theallowDevelopmentCertificatesrecord component
-
-
Method Details
-
toSecurity
public org.acemq.amqp.security.Security toSecurity()- Returns:
- the client's security policy, or null when this says nothing
- Throws:
ScenarioReader.ScenarioFormatException- if the mode is not a mode
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
truststore
Returns the value of thetruststorerecord component.- Returns:
- the value of the
truststorerecord component
-
truststorePassword
Returns the value of thetruststorePasswordrecord component.- Returns:
- the value of the
truststorePasswordrecord component
-
allowDevelopmentCertificates
Returns the value of theallowDevelopmentCertificatesrecord component.- Returns:
- the value of the
allowDevelopmentCertificatesrecord component
-