Skip to content

Conversation

@krishnavema
Copy link
Contributor

Implement certificate authority for AD

Copy link
Contributor

@spoore1 spoore1 left a comment

Choose a reason for hiding this comment

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

This is a great start and as I mentioned earlier my main initial concern is around the request()/request_smartcard() methods.

My main thought here is to make request() align more closely with what you wrote for the IPA one so we can abstract it out to the GenericProvider later. I think the current request() could be made request_enrollment() and request_smartcard() renamed to request with some minor changes.

You might also consider a method to generate the INF file based on some basic input like template, subject, keysize. Then use template to select which set of configs to use for the INF based on that.

@krishnavema krishnavema force-pushed the ad-certificate-management branch 2 times, most recently from eedd166 to bec5310 Compare October 18, 2025 15:08
@krishnavema krishnavema requested a review from danlavu October 18, 2025 15:08
@krishnavema krishnavema force-pushed the ad-certificate-management branch 2 times, most recently from fc5e3ee to e3824a9 Compare November 4, 2025 02:22
@krishnavema krishnavema requested a review from spoore1 November 4, 2025 05:38
Copy link
Contributor

@danlavu danlavu left a comment

Choose a reason for hiding this comment

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

Overall, this looks great, with a few minor nitpicks and a couple of larger requested changes.

@danlavu
Copy link
Contributor

danlavu commented Nov 10, 2025

@krishnavema I'm sorry, I did review this before I left for PTO but I didn't click submit review.

@krishnavema krishnavema force-pushed the ad-certificate-management branch from e3824a9 to cc761a8 Compare November 20, 2025 17:19
@krishnavema krishnavema requested a review from danlavu November 20, 2025 17:28
Copy link
Contributor

@spoore1 spoore1 left a comment

Choose a reason for hiding this comment

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

Another glance and it's looking very good. Just a question about the PSIni module calls you have in the request methods. I can't seem to find those.

self.host.conn.run(
f"""
$iniPath = "{inf_path}"
New-PsIniFile -Path $iniPath
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't find these cmdlets on my AD server and they don't seem to be a part of PSIni from what I can tell. Maybe I'm missing something. Is this from a custom or external module?

Copy link
Contributor

Choose a reason for hiding this comment

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

PsIni is loaded into the image, but it is a third-party module.

sssd-ci-containers/src/ansible/roles/ad/tasks/main.yml

 - name: Install powershell modules
   win_shell: |
     [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
     Get-PackageProvider NuGet -ForceBootstrap
     Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
     Install-Module PSIni -RequiredVersion 3.1.4 -Confirm:$False

We are using it with the GPO stuff.

Copy link
Contributor

@danlavu danlavu left a comment

Choose a reason for hiding this comment

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

This is great, nitpicks and missing unit tests for the misc functions.

self.host.conn.run(
f"""
$iniPath = "{inf_path}"
New-PsIniFile -Path $iniPath
Copy link
Contributor

Choose a reason for hiding this comment

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

PsIni is loaded into the image, but it is a third-party module.

sssd-ci-containers/src/ansible/roles/ad/tasks/main.yml

 - name: Install powershell modules
   win_shell: |
     [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
     Get-PackageProvider NuGet -ForceBootstrap
     Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
     Install-Module PSIni -RequiredVersion 3.1.4 -Confirm:$False

We are using it with the GPO stuff.

@krishnavema krishnavema force-pushed the ad-certificate-management branch from cc761a8 to c55f41c Compare November 24, 2025 02:36
Copy link
Contributor

@danlavu danlavu left a comment

Choose a reason for hiding this comment

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

I haven't tested it, but besides the single nitpick, I think this looks great. It does need to be tested; tentative approval until Scott or I can test it.

"""
Initialize the AD Certificate Authority helper.
:param host: Remote AD host.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick, all the hosts are remote, so AD host. is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants