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

Certificate expiration feature #28

Open
karabelnikov opened this issue Dec 12, 2022 · 0 comments
Open

Certificate expiration feature #28

karabelnikov opened this issue Dec 12, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@karabelnikov
Copy link
Contributor

karabelnikov commented Dec 12, 2022

@bnhf

Scott, I suggest adding a certificate expiration check to our project. I.e., if the certificate expired at the current UTC +TZ time on the server, then the icon changes in the "Status" column in the "Status" table, the label changes to red in the "Expiration" column, and a button appears in the "Certificates" column delete.

screencapture-192-168-10-60-8080-certificates-2022-12-12-03_17_24

I guess need to introduce a function .Expiration which will check the validity of the certificate.
Roughly what it looks like in certificate.html

{{if eq .Revocation .Expiration ""}}
  <td>
    <img src="/static/img/check-circle-fill.svg" width="16" height="16" alt="Valid">
  </td>
{{else}}
  <td>
    <img src="/static/img/x-circle-fill.svg" width="16" height="16" alt="Invalid">
  </td>
{{end}}
{{if eq .Revocation .Expiration ""}}
  <td>
    <span class="label label-success">{{ dateformat .ExpirationT "2006-01-02 15:04"}}</span>
  </td>
{{else}}
  <td>
  <span class="label label-danger">{{ dateformat .ExpirationT "2006-01-02 15:04"}}</span>
  </td>
{{end}}
{{if eq .Revocation .Expiration ""}}
  <td></td>
{{else}}
  <td>
    <a class="btn btn-danger btn-sm" href="{{urlfor "CertificatesController.Remove" ":key" .Details.Name ":serial" .Serial}}">Remove</a>
  </td>
{{end}}

Also, need the "Remove" button to delete all files associated with the given configuration name (name.crt, name.key, name.req, serial.pem, name.conf and name.ovpn). Since the certificate has expired, it is in fact invalid and you cannot connect with it. Accordingly, he does not need to make a revoke and does not need to be added to the recall list either.

What do you think? I think this is a great feature for our project.

@bnhf bnhf added the enhancement New feature or request label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants