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

Add step_certificate role, supporting multiple provisioners #129

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eengstrom
Copy link
Contributor

Adding step_certificate as a new role that can accommodate all different types of provisioners.
For the current implementation, only supports:

  • ACME
  • JWK
    If the requested provisioner is not supported, the role will fail with appropriate message.

If this role is adopted, I suggest we deprecate step_acme_cert, and will resolve #127.

NOTE - this PR is a DRAFT, and I'm soliciting feedback.

@eengstrom
Copy link
Contributor Author

I'm not sure the tests will pass yet. I don't really expect them to pass, but even if they do, it's only because I copied the step_acme_cert and didn't modify the testing yet. Again, looking for feedback on the approach before putting in more effort.

Copy link
Collaborator

@maxhoesel maxhoesel left a comment

Choose a reason for hiding this comment

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

That looks good to me! Having a separate tasks file for each type of provisioner seems like a good approach to me, and the rest of the role is clearly structured as well.

The only thing that I'd like to see addressed is the logic that determines which tasks files to include for each provisioner (in tasks/cert.yml) - see my comment about that. The current version seems overly complex for what should be a relatively simple task. That said, i might be missing something, so please let me know if I am!

Aside from that, the tests obviously need to be updated - I suggest creating a separate molecule scenario for each supported provisioner type.

Overall though, I'm really happy with this! I'd love to merge it once the issues mentioned above have been ironed out.

roles/step_certificate/README.md Outdated Show resolved Hide resolved
roles/step_certificate/README.md Outdated Show resolved Hide resolved
roles/step_certificate/tasks/cert.yml Show resolved Hide resolved
driver:
name: docker
network:
- name: smallstep_acme_cert
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should probably be changed to reflect the role name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah - no testing implemnted yet.

roles/step_certificate/tasks/get_cert/default.yml Outdated Show resolved Hide resolved
roles/step_certificate/tasks/get_cert/jwk.yml Outdated Show resolved Hide resolved
roles/step_certificate/tasks/main.yml Outdated Show resolved Hide resolved
@eengstrom eengstrom force-pushed the add-step_certificate-role branch from b517f16 to 34fac99 Compare October 9, 2021 06:55
@maxhoesel
Copy link
Collaborator

Looks good! I'd be happy to merge this once the tests have been adjusted to cover both provisioners 👍

This role can accommodate all different types of provisioners.
For the currently implementation, only:
  - ACME
  - JWK
If the requested provisioner is not supported,
role will fail with appropriate message.

If this role is adopted, suggest we deprecate `step_acme_cert`.

FIXES: maxhoesel-ansible#127
@eengstrom eengstrom force-pushed the add-step_certificate-role branch from 34fac99 to 38e0825 Compare October 18, 2021 23:01
@maxhoesel maxhoesel added roles waiting for feedback This is waiting for a response labels Jan 25, 2022
@github-actions github-actions bot removed the roles label May 28, 2022
@salekseev
Copy link

@maxhoesel and @eengstrom are you guys still looking to add this? I think this would be hugely helpful to support JWK provisioners. Thanks.

@eengstrom
Copy link
Contributor Author

@salekseev -- Yes, at least I am still interested. I'm still using a fork I have, but it's sorely out of date with respect @maxhoesel 's mainline code base, but have need to rebase anyway. I'm open to more help to develop the testing that Max (rightly) wants, if you have inclination.

@maxhoesel
Copy link
Collaborator

I would also still be happy to merge this, and I might be able to help out with the tests as well. Unfortunately I haven't had a lot of time to work on this collection recently, and that's unlikely to change for about another month or so. I'd be happy to have a go at this once things calm down for me though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback This is waiting for a response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

role to support JWK-based (x509) certificates
3 participants