Puppet CA: Certificates explained. Thomas Gelf - PuppetCamp Düsseldorf 2014



Similar documents
DoD Public Key Enablement (PKE) Quick Reference Guide. Securing Apache HTTP with mod_ssl for Linux

Installing an SSL certificate on the InfoVaultz Cloud Appliance

X.509 and SSL. A look into the complex world of X.509 and SSL UUASC 07/05/07. Phil Dibowitz

esync - Receiving data over HTTPS

To enable https for appliance

CentOS. Apache. 1 de 8. Pricing Features Customers Help & Community. Sign Up Login Help & Community. Articles & Tutorials. Questions. Chat.

User s guide. APACHE SSL Linux. Using non-qualified certificates with APACHE SSL Linux. version 1.3 UNIZETO TECHNOLOGIES S.A.

GlobalSign Enterprise Solutions Google Apps Authentication User Guide

SBClient SSL. Ehab AbuShmais

e-cert (Server) User Guide For Apache Web Server

Creating Certificate Authorities and self-signed SSL certificates

Apache SSL Certificate Deployment Guide

Laboratory Exercises VI: SSL/TLS - Configuring Apache Server

Certificate technology on Pulse Secure Access

SSL Certificates in IPBrick

Acano solution. Certificate Guidelines R1.7. for Single Combined Acano Server Deployments. December H


This section describes how to use SSL Certificates with SOA Gateway running on Linux.

Certificate technology on Junos Pulse Secure Access

Digital Certificates (Public Key Infrastructure) Reshma Afshar Indiana State University

Sun Java System Web Server 6.1 Using Self-Signed OpenSSL Certificate. Brent Wagner, Seeds of Genius October 2007

Apache Security with SSL Using Ubuntu

Do Web Browsers Obey Best Practices When Validating Digital Certificates?

Implementing HTTPS in CONTENTdm 6 September 5, 2012

LAB :: Secure HTTP traffic using Secure Sockets Layer (SSL) Certificate

Installing Apache as an HTTP Proxy to the local port of the Secure Agent s Process Server

Securing Web Access with a Private Certificate Authority

LAB :: Secure HTTP traffic using Secure Sockets Layer (SSL) Certificate

COMP 3704 Computer Security

Apache Security with SSL Using Linux

Enterprise SSL Support

Chapter 7 Managing Users, Authentication, and Certificates

Brocade Engineering. PKI Tutorial. Jim Kleinsteiber. February 6, Page 1

Purpose of PKI PUBLIC KEY INFRASTRUCTURE (PKI) Terminology in PKIs. Chain of Certificates

Protect your CollabNet TeamForge site

CERTIFICATE-BASED SINGLE SIGN-ON FOR EMC MY DOCUMENTUM FOR MICROSOFT OUTLOOK USING CA SITEMINDER

Certificate Management. PAN-OS Administrator s Guide. Version 7.0

Junio SSL WebLogic Oracle. Guía de Instalación. Junio, SSL WebLogic Oracle Guía de Instalación CONFIDENCIAL Página 1 de 19

Red Hat Linux Guide to Installing Root Certificates, Generating CSR and Installing SSL Certificate

SSL Certificate Generation

FreeBSD OpenVPN Server/Routed - Secure Computing Wiki

HP ALM. Software Version: External Authentication Configuration Guide

Encrypted Connections

Creation and Management of Certificates

SolarWinds Technical Reference

Avoid the SSLippery Slope of Default SSL

Securing Your Apache Web Server With a Thawte Digital Certificate

By default, STRM provides an untrusted SSL certificate. You can replace the untrusted SSL certificate with a self-signed or trusted certificate.

Secure Traffic Inspection

What s Your HTTPS Grade? A Case Study of HTTPS/SSL at Mid Michigan Community College. Brandon bkish@midmich.edu

Generating SSH Keys and SSL Certificates for ROS and ROX Using Windows AN22

Entrust Certificate Services. Java Code Signing. User Guide. Date of Issue: December Document issue: 2.0

Migrating the SSL Offloading Configuration of the Alteon Application Switch 2424-SSL to AlteonOS version

Customizing SSL in CA WCC r11.3 This document contains guidelines for customizing SSL access to CA Workload Control Center (CA WCC) r11.3.

SSL Certificate and Key Management

Go to Policy/Global Properties/SmartDashboard Customization, click Configure. In Certificates and PKI properties, change host_certs_key_size to 2048

Security Workshop. Apache + SSL exercises in Ubuntu. 1 Install apache2 and enable SSL 2. 2 Generate a Local Certificate 2

GlobalSign Solutions

Acano solution. Certificate Guidelines R1.7. for Single Split Acano Server Deployments. December F

The IVE also supports using the following additional features with CA certificates:

Asymmetric cryptosystems fundamental problem: authentication of public keys

SSL Configuration Best Practices for SAS Visual Analytics 7.1 Web Applications and SAS LASR Authorization Service

SSL/TLS Hands-on Thomas Herlea

Factory Application Certificates and Keys Products: SB700EX, SB70LC

SSL Report: ebfl.srpskabanka.rs ( )

Apache, SSL and Digital Signatures Using FreeBSD

Using EMC Unisphere in a Web Browsing Environment: Browser and Security Settings to Improve the Experience

BEA Weblogic Guide to Installing Root Certificates, Generating CSR and Installing SSL Certificate

Integrated SSL Scanning

X.509 Certificate Generator User Manual

SecuritySpy Setting Up SecuritySpy Over SSL

webmethods Certificate Toolkit

Setting Up SSL From Client to Web Server and Plugin to WAS

SSL implementieren aber sicher!

Configuring DoD PKI. High-level for installing DoD PKI trust points. Details for installing DoD PKI trust points

Technical specification

SSL Tunnels. Introduction

Websense Content Gateway HTTPS Configuration

WebLogic Server 6.1: How to configure SSL for PeopleSoft Application

Contents Set up Cassandra Cluster using Datastax Community Edition on Amazon EC2 Installing OpsCenter on Amazon AMI References Contact

Acano solution. Acano Solution Installation Guide. Acano. January B

Security certificate management

ViMP 3.0. SSL Configuration in Apache 2.2. Author: ViMP GmbH

Analysis of the HTTPS Certificate Ecosystem

Configuring Secure Socket Layer (SSL)

Certificates and network security

CHAPTER 7 SSL CONFIGURATION AND TESTING

[SMO-SFO-ICO-PE-046-GU-

SSL Configuration on Weblogic Oracle FLEXCUBE Universal Banking Release [August] [2014]

HOST LINKS SSL G&R. Using SSL for security with G&R products.

Configuring SSL Termination

LoadMaster SSL Certificate Quickstart Guide

How to configure SSL proxying in Zorp 3 F5

User Guide Supplement. S/MIME Support Package for BlackBerry Smartphones BlackBerry Pearl 8100 Series

Domino and Internet. Security. IBM Collaboration Solutions. Ask the Experts 12/16/2014

SSL Troubleshooting with Wireshark and Tshark

Public Key Infrastructure

Transcription:

Puppet CA: Certificates explained Thomas Gelf - PuppetCamp Düsseldorf 2014

Thomas Gelf, nice to meet you! joined NETWAYS in 2010 formerly more than ten years of... web (application) development routing/switching: bank/isp backbones ISP: Mail, Hosting, SIP-Carrier, IPv6...

Origins nationality: Italian mother tongue: German kind of. SOUTH TYROLEAN!!!

Me and Puppet first Puppet steps with 0.24 talks, articles, blog posts trainer, consultant over-certified

Me @ PuppetConf 2014 Had a great time, the conference was awesome! PuppetConf 2015 will be in Portland - see you there :)

NETWAYS

Netways and Puppet German Puppet Labs Training Partner Trainings Consulting Workshops

http://www.netways.de/training Puppet Trainings

What this talk is all about certificates puppet certificates REST API distributed environments security issues and their consequences certificate lifecyle

WHY SHOULD I CARE?

Running Puppet Enterprise?

CERTIFICATES

Public Key Infrastructure - PKI everybody has it's own private key signs or encrypts a message verification/decryption uses public key algorithms: RSA, DSA...

PKI - Wikipedia

X.509 describes how our Puppet PKI works https:// - you use it every day ITU-T standard defines a strict hierarchy a tree instead of a "web of trust" X509v3: allows extensions

Certificate structure (distinguished) name serial number algorythm issuer validity: FROM - TO...

The distinguished name: DN just a string often a DNS name could also be "CA: puppet master" something you should care about!

The revocation list allows to invalidate certificates does so based on serial numbers important if you "loose" certificates

.csr: certificate signing request, Base64 Filename extensions -----BEGIN CERTIFICATE REQUEST-----... -----END CERTIFICATE REQUEST-----.pem: a certificate, Base64 -----BEGIN CERTIFICATE----- Puppet uses.pem also for private keys: -----BEGIN RSA PRIVATE KEY-----

PUPPET CERTIFICATES

Puppet certificates: archeology Want to see a fresh new Puppet CA? Try it out! mkdir /tmp/ssltest puppet master --no-daemonize --verbose \ --ssldir /tmp/ssltest \ --certname test.example.com

Puppet certificates: archeology A fresh new Puppet CA!

Puppet certificates: archeology ls -l /tmp/ssltest

Same thing for the agent puppet agent --test \ --ssldir /tmp/sslagent \ --certname test.example.com

We all know the basics puppet cert list puppet cert list --all puppet cert sign test.example.com puppet cert revoke test.example.com puppet cert clean test.example.com find./ -name 'test.example.com*' --delete

SSL directories puppet master --configprint ssldir puppet agent --configprint ssldir manual configuration makes sense think about user permissions ~/.puppet, /var/lib/puppet master and agent on the same host passenger VS debug (--no-daemonize)

Let's dump a certificate openssl x509 -in testexample.com.pem -noout -text puppet cert print test.example.com

Custom data in your certificates https://docs.puppetlabs.com/puppet/latest/reference /ssl_attributes_extensions.html /etc/puppet/csr_attributes.yaml custom attributes in your CSR

MCollective

Study security guidelines! Study security guidelines! Study security guidelines! STUDY SECURITY GUIDELINES! puppetlabs.com/mcollective/security-overview

Get inspired by existing modules make sure you understood them or write your own ones re-use Puppet certificates read about trust and STUDY THE SECURITY GUIDELINES!

THE REST API

It's a web application! <VirtualHost *:8140> SSLEngine on SSLProtocol SSLCipherSuite SSLHonorCipherOrder ALL -SSLv2 -SSLv3 EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+... on SSLCertificateFile $ssldir/certs/$fqdn.pem SSLCertificateKeyFile $ssldir/private_keys/$fqdn.pem SSLCertificateChainFile $ssldir/ca/ca_crt.pem SSLCACertificateFile $ssldir/ca/ca_crt.pem SSLCARevocationFile $ssldir/ca/ca_crl.pem SSLVerifyClient optional SSLVerifyDepth 1 SSLOptions +StdEnvVars +ExportCertData

The Rest API # http://docs.puppetlabs.com/guides/rest_api.html https://master:8140/{environment}/{resource}/{key} available on puppet master and on VERY ancient agents (listen=true)

Puppet REST API URI examples GET /{environment}/catalog/{node certificate name} GET /{environment}/file_bucket_file/md5/{checksum} GET /{environment}/facts/{node certname}

Permissions http://docs.puppetlabs.com/guides/rest_auth_conf.html # auth.conf # allow all nodes to store their own reports path ~ ^/report/([^/]+)$ method save allow $1

SSL-enabled curl example Use your certificates and discover the API: curl \ --cert /var/lib/puppet/ssl/certs/host.pem \ --key /var/lib/puppet/ssl/private_keys/host.pem \ --cacert /var/lib/puppet/ssl/ca/ca_crt.pem \ -k -H "Accept: yaml" \ https://master:8140/production/facts/somehostname

DISTRIBUTED SETUP

Puppet Advanced* Training

One CA is more than enough: Configuration for such a setup [master] ca = false [agent] ca_server = ca.example.com Optionally, still experimental: DNS SRV records

Chain of trust Since 3.2.1 you can use intermediate CAs to delegate trust # http://docs.puppetlabs.com/puppet/3/reference\ # /config_ssl_external_ca.html [agent] ssl_client_ca_auth = $certdir/issuer.pem Tell Apache about your chain: SSLCertificateChainFile "/path/to/ca_bundle.pem"

It could look like this +------------------------+ Root self-signed CA +------+----------+------+ +----------+ +------------+ v v +-----------------+ +----------------+ Master CA Agent CA +--------+--------+ +--------+-------+ v v +-----------------+ +----------------+ Master SSL Cert Agent SSL Cert +-----------------+ +----------------+

SSL Professional? integrate it in your existing hierarchy use your own toolchain ship signed certificates (carefully)

SECURITY

Puppet and security issues Read Security Disclosures! https://puppetlabs.com/security/

Thank Heartbleed! docs.puppetlabs.com/trouble_remediate _heartbleed_overview.html docs.puppetlabs.com/latest/reference /ssl_regenerate_certificates.html

A specific security problem Very interesting and worth to read: CVE-2011-3872 "In versions prior to 2.6.12 and 2.7.6, the Puppet CA will improperly insert any certdnsnames values into agent certificates as well as master certificates. This bug was introduced in Puppet 0.24.0." puppet master --configprint certdnsnames puppet, puppet.example.com

Study it! http://links.puppetlabs.com/cve20113872_remediation Have a look at the remediation toolkit And to be on the safe side, check your agent certs: openssl x509 -in test.example.com.pem -noout -text \ grep 'Subject Alt' -A 1 X509v3 Subject Alternative Name: DNS:test.example.com, DNS:puppet, DNS:puppet.example.com

WARNING "upgrading" doesn't fix a mess like this old certificates would remain valid you have to switch to a new CA......and this leads us to the next topic

CA LIFECYCLE MANAGEMENT

Bad news Puppet should allow for automatic resigning of SSL certs http://projects.puppetlabs.com/issues/7272 There is no such thing in Puppet "...will be available with Puppet Sites"

YOU ARE ON YOUR OWN

One way of replacing a CA stop all agents throw away their certificates create a new CA with a new name start your agents sign their new CSRs

CA... master: rm -rf $(puppet master --configprint ssldir) agents: rm -rf $(puppet agent --configprint ssldir) # default ca_name: "Puppet CA: <master certname>" CERTNAME=$(puppet master --configprint certname) TS=$(date +%Y-%m-%d) puppet cert --generate \ --ca_name "Puppet CA: $CERTNAME <$TS>" $CERTNAME \ --dns_alt_names puppet,puppet.example.com puppet cert --allow-dns-alt-names sign $CERTNAME

You could also get inspired by the remediation kits write your own SSH loop fix it with MCollective (carefully!) open new feature requests

Don't like trouble? Before generating your CA: [master] ca_ttl = 20y Leave your company in time NB: expiration > 2038-01-19 == bad idea

BTW: WE ARE HIRING ;-)

Thank you for your attention!

Questions? class puppetcamp { } package { 'questions': ensure => answered }