Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Allow golang duration format in trusted CA refresh interval #53

Closed
wants to merge 3 commits into from

Conversation

sergicastro
Copy link
Contributor

This would allow to use the golang time.Duration style to setup the trusted CA refresh interval.

Depends on #52 to pass the checks.

@sergicastro sergicastro requested a review from nacx February 25, 2024 09:42
// Optional.
google.protobuf.Duration trusted_certificate_authority_refresh_interval = 22;
string trusted_certificate_authority_refresh_interval = 22;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this work with the decimal format? If not, I think it's OK to leave the field as-is, to preserve backward compatibility (even if no one is going to ever configure something at nanosecond precision)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new field I introduced in the PR #50.
The old authservice has no way to read CA from files and so to configure a refresh interval.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And no, the decimal format would not work.

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.45%. Comparing base (b417700) to head (4e360d6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   93.44%   93.45%   +0.01%     
==========================================
  Files          22       22              
  Lines        1433     1437       +4     
==========================================
+ Hits         1339     1343       +4     
  Misses         56       56              
  Partials       38       38              
Files Coverage Δ
internal/config.go 97.50% <100.00%> (+0.06%) ⬆️
internal/tls.go 89.53% <100.00%> (+0.12%) ⬆️

@sergicastro
Copy link
Contributor Author

Closing in favour of #57

So, only support seconds with no mention about nanos.

@sergicastro sergicastro deleted the golang-duration branch February 26, 2024 09:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants