Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA_PROFILES expiration time is ignored #87

Closed
DonOtuseGH opened this issue Apr 28, 2022 · 2 comments
Closed

CA_PROFILES expiration time is ignored #87

DonOtuseGH opened this issue Apr 28, 2022 · 2 comments

Comments

@DonOtuseGH
Copy link

Hello,

using the django-ca (latest docker image) i realised, that profiles expires parameter seems to be ignored. I used the following additional profile, which is mapped into the container via docker-compose.override.yml:

volumes: - ./localsettings.yaml:/usr/src/django-ca/ca/conf/compose/99-localsettings.yaml

localsettings.yaml:

CA_DEFAULT_EXPIRES: 365
CA_PROFILES:
  server_3y:
    description: A certificate for a webserver with 3 years validity time.
    expires: 1095
    extensions:
      extended_key_usage:
        critical: false
        value:
        - serverAuth
      key_usage:
        critical: true
        value:
        - digitalSignature
        - keyEncipherment
    subject: /O=MyOrg/OU=Lab

As a result, the certificate contains the correct subject and extensions, but has default validity time of 1 year. Giving parameter --expires 1095 in addition works for sure.

Could you please verify and solve this as well?

Thank you!

@mathiasertl
Copy link
Owner

Hi,

Thanks for the report, I have a fix ready and it will be in the next release.

However, I must note that most (all?) browsers will not accept certificates with a three year validity time anymore. I think one year is the maximum now.

kr, Mat

@DonOtuseGH
Copy link
Author

Hi Mat,

thank you for fixing the issue. I'm aware of the browser limitations but there might be other use cases, e.g. s2s/c2s VPN. From a security perspective, long-lived certificates are of course not recommended ;-)

BR, Don.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants