-
Notifications
You must be signed in to change notification settings - Fork 327
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
(feat-ca) Ca rotation time to support months and year #750
(feat-ca) Ca rotation time to support months and year #750
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, with a small testing suggestion.
@lobkovilya is there a proper place to document this new format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add validation that value is valid in mesh_validator.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The task was to actually change this in BuiltinCertificateAuthorityConfig
, but we need this in both places, so that's a good direction!
Also: is there maybe a way to plug in custom google.protobuf.Duration
unmarshaller that will work with years? This will be more clean way of solving this. Otherwise we need to do the parsing ourselves everytime. We could also go with our custom Duration that supports years
I am just wondering if we use our custom Duration, we need to do 2 levels of parsing time information for the above. |
can you elaborate on this? Thanks |
@nickolaev as far as I know we document all format related things in |
Updated ca plugins to parseDuration Updated tests Fix kumahq#743
Updated builtinca manager to parseDuration Updated tests Fix kumahq#743
d679f1e
to
8608008
Compare
can I add changelog for this as a seperate PR ? |
We're going to generate the changelog semi-automated at release time. |
It seems like it's not working when trying with the current version of $ echo "type: Mesh
> name: default
> mtls:
> enabledBackend: ca-1
> backends:
> - name: ca-1
> type: builtin
> dpCert:
> rotation:
> expiration: 1d
> conf:
> caCert:
> RSAbits: 2048
> expiration: 10y" | kumactl apply -f -
Error: YAML contains invalid resource: bad Duration: time: unknown unit d in duration 1d When trying with a
and if I replace
|
This doesn't work - expecting a fix from @tharun208 to support days and years as the original issue described. |
Summary
Currently, Certificate Rotation times use proto duration which has limitation to hours, This pr extends this and we can able to create rotation time for a month, year, etc.
Full changelog
Issues resolved
Fix #743