Code Monkey home page Code Monkey logo

acme-tiny-auto's People

Contributors

matrey avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

acme-tiny-auto's Issues

Old intermediate is hardcoded

Now that LE switched to "R3", the intermediate certificate check fails.

  • Need to take the intermediate from the API response
  • Validate the intermediate with the root
  • Refactor the OCSP stapling part (make it domain-specific rather than global)

python: command not found on Ubuntu 16.04 LTS

Only Python 3 available by default on Ubuntu 16.04 LTS
Should not be a problem for acme_tiny, as it's compatible with both Python 2 and 3

Might be enough to use /usr/bin/env python instead of python
Need to test it on a fresh Ubuntu 16.04 LTS

update acme_tiny.py (using ACME v2 since March 2018)

https://github.com/diafygi/acme-tiny

NOTE: Since Let's Encrypt's ACME v2 release (acme-tiny 4.0.0+), the intermediate certificate is included in the issued certificate download, so you no longer have to independently download the intermediate certificate and concatenate it to your signed certificate. If you have an bash script using acme-tiny <4.0 (e.g. before 2018-03-17) with acme-tiny 4.0.0+, then you may be adding the intermediate certificate to your signed_chain.crt twice

Differentiate the account key by provider (+ email for Buypass)

+ python /acme/acme_tiny.py --account-key /acme/account.key-tmp --csr /acme/domains/xxx/domain.csr --acme-dir /acme/shared/.well-known/acme-challenge/ --contact mailto:xxx --directory-url https://api.buypass.com/acme/directory
Parsing account key...
Parsing CSR...
Found domains: xxx
Getting directory...
Directory found!
Registering account...
Already registered!
Updated contact details:
mailto:xxx
Creating new order...
Order created!
Verifying xxx...
Traceback (most recent call last):
  File "/acme/acme_tiny.py", line 201, in <module>
    main(sys.argv[1:])
  File "/acme/acme_tiny.py", line 197, in main
    signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url, contact=args.contact)
  File "/acme/acme_tiny.py", line 149, in get_crt
    _send_signed_request(challenge['url'], {}, "Error submitting challenges: {0}".format(domain))
  File "/acme/acme_tiny.py", line 60, in _send_signed_request
    return _do_request(url, data=data.encode('utf8'), err_msg=err_msg, depth=depth)
  File "/acme/acme_tiny.py", line 46, in _do_request
    raise ValueError("{0}:\nUrl: {1}\nData: {2}\nResponse Code: {3}\nResponse: {4}".format(err_msg, url, data, code, resp_data))
ValueError: Error submitting challenges: xxx:
Url: https://api.buypass.com/acme-v02/authz/xxx/1
Data: {"protected": "xxx", "payload": "e30", "signature": "xxx"}
Response Code: 400
Response: {u'message': u'MALFORMED_BAD_REQUEST', u'code': 400, u'type': u'urn:ietf:params:acme:error:malformed', u'detail': u'Unable to process challenge, authorization is not pending', u'details': u'HTTP 400 Bad Request'}

implement some logging

  • L(abelled)TSV format, good for fluentd/fluentbit
  • add an entry even for runs that didn't do anything (can be used as a health check / ensure the cron works)
  • record errors especially for cronjob

openssl genrsa 2048?

Regarding this line: https://github.com/matrey/acme-tiny-auto/blob/master/acme-tiny-auto.sh#L104
openssl genrsa 4096

2048: pros

The next relevant value in the table is 112 bits of security, which roughly corresponds to RSA with a key length of 2048 bits. At the moment this value is considered “Acceptable,” which means that it is not known to be insecure and it is deemed to be so until 2030.

While it is true that a longer key provides better security, we have shown that by doubling the length of the key from 2048 to 4096, the increase in bits of security is only 18, a mere 16%. Moreover, besides requiring more storage, longer keys also translate into increased CPU usage and higher power consumption.

If you need more security than RSA-2048 offers, the way to go would be to switch to elliptical curve cryptography — not to continue using RSA

RSA keys with >2048 bits are currently incompatible with Amazon Web Services. From the Amazon CloudFront Developer Guide: "The maximum size of the public key in an SSL/TLS certificate is 2048 bits" (remark from 2016 ; not necessarily true anymore + AWS offers free certificates these days anyways)

2048: cons

Yubico and Cisco position are valid, because they have hardware issue (HSM, PKI and smartcard don’t support 4096 bits very well).

The US Gov is starting to recommend 3072

Sources:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.