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

Automatic CSR generation - first steps #2

Closed
wants to merge 12 commits into from
Closed

Conversation

LiptonB
Copy link
Owner

@LiptonB LiptonB commented Jun 27, 2016

No description provided.

@LiptonB
Copy link
Owner Author

LiptonB commented Jun 27, 2016

The new/modified LDAP objects created by this change can be viewed in newentries.txt


return config

class CertutilHelper(object):

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

Copy link
Owner Author

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.
@LiptonB
Copy link
Owner Author

LiptonB commented Jul 5, 2016

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.

@LiptonB LiptonB force-pushed the mapping-rules-review branch 2 times, most recently from b8d01dc to c3e6405 Compare July 6, 2016 15:53
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.
Also fix a couple of small bugs exposed by the tests.
* 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
@LiptonB
Copy link
Owner Author

LiptonB commented Jul 13, 2016

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

@LiptonB LiptonB closed this Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants