Himmelblau requires the machine key for unix_user_get (#2523)

I need access to the machine key here in order to
send a new request to Azure for user details.

Signed-off-by: David Mulder <dmulder@samba.org>
Co-authored-by: Firstyear <william@blackhats.net.au>
This commit is contained in:
David Mulder 2024-02-12 18:11:30 -07:00 committed by GitHub
parent 2e0dd40806
commit a315d8d440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 1 deletions

View file

@ -124,6 +124,7 @@ pub trait IdProvider {
_id: &Id, _id: &Id,
_token: Option<&UserToken>, _token: Option<&UserToken>,
_tpm: &mut tpm::BoxedDynTpm, _tpm: &mut tpm::BoxedDynTpm,
_machine_key: &tpm::MachineKey,
) -> Result<UserToken, IdpError>; ) -> Result<UserToken, IdpError>;
async fn unix_user_online_auth_init( async fn unix_user_online_auth_init(

View file

@ -131,6 +131,7 @@ impl IdProvider for KanidmProvider {
id: &Id, id: &Id,
_token: Option<&UserToken>, _token: Option<&UserToken>,
_tpm: &mut tpm::BoxedDynTpm, _tpm: &mut tpm::BoxedDynTpm,
_machine_key: &tpm::MachineKey,
) -> Result<UserToken, IdpError> { ) -> Result<UserToken, IdpError> {
match self match self
.client .client

View file

@ -477,7 +477,12 @@ where
let user_get_result = self let user_get_result = self
.client .client
.unix_user_get(account_id, token.as_ref(), hsm_lock.deref_mut()) .unix_user_get(
account_id,
token.as_ref(),
hsm_lock.deref_mut(),
&self.machine_key,
)
.await; .await;
drop(hsm_lock); drop(hsm_lock);