Skip to content

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Nov 25, 2019

Use ssl enabled flag when RabbitProperties specify address with no protocol.

Closes gh-19102

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 25, 2019
@@ -188,7 +188,7 @@ public void setAddresses(String addresses) {
private List<Address> parseAddresses(String addresses) {
List<Address> parsedAddresses = new ArrayList<>();
for (String address : StringUtils.commaDelimitedListToStringArray(addresses)) {
parsedAddresses.add(new Address(address));
parsedAddresses.add(new Address(address, getSsl().isEnabled()));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not super keen on passing this info down into Address#init but doing so make all downstream processing in Address hinge off of Address.secureConnection.

@onobc
Copy link
Contributor Author

onobc commented Nov 25, 2019

@wilkinsona I think this addresses the concerns.

snicoll pushed a commit to snicoll/spring-boot that referenced this pull request Nov 25, 2019
snicoll added a commit to snicoll/spring-boot that referenced this pull request Nov 25, 2019
@snicoll snicoll changed the title gh-19102: Use ssl enabled flag when RabbitProperties specify address with no protocol ssl.enabled is ignored when Rabbit is configured with an address with no protocol Nov 25, 2019
@snicoll snicoll self-assigned this Nov 25, 2019
@snicoll snicoll added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 25, 2019
@snicoll snicoll added this to the 2.1.11 milestone Nov 25, 2019
snicoll added a commit that referenced this pull request Nov 25, 2019
There is a direct link between the sslEnabled flag and the default port
that should be used by an address. The checks are currently set in two
places:

* Determine which port should be used
* Determine if SSL should be enabled

This commit polishes the initial proposal so that secureConnection is
only set if a protocol is available.

See gh-19109
@snicoll snicoll closed this in d386ee0 Nov 25, 2019
@snicoll
Copy link
Member

snicoll commented Nov 25, 2019

@Bono007 thank you for making your first contribution to Spring Boot. Agreed on that ssl flag, I've tried a few options and this one is the least bad option. I've moved its processing in a different place though, making secureConnection a Boolean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ssl.enabled is ignored when Rabbit is configured with an address with no protocol
4 participants