Commit Graph

224 Commits

Author SHA1 Message Date
Euan Kemp
4e5a2d1646 issuer/dns/route53: append our user-agent 2018-04-06 18:09:17 -07:00
Euan Kemp
9c3b4e83b4 pkg/util/kube: set user-agent
This should make it slightly easier to filter api-server logs for
cert-manager activity
2018-04-06 18:09:17 -07:00
Euan Kemp
4d9b0e836e issuer/dns/akamai: set user-agent 2018-04-06 18:09:17 -07:00
Euan Kemp
34391f0726 issuer/dns/cloudflare: set user-agent 2018-04-06 18:09:17 -07:00
Euan Kemp
f122c9c9c2 issuer/acme: add a timeout to the http client 2018-04-06 18:09:17 -07:00
Euan Kemp
7f12fb346c issuer/acme: move 'user-agent' logic to util
This logic should be shared by things like the aws client as well.
2018-04-06 18:09:11 -07:00
jetstack-bot
acfc2f78d1
Merge pull request #322 from yieldlab/akamai-support
Add ACME DNS-01 provider for Akamai FastDNS
2018-04-04 18:26:22 +01:00
James Munnelly
e87ff94458 Fix import paths and use util.AppVersion for user agent version 2018-04-04 12:42:21 +01:00
Jacob Hoffman-Andrews
8baac71058 Add a meaningful User-Agent. 2018-03-30 14:18:38 -07:00
jetstack-bot
95883c47dd
Merge pull request #363 from euank/nonstatic-aws-creds
Allow non-static AWS credentials for Route 53, gated by "ambient credentials" flags
2018-03-26 12:35:18 +01:00
jetstack-bot
977b038d2b
Merge pull request #408 from kragniz/resource-limits
Add limits to http validation pod
2018-03-26 10:47:51 +01:00
Euan Kemp
faac0701ab issuer/route53: respect 'ambient' flag for region
This notably results in the region being a required field if the
'ambient' option is not set for a given issuer.
2018-03-24 14:16:33 -07:00
Louis Taylor
e8d6861d31
Increase memory limits 2018-03-24 00:24:51 +00:00
Euan Kemp
dd48f4aa05 issuer/acme/dns: add ambient=false unit test 2018-03-23 14:30:43 -07:00
Euan Kemp
971ef4f198 issuer/route53: remove unused integ test
I'm convinced this test was never run and also did not provide any
significant value in this project.
2018-03-23 14:30:43 -07:00
Euan Kemp
0d39da5174 issuer/route53: improve logging hosted zone errs 2018-03-23 14:30:43 -07:00
Euan Kemp
0fb787eae7 controller: add ambient issuer flags and feature
This implements ambient credential support for AWS, gated behind flags
for issuers and cluster issuers.

This adds the pair of flags discussed in
https://github.com/jetstack/cert-manager/issues/308.

It provides an implementation for those flag's effects for the route53
solver.
2018-03-23 14:30:43 -07:00
Euan Kemp
0e6ca80a70 issuer/route53: remove zone-id env test
The zone id is never read from the environment; this test tests
functionality which doesn't exist in the actual software, so there's no
point in having it.
2018-03-23 14:30:43 -07:00
Matt Moyer
14c109af46 Drop unused NewDNSProvider() method.
Signed-off-by: Matt Moyer <moyer@heptio.com>
2018-03-23 14:30:42 -07:00
Matt Moyer
1236a93d1e Allow non-static AWS credentials for Route 53.
This change maintains backwards compatibility, but makes the `accessKeyID` and `secretAccessKeySecretRef` fields of the `route53` DNS provider optional.
If not provided, AWS credentials will be loaded from `AWS_*` environment variables or the EC2 metadata service.
This should also work for things that impersonate the EC2 metadata service, such as [kube2iam](https://github.com/jtblin/kube2iam) and [kail](https://github.com/uswitch/kiam).

Signed-off-by: Matt Moyer <moyer@heptio.com>
2018-03-23 14:30:42 -07:00
James Munnelly
34ae73615b Run hack/update-codegen.sh 2018-03-23 18:30:49 +00:00
Louis Taylor
d6c7244028
Add limits to http validation pod 2018-03-23 16:30:34 +00:00
Euan Kemp
78b1b8d69d issuer/acme/dns: refactor provider construction
Previously, each provider's package-level 'New' function was being
called.

That made mocking it out for a different function that records data or
returns different output quite difficult.

This PR introduces an additional layer of abstraction in the form of
effectively a vtable struct for the dns providers. It's defaulted to the
same package-level constructors as before, but unit tests in the dns
package can easily override it.

A new test for the previously-introduced route53 trimming behavior is
also added.
2018-03-14 01:25:15 -07:00
Euan Kemp
8aefbb1470 Trim aws credentials for acme dns route53 provider
AWS credentials don't contain whitespace, and it's very easy to
accidentally include spaces or newlines at the end of secrets.
2018-03-14 01:09:25 -07:00
jetstack-ci-bot
ce9e5ede2b
Merge pull request #351 from jonboulle/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix various typos in spelling of Certificate
2018-03-12 10:14:09 +00:00
Adarsh J
c4a93bcff5 Use Google's DNS IPs instead of domain
If /etc/resolv.conf does not have any entries, then its unlikely
that the domain name representation of google's DNS would get
resolved too. Hence using IP address directly makes sense.
2018-02-28 02:06:02 +05:30
Jonathan Boulle
526d31bbc0 Fix various typos in spelling of Certificate 2018-02-26 20:07:06 +01:00
jetstack-ci-bot
7533e0e329
Merge pull request #332 from munnerz/err-prefixed-events
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Rename Event types to be prefixed 'Err' instead of 'Error' for brevity

**What this PR does / why we need it**:

Shortens the event type names we use to be prefixed 'Err' instead of 'Error'

**Special notes for your reviewer**:

This brings us in-line with the issuer and cluster issuer controllers, and other controllers in Kubernetes.

**Release note**:
```release-note
Rename Event types to be prefixed 'Err' instead of 'Error' for brevity
```
2018-02-22 10:21:22 +00:00
Tom Wieczorek
f681f5a6b1
Add ACME DNS-01 provider for Akamai FastDNS 2018-02-22 09:50:11 +01:00
James Munnelly
ce0384a196 Rename Event types to be prefixed 'Err' instead of 'Error' for brevity 2018-02-22 07:53:51 +00:00
James Munnelly
70e7c5265b Make existing TLS certificate check emit a Normal event instead of Warning when the existing certificate is invalid 2018-02-22 07:48:58 +00:00
jetstack-ci-bot
058a259f7a
Merge pull request #321 from twz123/fix-log-warning
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Log potential errors while waiting for DNS record propagation

**What this PR does / why we need it**:
This helps debugging, e.g. if there are network problems.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2018-02-21 13:39:28 +00:00
jetstack-ci-bot
b18acf1d7e
Merge pull request #246 from mwieczorek/azure-dns
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Added Azure DNS support for DNS01 challange 

**What this PR does / why we need it**:
Adds another provider (Azure DNS) for DNS01 challange

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #230 

**Special notes for your reviewer**:

**Release note**:

```release-note
ACME DNS-01 challenge mechanism for Azure DNS
```
2018-02-21 13:20:30 +00:00
Tom Wieczorek
822500c439
Log potential errors while waiting for DNS record propagation
This helps debugging, e.g. if there are network problems.
2018-02-21 10:19:36 +01:00
William Johansson
6ff1746898 Bundle the CA public key in issued certificate
If the CA used is only an intermediate CA, and the root CA is trusted by
the client, the client needs help verifying the certificate chain.
2018-02-18 21:28:22 +01:00
mwieczorek
cc89fe59aa Added Azure DNS support for DNS01 challange 2018-02-13 10:34:06 +01:00
James Munnelly
296f6e334c
Remove unused file 2018-01-24 17:17:41 +00:00
James Munnelly
514f9e9b3d Update third_party import paths 2018-01-15 22:07:51 +00:00
James Munnelly
9c5b7bb1a7 Run hack/update-codegen.sh 2018-01-15 22:07:51 +00:00
James Munnelly
ea1dc8f58f Fix panic when ACME server returns a genuine error 2018-01-10 11:46:23 +00:00
James Munnelly
0ed9e8341f Update dates in generated license headers 2018-01-08 20:50:32 +00:00
jetstack-ci-bot
ebec81896b
Merge pull request #221 from munnerz/update-secret
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update Secrets instead of replacing to preserve additional metadata

**What this PR does / why we need it**:

Previously we always overwrite the existing certificate if it already existed. Some users have requested a way to automatically create the target secrets using a helm chart, so that all artifacts can be cleaned up cleanly upon `helm delete`.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes #192

**Release note**:
```release-note
Update existing secrets instead of replacing in order to preserve annotations/labels
```
2017-12-02 00:30:34 +00:00
jetstack-ci-bot
21202bac98
Merge pull request #219 from munnerz/fix-panic
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix panic in acme authorize function

**What this PR does / why we need it**:

Fixes a panic in the authorize() method of the acme issuer

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes #206 

**Release note**:
```release-note
Fix a bug in the ACME authorizer that would cause cert-manager to panic when certificate.spec.acme was not specified
```
2017-12-01 23:52:31 +00:00
James Munnelly
76559f737f Update Secrets instead of replacing to preserve additional metadata 2017-12-01 23:48:05 +00:00
James Munnelly
5f196cbe31 Fix panic in acme authorize function 2017-12-01 23:24:09 +00:00
James Munnelly
cee4610dd6 Enable go race detector and fix race 2017-12-01 22:54:12 +00:00
James Munnelly
b67340b134 Fix checking for expired ACME authorizations 2017-12-01 17:37:24 +00:00
James Munnelly
c3be0f204e Add ingress-shim controller to create Certificates based on annotations on ingress resources 2017-11-30 22:53:54 +00:00
jetstack-bot
e32147b695
Merge pull request #183 from munnerz/fix-issue-loop
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Improve validation of certificates. Fix bug in checking certificate validity

**What this PR does / why we need it**:

Improves the validation of dnsNames and commonNames on certificate resources.
Fixes a bug in checking certificate validity.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes #176, fixes #175

**Release note**:
```release-note
Fix a bug in checking certificate validity and improve validation of dnsNames and commonName
```
2017-11-04 01:00:30 +00:00
James Munnelly
ffbfe2da3d Use ordered RemoveDuplicates. Add additional test cases. 2017-11-04 00:44:08 +00:00