Skip to content

Instantly share code, notes, and snippets.

@abrader
Last active December 22, 2015 22:36
Show Gist options
  • Select an option

  • Save abrader/42d3ecf29806734588e2 to your computer and use it in GitHub Desktop.

Select an option

Save abrader/42d3ecf29806734588e2 to your computer and use it in GitHub Desktop.
f5_sslcertlist README

puppetlabs-f5_rest::f5_sslcertlist

SSL certificates management

Debugging

Troubleshooting issues when APIs are involved can be painful. Now the advertised providers within this module can pass you useful debugging info when you append the debug argument to your puppet run:

puppet apply --debug

or

puppet agent --debug

This can be used in conjuntion with other arguments

Stack trace

To get a complete Ruby stack trace from your puppet run, use or append the following argument:

puppet apply --trace

or

puppet agent --trace

This can be used in conjuntion with other arguments

f5_sslcertlist type

Virtual server Cookie persistence profile

Required parameters

ensure

Add or remove the F5 Client SSL Profile

Values accepted: "present", "absent"

ensure       => present,

name

TThe persistence profile name.

Values accepted: ???

name         => 'Example SSl Cert List',

Optional parameters

always_send

Specifies, when enabled, that the cookie persistence entry will be sent to the client on every response, rather than only on the first response. The default value is disabled.

Values accepted: "enabled", "disabled"

always_send   => 'enabled',

app_service

The application service to which the object belongs.

Values accepted: String

bundle_certificates_reference

Specifies a list of data about all the certificates in the bundle, if the certificate file is a bundle; otherwise, this field will be none.

Values accepted: Hash

bundle_certificates_reference => {'isSubcollection' => 'true', 'link' => 'https://localhost/mgmt/tm/sys/file/ssl-cert/~Common~f5-irule.crt/bundle-certificates?ver=11.6.0'},

cache_path

Path of the file in file-store.

Values accepted: String

cache_path => 'file:/tmp/something.cache',

certificate_key_curve_name

???

certificate_key_size

Specifies the key-size of the key associated with this certificate in bits.

Values accepted: Integer

certificate_key_size   => '1370',

checksum

Specifies a cryptographic hash or checksum of the file contents for use in verification of file integrity.

Values accepted: String

checksum                      => 'SHA1:1359:1306e84e1e6a2da53816cefe1f684b80d6be1e3e',

create_time

Specifies the time at which the file-object was created.

Values accepted: String

create_time                   => '2015-02-16T09:31:24Z',

created_by

Specifies the user who originally created the file-object.

Values accepted: String

created_by                    => 'root',

email

Specifies the contact email address associated with the certificate.

Values accepted: String

email                         => 'support@example.com',

expiration_date

Specifies the expiration date of the certificate.

Values accepted: Integer

expiration_date               => '1944422489',

expiration_string

Specifies a string representation of the expiration date of the certificate.

Values accepted: String

expiration_string             => 'Aug 13 21:21:29 2031 GMT',

fingerprint

Specifies the cryptographic fingerprint of the certificate.

Values accepted: String

is_bundle

Specifies whether the certificate file is a bundle (that is, whether it contains more than one certificate).

Values accepted: true, false

is_bundle     => true,

is_dynamic

TODO

Values accepted: true, false

is_dynamic     => true,

issuer

Specifies X509 information of the issuer of the certificate. If the cert is a bundle, this displays the issuer information for the primary (first) cert in the bundle.

Values accepted: String

issuer    => 'emailAddress=support@f5.com,CN=support.f5.com,OU=Product Development,O=F5 Networks,L=Seattle,ST=Washington,C=US',

key_type

Specifies the type of cryptographic key associated with this certificate.

Values accepted: String

key_type       => 'rsa-public',

last_update_time

Specifies the last time at which the file-object was updated/modified.

Values accepted: String

last_update_time    => '2015-02-16T09:31:24Z',

mode

Specifies the UNIX file permissions mode for the file associated with this file-object as a numerical value.

Values accepted: Integer

mode       => '33188',

revision

Specifies the latest revision of the file. The revision starts with 1 and gets incremented on each update.

Values accepted: Integer

revision        => '1',

serial_number

Specifies the serial number for the certificate.

Values accepted: String

serial_number       => 'c3:4c:63:f7:7f:d3:ae:e5',

ssl_cert_size

Specifies the size (in bytes) of the file associated with this file object.

Values accepted: Integer

ssl_cert_size                 => '1359',

subject

Specifies X509 information of the subject of the subject. If the cert is a bundle, this displays the subject information for the primary (first) cert in the bundle.

Values accepted: String

subject       => 'emailAddress=support@f5.com,CN=support.f5.com,OU=Product Development,O=F5 Networks,L=Seattle,ST=Washington,C=US',

subject_alternative_name

Specifies the standard X.509 extension as shown in RFC 2459.

Values accepted: String

subject_alternative_name    => 'DNS:*.example.org, DNS:*.example.net, DNS:*.example.com',

source_path

This attribute takes a URL path to where the source file exists

Values accepted: source_path => 'http://cert-server/cert_store/certs/vs_132.crt source_path => 'https://cert-server/cert_store/certs/vs_132.crt source_path => 'ftp://username:password@server/cert_store/certs/vs_132.crt source_path => 'file:/sys/path/to/file'

source_path      => 'file:/config/ssl/ssl.crt/f5-irule.crt',

system_path

Path of the file in system outside file-store.

Values accepted: ???

system_path                   => '/config/ssl/ssl.crt/f5-irule.crt',

tm_partition

TODO

Values accepted: String

updated_by

Specifies the user who last updated the file-object.

Values accepted: String

updated_by                    => 'root',

version

Specifies the X509 version of the certificate.

Values accepted: Integer

version                       => '1',

A f5_sslcertlist example

A full example pulled from puppet resource on the included profile /Common/wom-default-clientssl by F5.

f5_sslcertlist { '/Common/f5-irule.crt':
  ensure                        => 'present',
  bundle_certificates_reference => {'isSubcollection' => 'true', 'link' => 'https://localhost/mgmt/tm/sys/file/ssl-cert/~Common~f5-irule.crt/bundle-certificates?ver=11.6.0'},
  checksum                      => 'SHA1:1359:1306e84e1e6a2da53816cefe1f684b80d6be1e3e',
  create_time                   => '2015-02-16T09:31:24Z',
  created_by                    => 'root',
  email                         => 'support@f5.com',
  expiration_date               => '1944422489',
  expiration_string             => 'Aug 13 21:21:29 2031 GMT',
  is_bundle                     => 'false',
  issuer                        => 'emailAddress=support@f5.com,CN=support.f5.com,OU=Product Development,O=F5 Networks,L=Seattle,ST=Washington,C=US',
  key_type                      => 'rsa-public',
  last_update_time              => '2015-02-16T09:31:24Z',
  mode                          => '33188',
  revision                      => '1',
  serial_number                 => 'c3:4c:63:f7:7f:d3:ae:e5',
  ssl_cert_size                 => '1359',
  subject                       => 'emailAddress=support@f5.com,CN=support.f5.com,OU=Product Development,O=F5 Networks,L=Seattle,ST=Washington,C=US',
  system_path                   => '/config/ssl/ssl.crt/f5-irule.crt',
  updated_by                    => 'root',
  version                       => '1',
}

--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment