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

Using SSL breaks the REST API control of XLDeploy #133

Open
FireDrunk opened this issue Sep 9, 2016 · 0 comments
Open

Using SSL breaks the REST API control of XLDeploy #133

FireDrunk opened this issue Sep 9, 2016 · 0 comments

Comments

@FireDrunk
Copy link

Because all the types in client lack the ssl and verify_ssl attribute, the rest types in Ruby are loaded with the defaults. Even though the rest_url is properly set with HTTPS, the underlying Ruby code will use the default setting of not using SSL.

https://github.com/xebialabs-community/puppet-xldeploy/blob/master/manifests/client/config_ci.pp

Needs to be:

# define: config_ci
#
# This define handles the export of xldeploy_ci if this module is used in conjunction with shared resources
# The trick here is that the puppet run is able to determine if a xldeploy ci is too old to maintain
# and should be removed from the xldeploy configuration once the last export is too long ago.
#
#
# == parameters
#
# [*type*]
# [*properties*]
# [*discovery*]
# [*discovery_max_wait*]
# [*id*]
# [*export_timestamp*]
# [*remove_when_expired*]
# [*export_maxage*]
define xldeploy::client::config_ci(
  $type,
  $ensure                 = 'present',
  $properties             = {},
  $rest_url               = $xldeploy::client::rest_url,
  $ssl                  => $xldeploy::client::ssl,
  $verifySsl                  => $xldeploy::client::verifySsl,
  $discovery              = false,
  $discovery_max_wait     = '120',
  $use_exported_resources = $xldeploy::client::use_exported_resources
){

  # if the age exceeds the export_maxage and remove_when_expired is set to true then set ensure to absent
  if str2bool($use_exported_resources) {
    @@xldeploy::client::exported_ci{"${::hostname}__${name}":
      type               => $type,
      properties         => $properties,
      rest_url           => $rest_url,
      discovery          => $discovery,
      discovery_max_wait => $discovery_max_wait,
      ssl                  => $ssl,
      verify_ssl                  => $verifySsl,
    }

  }else{
    xldeploy_ci{ $name:
      ensure             => $ensure,
      type               => $type,
      properties         => $properties,
      discovery          => $discovery,
      discovery_max_wait => $discovery_max_wait,
      rest_url           => $rest_url,
      ssl                  => $ssl,
      verify_ssl                  => $verifySsl,
      }
    }
}

This is true for all the types in the same directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant