minio / kes

Key Managament Server for Object Storage and more
https://min.io/docs/kes/concepts/
GNU Affero General Public License v3.0
460 stars 97 forks source link

cmd: improve `kes migrate` command #317

Closed aead closed 10 months ago

aead commented 1 year ago

This commit improves the kes migrate command.

It now uses the lipgloss text UI framework instead of handwritten code.

As side-effect, this commit removes the direct github.com/fatih/color dependency.

Migrating keys from one KMS instance to another one may now look as following:

Starting key migration...

Source:   Filesystem /tmp/1
Target:   Filesystem /tmp/2

Warning: Existing keys will be overwritten.
Migrated 3 keys in 3s DONE

Testing this PR

  1. Setup two KES instance (source and target). Therefore create a new TLS private/public key pair:
    kes identity new --ip 127.0.0.1 --dns localhost localhost
  2. Create the source KES instance with the following config:

    admin: 
     identity: 3ecfcdf38fcbe141ae26a1030f81e96b753365a46760ae6b578698a97c59fd22
    
    tls:
     key: private.key
     cert: public.crt
    
    keys:
    - name: my-key-1
    - name: my-key-2
    - name: my-key-3
    
    keystore:
     fs:
       path: /tmp/1
    kes server --config source.yml --auth off
  3. Create the target KES instance with the following config:

    admin: 
     identity: 3ecfcdf38fcbe141ae26a1030f81e96b753365a46760ae6b578698a97c59fd22
    
    tls:
     key: private.key
     cert: public.crt
    
    keystore:
     fs:
       path: /tmp/2
    kes server --config target.yml --auth off
  4. Migrate the keys from the source to the target:
    kes migrate --from source.yml --to target.yml

Screenshot 2023-01-17 at 12 21 47

shtripat commented 1 year ago

Kindly resolve the conflict

harshavardhana commented 1 year ago

PTAL @aead conflicts

harshavardhana commented 1 year ago

PTAL @aead conflicts

@aead ^^ is this PR still needed?

allanrogerr commented 12 months ago

@aead PTAL

harshavardhana commented 10 months ago

I am closing this PR as stale and outdated.