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
Client-side CSR autogeneration (take 2) #337
Conversation
|
From Travis CI logs it looks like a correct branch was fetched this time. |
fd40f55
to
038ba5c
Compare
| @@ -147,6 +147,7 @@ BuildRequires: python-sssdconfig | |||
| BuildRequires: python-nose | |||
| BuildRequires: python-paste | |||
| BuildRequires: systemd-python | |||
| BuildRequires: python2-jinja2 | |||
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.
I guess you should also add python3-jinja2 build dependency below.
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.
Good point. I also realized that I had the jinja2 dependency on the ipalib package, but it's actually the ipaclient package that needs it now. So I added it to both the python2 and python3 ipaclient packages.
|
@LiptonB thanks a lot for resuming your work! Please add jinja2 to |
|
@tiran Thanks to the team for resuming the review, too! Added the dependency, does that look right? |
|
@LiptonB yes, it's correct. |
|
@LiptonB, there's still one issue which I'd like to be resolved in this PR, and that's that currently CSR templates are tied to certificate profiles. IMO this needs to be changed, as certificate profiles in IPA are Dogtag-specific, but Dogtag is not required to generate CSRs with this feature, and it should be possible to use this feature even in CA-less mode when Dogtag is not installed and certificate profiles are not available. Luckily this PR has no hard dependency on certificate profiles, with the exception of the |
|
@HonzaCholasta, I think I see what you mean about these templates not being dependent on dogtag, and I'm fine with removing the So, do you mean we should no longer consider CSR generation profiles to be associated with IPA profiles? In https://github.com/LiptonB/freeipa/tree/local-cert-build I have code that allows you to run |
|
@LiptonB, I think certificate profiles and CSR generation profiles / templates should be associated, but not by sharing the same logical As for |
6386b67
to
170cee6
Compare
|
@HonzaCholasta, I think we're on the same page, then. I removed the dogtag profile and the validation from the For the |
|
@LiptonB, I meant it the other way around - |
|
Before I push this, could you please:
? |
170cee6
to
3dd0ba6
Compare
Adds a library that uses jinja2 to format a script that, when run, will build a CSR. Also adds a CLI command, 'cert-get-requestdata', that uses this library and builds the script for a given principal. The rules are read from json files in /usr/share/ipa/csr, but the rule provider is a separate class so that it can be replaced easily. https://fedorahosted.org/freeipa/ticket/4899
This removes the ipa.syntaxrule and ipa.datarule macros in favor of simple 'if' statements based on the data referenced in the rules. The 'if' statement for a syntax rule is generated based on the data rules it contains. The Subject DN should not be generated unless all data rules are in place, so the ability to override the logical operator that combines data_sources (from 'or' to 'and') is added. https://fedorahosted.org/freeipa/ticket/4899
This patch also contains some code changes to make the code easier to test and to make the tests pass. https://fedorahosted.org/freeipa/ticket/4899
3dd0ba6
to
5dedf2d
Compare
|
@HonzaCholasta, updated, please take a look. I standardized on "CSR generation profile" because the names of the objects in the code and the directory that stores them are already "profiles," and because "template" is what the code calls the Jinja2 syntax that's built from the profile and the rules. But if you strongly prefer "template" to mean the collection of rules to use for generation I'm ok with changing it, I'd just want to change the code and filenames to be consistent as well. Thanks for clarifying about the reference from |
|
@LiptonB, "CSR generation profile" works for me. Once the new design is implemented though, "CSR template" will be more fitting IMO. I would not add the |
Clone of PR #10 to see if CI picks up the right commits this time