Skip to content

RFD 210: HSM support in Active Directory environments#54223

Merged
zmb3 merged 4 commits intomasterfrom
rfd/0210-windows-ad-hsm
Jul 31, 2025
Merged

RFD 210: HSM support in Active Directory environments#54223
zmb3 merged 4 commits intomasterfrom
rfd/0210-windows-ad-hsm

Conversation

@zmb3
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 commented Apr 22, 2025

No description provided.

## Why

Teleport supports certificate-based login in Active Directory environments for
both Windows desktop access (RDP), and MS SQL database access.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now we also have Oracle, but it uses the same code under the hood.

Comment on lines +87 to +95
For database access, our setup instructions require that users generate the CRL
with `tctl auth crl`, copy it over to the Windows environment, and publish it to
LDAP using `certutil -dspublish`.

It is worth noting that `tctl auth crl` generates empty CRLs that are valid for _1 year_,
so database access will require manual intervention in case:

- the CRL expires after 1 year
- a CA rotation is performed
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could improve the UX here quite a lot by using the automated publishing workflow. We should probably keep the tctl auth crl as a fallback.

We will likely need an active LDAP connectivity anyway to lookup SID for username in order to fix #53502.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Going to keep that out of scope for now, since getting HMS to work is priority over other UX improvements. Feel free to file a new issue and link to this RFD for book-keeping.

Copy link
Copy Markdown
Contributor

@Tener Tener May 5, 2025

Choose a reason for hiding this comment

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

Oh sure, this was just a side remark, no need to change this RFD.

Comment thread rfd/0210-windows-ad-hsm.md Outdated

### Audit Events

TODO: update cert.create event with signer SKID?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would be very helpful indeed. The current cert.create events don't mention which CA/auth server did the signing. Either SKID or auth server ID would be helpful to distinguish things.

@probakowski probakowski force-pushed the rfd/0210-windows-ad-hsm branch from 3093cf2 to 8ed6c78 Compare May 28, 2025 21:32
@probakowski probakowski force-pushed the rfd/0210-windows-ad-hsm branch from 8ed6c78 to 946cd49 Compare May 28, 2025 21:36
@probakowski probakowski marked this pull request as ready for review May 28, 2025 21:37
@github-actions github-actions bot requested review from atburke and fspmarshall May 28, 2025 21:37
@probakowski probakowski added rfd Request for Discussion no-changelog Indicates that a PR does not require a changelog entry labels May 28, 2025
@probakowski probakowski requested review from Tener and programmerq June 2, 2025 13:15

## Required Approvers

* Engineering: @nklaassen && (@gabrielcorado || @greedy52)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Engineering: @nklaassen && (@gabrielcorado || @greedy52)
* Engineering: @nklaassen && (@gabrielcorado || @Tener )

Krzysztof already approved from db side.

Comment thread rfd/0210-windows-ad-hsm.md Outdated
procedure very similar to what they already do, they will only have to repeat
the `certutil -dspublish` command once for each individual CRL.

TODO: in order to publish to auth server, the CN of the CRL would need to change.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i don't understand


TODO: in order to publish to auth server, the CN of the CRL would need to change.

#### Publishing: add CRLs to the backend `certificate_authority`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would just like to see some description of when the auth server generates the CRLs and adds them to the certificate_authority in this design

maybe on auth startup the auth checks each key in each CA that needs CRLs. if it can sign with that key, and there is currently no CRL or the CRL expires in <1 year, it generates a new one and updates the CA in the backend. this will handle adding CRLs to existing CAs without them, and refreshing them semi-regularly

during CA rotation when generating new keys it should also generate and store the CRL

not sure if we'd want to also periodically check/refresh the CRLs or if just at auth startup is enough

@zmb3 zmb3 force-pushed the rfd/0210-windows-ad-hsm branch from dfd994f to 76f4be5 Compare July 31, 2025 13:27
@zmb3 zmb3 added this pull request to the merge queue Jul 31, 2025
auto-merge was automatically disabled July 31, 2025 13:37

Pull Request is not mergeable

Merged via the queue into master with commit d8dadf5 Jul 31, 2025
40 checks passed
@zmb3 zmb3 deleted the rfd/0210-windows-ad-hsm branch July 31, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry rfd Request for Discussion size/md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants