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

Add tpm_ownerpassword option to keylime.conf #432

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

kkaarreell
Copy link
Contributor

The option has been introduced in
#426
but keylime.conf has not been updated with it.

Signed-off-by: Karel Srot [email protected]

@THS-on
Copy link
Member

THS-on commented Jul 26, 2022

Note that the generate option should be not implemented in the rust agent, because there is no reason to do that.
The option should only be there if the operator set manually a password for the owner hierarchy.
Maybe this should also be made clear in the config and the code.

@ueno
Copy link
Contributor

ueno commented Jul 26, 2022

See also #429

@kkaarreell
Copy link
Contributor Author

I see. I have updated it so it resides after the ek_handle option and updated the description.

keylime.conf Outdated

# Use this option to state the existing TPM ownerpassword. This option should
# be set only when ek_handle option points to an existing EK.
tpm_ownerpassword =
Copy link
Contributor

Choose a reason for hiding this comment

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

As this option is optional, maybe we could comment it out rather than having an empty value?

Copy link
Member

Choose a reason for hiding this comment

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

+1 , might even be worth removing entirely.

Copy link
Contributor Author

@kkaarreell kkaarreell Jul 26, 2022

Choose a reason for hiding this comment

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

I made it empty since I wasn't able to think some reasonable default.
I am not strictly opposed to it but it would be nice to keep some consistency within keylime.conf. There are e.g. agent_contact_ip and agent_contact_port options listed as optional and not commented out.
Strictly speaking, any option is optional since the default value is defined in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As this option is optional, maybe we could comment it out rather than having an empty value?

Could you please clarify under which circumstances the password is optional? What is the expected TPM setup?
Let's say I start with TPM after running tpm2_clear. What an administrator is supposed to do so that the rust agent would work properly?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please see #429. My understanding is the password would only be used if the Rust agent needs to use tpm2_changeauth to reset after another program takes TPM ownership. The Rust agent should generally work properly without taking any ownership or setting any passwords for the TPM.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would this be a case where the test should be updated, since this is functionality that was needed for the Python agent only? I could be missing something, but we were transitioning away from this. I can try to find out more as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

@THS-on commented above "Note that the generate option should be not implemented in the rust agent, because there is no reason to do that" - so do we need to do this?

Copy link
Contributor

Choose a reason for hiding this comment

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

@lkatalin The rust agent always generated the EK as far as I remember. It is true that if correctly provisioned, the TPM should not generate the EK and the handle should be set via the ek_handle configuration option. But note that the support for doing this was recently introduced by @ueno via #426

Copy link
Contributor

Choose a reason for hiding this comment

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

@lkatalin About the other question, it is not about changing the test, but the python agent implementation itself. In my opinion, it should stop taking ownership of the TPM.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ansasaki I see, since we are not yet removing the Python agent completely, it is true that the Rust agent will in most cases need to conform to the existing tests. Re: generating the EK, I don't have an opinion on this but just want to make sure everyone agrees. Perhaps it can be a separate issue.

@lkatalin
Copy link
Contributor

This fixes #433

@lkatalin
Copy link
Contributor

lkatalin commented Sep 7, 2022

What is the status on this one?

@lkatalin
Copy link
Contributor

@kkaarreell Could you rebase on the new keylime.conf changes? I am okay to merge this (if others are) when conflicts are resolved.

The option has been introduced in
keylime#426
but keylime.conf has not been updated with it.

Signed-off-by: Karel Srot <[email protected]>
@kkaarreell
Copy link
Contributor Author

@lkatalin Done. Thank you.

@lkatalin lkatalin merged commit 836a204 into keylime:master Sep 16, 2022
@kkaarreell kkaarreell deleted the tpm_password branch September 16, 2022 21:19
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.

7 participants