项目作者: rakutentech

项目描述 :
Java Libraries Chef Cookbook
高级语言: Ruby
项目地址: git://github.com/rakutentech/chef_java_libs.git
创建时间: 2017-03-22T12:15:57Z
项目社区:https://github.com/rakutentech/chef_java_libs

开源协议:Apache License 2.0

下载


java_libs

Build Status

Description

This cookbook contains LWRPs and HWRPs for handling optional common configuration of the JVM. The LWRPs and/or libraries in this cookbook should be referenced from recipes that run after the installation and configuration of Java via the cookbook at https://github.com/socrata-cookbooks/java.

Resources/Providers

java_certificate LWRP

This cookbook contains the java_certificate LWRP which simplifies adding certificates to a java keystore. It can also populate the keystore with a certificate retrieved from a given SSL end-point. It defaults to the default keystore <java_home>/jre/lib/security/cacerts with the default password if a specific keystore is not provided.

Actions

  • :install: installs a certificate.
  • :remove: removes a certificate.

Attribute Parameters

  • cert_alias: The alias of the certificate in the keystore. This defaults to the name of the resource.

Optional parameters:

  • java_home: the java home directory. Defaults to node['java']['java_home'].
  • keystore_path: the keystore path. Defaults to node['java']['java_home']/jre/lib/security/cacerts.
  • keystore_passwd: the keystore password. Defaults to ‘changeit’ as specified by the Java Documentation.
  • server_name: server name to use for the SNI header (openssl s_client parameter -servername).

Only one of the following

  • cert_data: the certificate data to install
  • cert_file: path to a certificate file to install
  • ssl_endpoint: an SSL end-point from which to download the certificate

Examples

Simple example:

  1. java_certificate 'Install LDAP server certificate to Java CA keystore for Jenkins' do
  2. cert_alias node['jenkins']['ldap']['url'][/\/\/(.*)/, 1]
  3. ssl_endpoint node['jenkins']['ldap']['url']
  4. action :install
  5. notifies :restart, 'runit_service[jenkins]', :delayed
  6. end

SNI (Server Name Indication) support example:

  1. java_certificate 'Install Self Signed server certificate with SNI Support' do
  2. cert_alias 'bar.com'
  3. ssl_endpoint 'foo.com'
  4. server_name 'bar.com'
  5. action :install
  6. end