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
Automatic CSR generation - first steps #2
Conversation
|
The new/modified LDAP objects created by this change can be viewed in newentries.txt |
|
|
||
| return config | ||
|
|
||
| class CertutilHelper(object): |
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.
If you want to have common interface there, you should use abstract class and abstract method (format) and inherit it in CerutilHelper and OpenSSLHelper
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.
Updated.
This adds the schema discussed in http://www.freeipa.org/page/V4/Automatic_Certificate_Request_Generation/Schema#Option_A, along with containers for the three new objectClasses.
9a08eb2
to
6addbbe
Compare
|
Thanks for the review, @mbasti-rh! I've rebased the code and addressed/responded to most of your comments. Please let me know if you see anything else that looks amiss. |
b8d01dc
to
c3e6405
Compare
This plugin will implement the cert-get-requestdata call that returns a config that can be used to generate a CSR. This commit implements only the very basic API of the plugin. Actual functionality will come in later patches.
This updates the automation that happens on upgrade to create all the various types of mapping rules, and adds some default rules to the caIPAserviceCert profile.
For now, these rules are implemented in python for simplicity, and referenced by naming the method prefixed with 'py:' in the transformation template attribute, but eventually we aim to define a text-based syntax that can be used in the attribute directly and thus modified at runtime.
The certprofile_show command now takes a --mappings-out flag that writes mappings to a JSON-formatted file, and the same file format can be read in with the --mappings-file parameter of certprofile_import and certprofile_mod.
c3e6405
to
e0aeb1f
Compare
Also fix a couple of small bugs exposed by the tests.
4b8d562
to
5d08383
Compare
* If None is passed for 'mappings_file', ignore that parameter rather than throwing an internal error. * Since we have an exc_callback now, overriding execute is unnecessary, so move that exception handling into the callback as well.
* The order of the mappings returned by certprofile_show is not significant * Assert that LDAP entries for malformed profiles don't stick around after the import call fails
9050604
to
d531bb8
Compare
|
Responding to a comment from @mbasti-rh, I now have an experiment working that uses the API to create the included mapping rules instead of creating them directly with LDAP. I think it's a good approach, but it turned out to touch a bunch of things so I'm leaving it separate for now. That code is here: #3 |
No description provided.