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

documentate How to upgrade #78

Open
dvz-rs opened this issue Oct 15, 2021 · 6 comments
Open

documentate How to upgrade #78

dvz-rs opened this issue Oct 15, 2021 · 6 comments

Comments

@dvz-rs
Copy link

dvz-rs commented Oct 15, 2021

Hi there,

i have to upgrade from tang 7.2 (Debian Buster) to 8.3 (Debian Bullseye).
My tang servs already a few other servers
it there anything i have to watch bevor/while/after a distrib upgrade?

@sarroutbi
Copy link
Collaborator

Hello. As far as I know, there have not been non backwards compatible changes recently on Tang.

Tang dumps key information normally to /var/db/tang

Due to that, if your upgrade preserves previous directory, there should be no issue.

If, due to some incompatibility (which now I can not figure out), information regarding keys changes, you might need a key renegotiation for your scenario ...

  • How many clients are you using?
  • All of them are clevis clients?

@dvz-rs
Copy link
Author

dvz-rs commented Oct 20, 2021 via email

@sarroutbi
Copy link
Collaborator

When keys are rotated, you can rebind to new keys using clevis client.

With this command you can check the slot for a particular encrypted device:
clevis luks list -d "device"

To obtain information regarding keys (if they were rotated), you can use:
clevis luks report -d "device" -s "slot"

In case keys have been rotated, you can always rebind a slot with the new keys with next command:
clevis luks regen -d "device" -s "slot"

In your case, if keys must be regenerated due to an issue in the upgrading, you might want to use "clevis luks regen" to bind to new keys.

More info on key rotation:
https://www.youtube.com/watch?v=d4GmJPvhjcY (Min.15 and onwards)

@krzee
Copy link

krzee commented Jun 3, 2022

Thank you for sharing that video, it has useful information.
is there a way to only rotate the client side while leaving the tang server alone? my use case is as follows: I made a cloud-image which is pre-configured to unlock from the tang server, with the other key slot removed. I dont want all machines made from the cloud-image to use the same decryption key so I would like to bind another tang key to another slot and remove the one that came configured on the cloud-image. But when I try to configure another slot it asks for the decryption key and i cant figure out how to use the first tang key to auth that

@sarroutbi
Copy link
Collaborator

sarroutbi commented Jun 3, 2022

Thank you for sharing that video, it has useful information. is there a way to only rotate the client side while leaving the tang server alone?

Key rebinding means to update keys to current active keys that have been rotated. Key rotation is a mechanism for keys on tang server to be updated, key rebinding is a mechanism for clevis clients to be updated to use those keys.

my use case is as follows: I made a cloud-image which is pre-configured to unlock from the tang server, with the other key slot removed.

Sorry, I don't understand what "the other key slot" means. You have one slot entry per clevis pin configuration. If something is removed, then let's omit it.

I dont want all machines made from the cloud-image to use the same decryption key so I would like to bind another tang key to another slot and remove the one that came configured on the cloud-image. But when I try to configure another slot it asks for the decryption key and i cant figure out how to use the first tang key to auth that

Password asked when you configure another slot are the ones for decryption of that particular LUKS volume you are trying to configure. Configuration of one slot should not be related to other slot.

Maybe you can try to propose here the complete scenario (with tang servers involved, devices, etc.) and the commands you are using, to try to have a more detailed description.

@krzee
Copy link

krzee commented Jun 10, 2022

I apologize for my useless post. My problem came from a lack of understanding. I wanted to rotate the "clevis key" without rotating the tang keys. Now I have a better understanding of how luks works, and now I know that what I really wanted was to rotate my luks master key with cryptsetup reencrypt. Thank you for responding. I'll leave my previous post in place along with this in case it helps somebody else in the future.

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

No branches or pull requests

3 participants