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

Populate during renew calls also #17143

Merged
merged 1 commit into from
Sep 15, 2022
Merged

Populate during renew calls also #17143

merged 1 commit into from
Sep 15, 2022

Conversation

sgmiller
Copy link
Collaborator

No description provided.

@@ -161,6 +161,12 @@ func (b *backend) pathLoginRenew(ctx context.Context, req *logical.Request, d *f
return nil, err
}

if b.crls == nil {
if err := b.populateCRLs(ctx, req.Storage); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think, to me, the cleaner design going forward would be to mirror PKI: a dirty atomic boolean and updating it from the periodic func on invalidation; the others just get slightly stale data until this is updated but don't have to worry about b.crls potentially being nil and handling the consequences of that. My 2c.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rather than niling it out, good idea. I'll make this change after getting these fixes backported.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, definitely something I'd only do in 1.12. ty!

@sgmiller sgmiller merged commit cf22674 into main Sep 15, 2022
@sgmiller sgmiller deleted the populate-in-renew branch September 15, 2022 15:50
sgmiller added a commit that referenced this pull request Sep 15, 2022
sgmiller added a commit that referenced this pull request Sep 15, 2022
sgmiller added a commit that referenced this pull request Sep 15, 2022
sgmiller added a commit that referenced this pull request Sep 15, 2022
* Load existing CRLs on startup and after invalidate (#17138)

* Load existing CRLs on startup and after invalidate

* changelog

* Populate during renew calls also (#17143)

* Remove unused config fetch
sgmiller added a commit that referenced this pull request Sep 15, 2022
* Load existing CRLs on startup and after invalidate (#17138)

* Load existing CRLs on startup and after invalidate

* changelog

* Populate during renew calls also (#17143)

* Remove unused config fetch
sgmiller added a commit that referenced this pull request Sep 15, 2022
* Load existing CRLs on startup and after invalidate (#17138)

* Load existing CRLs on startup and after invalidate

* changelog

* Populate during renew calls also (#17143)

* Remove unused config fetch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants