Skip to content

Combine the beta and regular provisioner commands #673

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

Merged
merged 16 commits into from
May 20, 2022
Merged

Conversation

dopey
Copy link
Contributor

@dopey dopey commented Apr 30, 2022

Name of feature:

Improvement to provisioner CRUD commands

Pain or issue this feature alleviates:

Use the same commands to perform CRUD on provisioners - rather than having a separate beta subcommand with different flags.

Why is this important to the project (if not answered above):

Uniform implementation and execution. Prevents further drift and provides a unified experience for operators. Also, prevents the need for different sets of documentation that currently confuses users.

Is there documentation on how to use this feature? If so, where?

Yes, the existing provisioner documentation.

In what environments or workflows is this feature supported?

All of them.

In what environments or workflows is this feature explicitly NOT supported (if any)?

N/A

Supporting links/other PRs/issues:

Fixes smallstep/certificates#886
Fixes #676

💔Thank you!

@dopey dopey requested a review from maraino April 30, 2022 20:03
@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label Apr 30, 2022
Copy link
Collaborator

@maraino maraino left a comment

Choose a reason for hiding this comment

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

Mostly ok, but I added a few comments that should be easy to fix.

go.mod Outdated
Comment on lines 194 to 195
replace github.com/smallstep/certificates => ../certificates

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remember to change this, you can also point to a branch version of certificates so the CI can compile it.

@dopey dopey added needs docs and removed needs triage Waiting for discussion / prioritization by team labels May 9, 2022
@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label May 12, 2022
@dopey dopey requested a review from maraino May 13, 2022 05:06
@dopey dopey removed the needs triage Waiting for discussion / prioritization by team label May 13, 2022
@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label May 13, 2022
Comment on lines 78 to 80
if err := client.auth.ReloadAdminResources(ctx); err != nil {
return nil, errors.Wrapf(err, "error loading provisioners from config")
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this fail if we want to change a bad OIDC configuration present in the ca.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I think we have two general options here:

  1. I can build the provisioner collection my self and then set it on the Authority using something like With ProvisionerCollection - OR -
  2. I can lazy load the provisioner - which could have the benefit of fixing the bug where the CA becomes unusable if, for some reason, the OIDC configuration changes and breaks the currently stored one.

@dopey dopey requested a review from maraino May 17, 2022 23:29
Copy link
Collaborator

@maraino maraino left a comment

Choose a reason for hiding this comment

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

Just a few minor improvements.

@dopey dopey requested a review from maraino May 18, 2022 04:17
Copy link
Collaborator

@maraino maraino left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@maraino maraino left a comment

Choose a reason for hiding this comment

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

lgtm

Yes, step ca provisioner add cicd --type JWK --create --no-private-key didn't make any sense.

dopey added 5 commits May 19, 2022 23:21
- fix durationFlags defaulting to 0s values
- remove no-private-key flag in favor of private-key=""
- fix deprecation warnings for adminbeta and provisionerbeta
@dopey dopey force-pushed the max/provisioners branch from 41df52a to c5d1847 Compare May 20, 2022 06:25
@dopey dopey merged commit 6cde951 into master May 20, 2022
@dopey dopey deleted the max/provisioners branch May 20, 2022 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to add database backed JWK provisioners without the private key. new provisioner with an already existing name leads to unexpected behavior
3 participants