VoxBot
04/07/2023, 12:05 PMYury Bushmelev
04/07/2023, 12:12 PMVoxBot
04/07/2023, 12:13 PMYury Bushmelev
04/07/2023, 12:13 PMVoxBot
04/07/2023, 12:13 PMYury Bushmelev
04/07/2023, 12:13 PMfile
as I did for nowVoxBot
04/07/2023, 12:13 PMYury Bushmelev
04/07/2023, 12:14 PMxcontext
itVoxBot
04/07/2023, 12:14 PMYury Bushmelev
04/07/2023, 12:15 PMSlackbot
04/07/2023, 12:47 PMYury Bushmelev
04/07/2023, 12:54 PMVoxBot
04/07/2023, 1:31 PMVoxBot
04/07/2023, 1:32 PMVoxBot
04/07/2023, 2:06 PMgem build
supports --strict and --verboseVoxBot
04/07/2023, 2:09 PMOleksandr Lytvyn
04/07/2023, 2:15 PMserver {
listen *:443 ssl;
server_name <http://puppet-webhook.example.com|puppet-webhook.example.com>;
access_log /var/log/nginx/puppet-webhook-access.log;
error_log /var/log/nginx/puppet-webhook-error.log;
location /api/v1/r10k/environment {
if ( $request_method !~ ^(POST)$ ) {
return 405;
}
proxy_pass <http://puppet.example.in:8085/api/v1/r10k/environment>;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
ssl_certificate /etc/ssl/certs/example.com.crt;
ssl_certificate_key /etc/ssl/private/example.com.key;
}
Use-case: i have a few servers which perform a role of Nginx reverse proxy for webhooks from Bitbucket and other sources. All virtual hosts are pretty basic (nothing fancy). Right now all virtual hosts created manually. I would like to "Puppetize" configuration via nginx::resource::server
Problem: i checked code of module "*puppet-nginx*" and i wasn't able to find / understand how to allow only POST request method. Because in my use-case i need to configure webhooks which perform only POST method, i would like to specifically restrict/allow POST only for additional security.
Is there way how to do it? Maybe i'm missing something? Thanks
PS. For "puppetlabs-apache" can see "modsec_allowed_methods" (https://github.com/puppetlabs/puppetlabs-apache/blob/113ecc03dfc986f3764a2836fe50227c5fc84253/manifests/vhost.pp#L562 & https://github.com/puppetlabs/puppetlabs-apache/blob/2aa768962418877885d2343b56a095b0811b1832/spec/defines/vhost_spec.rb#L1338) but i cannot find equivalent in "*puppet-nginx*" ๐Dr Bunsen Honeydew
04/07/2023, 2:15 PMpuppet-nginx
module at https://forge.puppet.com/puppet/nginx?src=slack&channel=voxpupuliOleksandr Lytvyn
04/07/2023, 2:15 PMserver {
listen *:443 ssl;
server_name <http://puppet-webhook.example.com|puppet-webhook.example.com>;
access_log /var/log/nginx/puppet-webhook-access.log;
error_log /var/log/nginx/puppet-webhook-error.log;
location /api/v1/r10k/environment {
if ( $request_method !~ ^(POST)$ ) {
return 405;
}
proxy_pass <http://puppet.example.in:8085/api/v1/r10k/environment>;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
ssl_certificate /etc/ssl/certs/example.com.crt;
ssl_certificate_key /etc/ssl/private/example.com.key;
}
Use-case: i have a few servers which perform a role of Nginx reverse proxy for webhooks from Bitbucket and other sources. All virtual hosts are pretty basic (nothing fancy). Right now all virtual hosts created manually. I would like to "Puppetize" configuration via nginx::resource::server
Problem: i checked code of module "*puppet-nginx*" and i wasn't able to find / understand how to allow only POST request method. Because in my use-case i need to configure webhooks which perform only POST method, i would like to specifically restrict/allow POST only for additional security.
Is there way how to do it? Maybe i'm missing something? Thanks
PS. For "puppetlabs-apache" can see "modsec_allowed_methods" (https://github.com/puppetlabs/puppetlabs-apache/blob/113ecc03dfc986f3764a2836fe50227c5fc84253/manifests/vhost.pp#L562 & https://github.com/puppetlabs/puppetlabs-apache/blob/2aa768962418877885d2343b56a095b0811b1832/spec/defines/vhost_spec.rb#L1338) but i cannot find equivalent in "*puppet-nginx*" ๐VoxBot
04/07/2023, 2:15 PMVoxBot
04/07/2023, 2:17 PMVoxBot
04/07/2023, 2:18 PMvchepkov
04/07/2023, 2:18 PMlocation_custom_cfg
Oleksandr Lytvyn
04/07/2023, 2:21 PMOptional[Hash] $location_custom_cfg = undef,
Optional[Hash] $location_cfg_prepend = undef,
Optional[Hash] $location_cfg_append = undef,
Optional[Hash] $location_custom_cfg_prepend = undef,
Optional[Hash] $location_custom_cfg_append = undef,
Optional[Variant[Array[String], String]] $raw_prepend = undef,
Optional[Variant[Array[String], String]] $raw_append = undef,
Optional[Variant[Array[String], String]] $location_raw_prepend = undef,
Optional[Variant[Array[String], String]] $location_raw_append = undef,
Maybe someone previously had same case before and resolved itOleksandr Lytvyn
04/07/2023, 2:26 PMOptional[Hash] $location_custom_cfg = undef,
Optional[Hash] $location_cfg_prepend = undef,
Optional[Hash] $location_cfg_append = undef,
Optional[Hash] $location_custom_cfg_prepend = undef,
Optional[Hash] $location_custom_cfg_append = undef,
Optional[Variant[Array[String], String]] $raw_prepend = undef,
Optional[Variant[Array[String], String]] $raw_append = undef,
Optional[Variant[Array[String], String]] $location_raw_prepend = undef,
Optional[Variant[Array[String], String]] $location_raw_append = undef,
Maybe someone previously had same case before and resolved itVoxBot
04/07/2023, 2:28 PMVoxBot
04/07/2023, 2:29 PMOleksandr Lytvyn
04/07/2023, 2:35 PMYury Bushmelev
04/07/2023, 2:49 PMVoxBot
04/07/2023, 2:54 PM