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 #4

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Automatic CSR generation #4

wants to merge 12 commits into from

Commits on Aug 8, 2016

  1. Add schema to support automatic CSR generation

    This adds the schema discussed in
    http://www.freeipa.org/page/V4/Automatic_Certificate_Request_Generation/Schema#Option_A, along with containers for the new ipaCertMappingRuleset objectClass. There are no containers for ipaCertFieldMappingRule and ipaCertTransformationRule because they will be stored as child objects of ipaCertProfile and ipaCertMappingRuleset objects respectively.
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 8, 2016
    Copy the full SHA
    8a558a4 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2016

  1. Add plugin for CSR generation

    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.
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 10, 2016
    Copy the full SHA
    767ccf0 View commit details
    Browse the repository at this point in the history
  2. Add generation rules to the default cert profile

    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.
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 10, 2016
    Copy the full SHA
    837500c View commit details
    Browse the repository at this point in the history
  3. Add code to support generating configs using mapping rules

    Provides a framework that uses jinja2 to format a template for the
    generated config and then substitute data from the database into it. The
    rules themselves will be added in a later commit.
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 10, 2016
    Copy the full SHA
    70ab8cb View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    f0fb6c0 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    c9e67c6 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    94f6e3d View commit details
    Browse the repository at this point in the history
  7. Add ability to import/export mappings with profile

    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.
    
    The exception handling here is a bit complicated, but the new
    exc_callback functions should take care of making sure that state is
    restored in the event of a failure. (And with the addition of an
    exc_callback, overriding execute() is no longer necessary.)
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 10, 2016
    Copy the full SHA
    db99970 View commit details
    Browse the repository at this point in the history
  8. Add tests for mapping rules import/export

    Also, for all import calls that are supposed to fail, we now assert that
    the objects do not exist after the failed import.
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 10, 2016
    Copy the full SHA
    78a0291 View commit details
    Browse the repository at this point in the history
  9. Automate full cert request flow

    Adds `cert-build` command that pulls down a config with
    `cert-get-requestdata`, then uses it to build a CSR, and submits the CSR
    with `cert-request`. To enable this, the format of the returned configs
    has been changed to a bash script, which produces the CSR when executed.
    
    Example usage:
    $ ipa cert-build --principal blipton --profile-id userCert --helper certutil \
      --helper-args '-d /tmp/certs'
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 10, 2016
    Copy the full SHA
    f2ce695 View commit details
    Browse the repository at this point in the history
  10. Add ACIs for mapping rules

    This allows non-admin users to read those rules to use the certificate
    mapping feature, and users with appropriate permissions can modify the
    rules as well.
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 10, 2016
    Copy the full SHA
    67b0f35 View commit details
    Browse the repository at this point in the history
  11. Improve error handling for certificate mapping

    All calls to jinja2 will now raise an IPA error type if rendering does
    not succeed, so that broken rules will not generate InternalErrors.
    Additionally, if the rendering does not generate a subject DN (for
    example if the wrong certificate profile for a principal is used), an
    exception is raised, as the CSR creation will not succeed.
    
    https://fedorahosted.org/freeipa/ticket/4899
    LiptonB committed Aug 10, 2016
    Copy the full SHA
    53810ec View commit details
    Browse the repository at this point in the history