question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add 'expired' method to Signed class

See original GitHub issue

Description of issue or feature request: Add a method of Signed metadata class returning information about metadata expiration given a reference time.

Current behavior: Signed class already contains expires, a metadata expiration datetime object.

Expected behavior: A method exists that checks the ‘expires’ attribute against a reference time. def is_expired(self, reference_time: float) -> bool

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sechkovacommented, Mar 29, 2021

No strong preferences, the client will use whatever we choose 😃 I agree with using datetime objects plus the datetime module seems to be less platform dependent than time (which can be used to return UNIX time).

Let’s make sure we enforce UTC times everywhere.

1reaction
joshuaglcommented, Mar 29, 2021

Fully agreed with both comments. I have a WIP patch that takes a datetime object for reference_time and defaults to datetime.now() when no reference_time is passed.

I believe the motivating use-case is expiration checks in the experimental client, so I’ll wait for @sechkova to comment on whether a datetime object is useful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to update an expired certificate in the existing keystore?
If your server certificate is getting expired, you have two options to update it: Generate a new certificate signing request and use a...
Read more >
How to set an expiration date in java - Stack Overflow
I would use the Calendar class - the add method will do this kind of thing perfectly. http://download.oracle.com/javase/6/docs/api/java/util/Calendar.html
Read more >
Creating a self-signed certificate that expires in a ... - AskF5
To do so, you must perform the following procedure: Create a private key and self-signed certificate using the openssl command. Note: Beginning ...
Read more >
QRadar: "Certificate expires soon" or "certificate is ... - IBM
The SAML certificate is closed to expired or is already expired. QRadar Console SSL certificate expired and it defaults back to the self-signed...
Read more >
Tutorial: Manage certificates for federated single sign-on
In this tutorial, you'll learn how to customize the expiration date for your federation certificates, and how to renew certificates that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found