Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-8731) Allow CIDRs for proxy_ips/internal_proxy in remoteip #1891

Merged
merged 3 commits into from
Mar 8, 2019

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Mar 8, 2019

The recent addition of data types for this module [1] introduced an
issue, where CIDRs are no longer allowed. This allows those sort of
values.

This addresses https://tickets.puppetlabs.com/browse/MODULES-8731

[1] 1503035#diff-c2ea3c67760696a0d67bab9fb81757c6

The recent addition of data types for this module [1] introduced an
issue, where CIDRs are no longer allowed. This allows those sort of
values.

[1] puppetlabs@1503035#diff-c2ea3c67760696a0d67bab9fb81757c6
The template and module data types for the internal_proxy parameter
didn't match. This makes it so.
Copy link

@runejuhl runejuhl left a comment

Choose a reason for hiding this comment

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

LGTM

@hjensas
Copy link

hjensas commented Mar 8, 2019

Looks good to me. Thanks!

Copy link

@iglov iglov left a comment

Choose a reason for hiding this comment

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

There is one extra space between $internal_proxy, $proxy_ips and them types :)

@JAORMX
Copy link
Contributor Author

JAORMX commented Mar 8, 2019

@iglov could you comment on the code? I'm not sure what space you're referring to.

@towo
Copy link
Contributor

towo commented Mar 8, 2019

@JAORMX I think @iglov is mentioning that the type of the variable and the variables themselves have a two space separator.

@runejuhl
Copy link

runejuhl commented Mar 8, 2019

Ah, that was hard to see. Yes, manifests/mod/remoteip.pp uses two spaces for variable alignment, where a single space would do.

I was using two characters while one was enough.
@JAORMX
Copy link
Contributor Author

JAORMX commented Mar 8, 2019

@iglov @towo @runejuhl ah! got it! I pushed an update.

Optional[Stdlib::Absolutepath] $trusted_proxy_list = undef,
Optional[String] $apache_version = undef,
String $header = 'X-Forwarded-For',
Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]] $internal_proxy = undef,
Copy link
Contributor

Choose a reason for hiding this comment

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

Would Variant[Stdlib::Host,Stdlib::IP::Address::V4::CIDR,Stdlib::IP::Address::V6::CIDR] better show intent?
Stdlib::Host already allows IP addresses (oddly via Stdlib::Compat::Ip_address instead of Stdlib::IP::Address::Nosubnet). The overlap doesn't really matter, and someone should probably submit a Stdlib::IP::Address::CIDR type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you prefer that I change this to your suggestion? Or should we leave this as-is?

@alexjfisher
Copy link
Contributor

Given the current limitations of the Stdlib types, I think this is a perfectly acceptable fix in this module.

Copy link

@iglov iglov left a comment

Choose a reason for hiding this comment

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

Now looks nice, thank u 👍

@tphoney
Copy link
Contributor

tphoney commented Mar 8, 2019

Wowsa, that a lot of teamwork. Great work to all involved. 👏
Special thanks to @JAORMX

@tphoney tphoney merged commit 7a33327 into puppetlabs:master Mar 8, 2019
lionce pushed a commit to lionce/puppetlabs-apache that referenced this pull request Mar 15, 2019
…uppetlabs#1891)

* (MODULES-8731) Allow CIDRs for proxy_ips/internal_proxy in remoteip
The recent addition of data types for this module [1] introduced an
issue, where CIDRs are no longer allowed. This allows those sort of
values.
[1] puppetlabs@1503035#diff-c2ea3c67760696a0d67bab9fb81757c6
* Make internal_proxy data type in template match module
The template and module data types for the internal_proxy parameter
didn't match. This makes it so.
thechristschn pushed a commit to thechristschn/puppetlabs-apache that referenced this pull request May 23, 2020
cegeka-jenkins pushed a commit to cegeka/puppet-apache that referenced this pull request Jul 15, 2020
…uppetlabs#1891)

* (MODULES-8731) Allow CIDRs for proxy_ips/internal_proxy in remoteip
The recent addition of data types for this module [1] introduced an
issue, where CIDRs are no longer allowed. This allows those sort of
values.
[1] puppetlabs@1503035#diff-c2ea3c67760696a0d67bab9fb81757c6
* Make internal_proxy data type in template match module
The template and module data types for the internal_proxy parameter
didn't match. This makes it so.
cegeka-jenkins pushed a commit to cegeka/puppet-apache that referenced this pull request Jul 15, 2020
daveseff pushed a commit to daveseff/puppetlabs-apache that referenced this pull request Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants