Skip to content

tedge cert show certificate status status text change for expires soon scenario #3526

@reubenmiller

Description

@reubenmiller

Is your feature improvement request related to a problem? Please describe.

The new addition of the certificate status is useful to show how many days the certificate. The certificate status is current represented as one of the following scenarios:

Scenario Status Colour Description
1 VALID Green Valid and will not expire soon
2 VALID Yellow Valid but will expire soon
3 EXPIRED Red Certificate has expired
4 NOT VALID YET Red Certificate is not yet valid

In the above table it is slightly more difficult for users to distinguish between the two VALID scenarios (1 and 2), as the solution relies on the terminal colours to convey the information that the certificate will "expire soon". The row does include the time remaining on the certificate, however it is not as visually obvious to users.

The colour scheme is also not show (rightly so) when the output is not being written to a console (e.g. the stdout/stderr from a service is generally not a console, so the colour coding will be turned off). Plus people with certain kinds colour blindness will not be able to distinguish between the two different colours.

Below shows a screenshot of the certificate show output:

Image

Describe the solution you'd like

Change scenario 2 from VALID to EXPIRES SOON (though using the same colour). This would make it more obvious to users that the expiration date (which is determined from a user set value)

Scenario Status Colour Description
1 VALID Green Valid and will not expire soon
2 EXPIRES SOON Yellow Valid but will expire soon
3 EXPIRED Red Certificate has expired
4 NOT VALID YET Red Certificate is not yet valid

Describe alternatives you've considered

Additional context

Note: You can easily check the output by controlling the certificate's minimum validity duration, to invoke scenario 1 and 2.

TEDGE_CERTIFICATE_VALIDITY_MINIMUM_DURATION=400d tedge cert show

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions