Skip to content

Commit ceeaede

Browse files
Merge pull request #1 from solidigm/sedcli_1_1
sedcli 1.1 version
2 parents 3afb5fb + 1c6cf99 commit ceeaede

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+10525
-7425
lines changed

.gitignore

Lines changed: 0 additions & 16 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
sedcli is made available under the terms of GPL-2.0-or-later license.
2-
32
libsed is made available under the terms of LGPL-2.1-or-later licens.
43

54
Contributions into sedcli are accepted on GPL-2.0-or-later license,
6-
while contributions into libsed are accepted on LGPL-2.1-or-later
7-
license.
8-
All patches must be signedoff by the developer, which indicates that
9-
submitter agress to the Developer Certificate of Origin
10-
<https://developercertificate.org/>.
5+
while contributions into libsed are accepted on LGPL-2.1-or-later license.

LICENSE.GPL-2.0-or-later

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sedcli - utility for management of Self-Encrypting Drives
22

3-
Copyright (C) 2018-2019 Intel Corporation
3+
Copyright (C) 2018-2019, 2023 Solidigm
44

55
This program is free software; you can redistribute it and/or modify it
66
under the terms of the GNU General Public License, as published

LICENSE.LGPL-2.1-or-later

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
libsed - library allowing programmatic management of Self-Encrypting Drives
22

3-
Copyright (C) 2018-2019 Intel Corporation
3+
Copyright (C) 2018-2019, 2023 Solidigm
44

55
This library is free software; you can redistribute it and/or modify it
66
under the terms of the GNU Lesser General Public License as published

README.md

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,36 @@
11
# sedcli and libsed overview
22

3-
TCG Opal is an industry standard allowing Self-Encrypting Drives management,
4-
i.e. enable locking, configuring users, locking ranges etc.
3+
TCG Opal is an industry standard allowing Self-Encrypting Drives management, i.e. enable locking, configuring users, locking ranges etc.
54

65
Sedcli is an utility for managing NVMe SEDs that are TCG Opal complaint.
76

8-
Libsed is a library allowing to programatically manage NVMe SEDs that are TCG
9-
Opal complaint.
7+
Libsed is a library allowing to programatically manage NVMe SEDs that are TCG Opal complaint.
108

119
## Getting started
1210

13-
In order to get started use following steps (\<sedcli\> denotes top level
14-
directory for sedcli):
11+
In order to get started use following steps (\<sedcli\> denotes top level directory for sedcli):
1512

1613
```
17-
# download sedcli sources
18-
git clone https://github.com/sedcli/sedcli.git
19-
2014
# navigate to source directory
2115
cd <sedcli>/src
2216
2317
# perform build environment configuration and run compilation
18+
chmod +x ./configure
2419
./configure
25-
make
20+
make all
2621
make install
22+
make install-cert
2723
2824
# invoke sedcli help to available commands and its syntax
29-
sedcli -H
30-
31-
# alterntively read sedcli man page
32-
man sedcli
25+
sedcli --help
3326
3427
```
3528
For more information goto [doc](doc) directory.
3629

3730
## Features
3831

39-
* Interactive management of NVMe SED allowing to: configure locking, change
40-
lock state, revert disk back to manafactured state
41-
* Coming soon: auto management with disk key being retrieved from network
42-
attached Key Management Server that is OASIS KMIP complaint
32+
* Interactive management of NVMe SED allowing to: configure locking, change lock state, revert disk back to manafactured state
33+
* Auto management with disk key being retrieved from network attached Key Management Server that is OASIS KMIP complaint
4334

4435
## Talks and papers
4536

@@ -50,16 +41,10 @@ attached Key Management Server that is OASIS KMIP complaint
5041
We encourage contributions! Patches are accepted via pull request:
5142
* Contributions into sedcli are accepted on GPL-2.0-or-later license
5243
* Contributions into libsed are accepted on LGPL-2.1-or-later license
53-
* Patches must be signedoff by the developer. This indicates that submitter
54-
agrees to the **Developer Certificate of Origin**
55-
[DCO](https://developercertificate.org)
5644

5745
## Maintainers
5846

59-
* Andrzej Jakowski <andrzej.jakowski@intel.com>;
60-
github [@AndrzejJakowski](https://github.com/AndrzejJakowski)
61-
* Revanth Rajashekar <revanth.rajashekar@intel.com>;
62-
github [@RevanthRajashekar](https://github.com/RevanthRajashekar)
47+
* Piotr Rudnicki <piotr.rudnicki@solidigm.com>
6348

6449
Feel free to contact us anytime with questions, feedback or suggestions.
6550
We would love to hear how you see sedcli going forward.

certs/server.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ port=5696
44
certificate_path=/etc/pykmip/certs/server_cert.pem
55
key_path=/etc/pykmip/certs/server_key.pem
66
ca_path=/etc/pykmip/certs/ca_cert.pem
7-
auth_suite=Basic
7+
auth_suite=TLS1.2
88
policy_path=/etc/pykmip/policies
99
enable_tls_client_auth=True
1010
tls_cipher_suites=

doc/sedcli-kmip.8

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -44,53 +44,25 @@ backup file to authenticate to the drive and perform necessary updates.
4444

4545
.SH OPTIONS
4646

47-
.IP "\fB\-P -d <device> [-f <file>]\fR or \fB\-\-provision --device <device> [--file <file>]\fR"
48-
Initial provision NVMe SSD for security or rekey disk. On initial provision
49-
new DEK key is created and used to take ownership of SSD and activate Opal.
50-
For reprovisioning (replacing DEK with new key) "--file" options needs to be
51-
specified. "file" should be a valid sedcli-kmip backup file containing password
52-
protected DEK key that will be used to authenticate to NVMe SSD during
53-
reprovisioning process.
54-
55-
.IP "\fB\-B -d <device> -f <file>\fR or \fB\-\-backup --device <device> --file <file>\fR"
56-
Write encrypted DEK key into password protected file. Backup file may be used
57-
during rekey process of NVMe SSD or when disk is migrated between platforms.
58-
It is also possible to use backup file to manually manage locking state of
59-
NVMe SSD.
60-
61-
.IP "\fB\-L -d <device> -t {RO|RW|LK} [-f <file>]\fR or \fB\-\-lock-unlock --device <device> --accesstype {RO|RW|LK} [--file <file>]\fR"
62-
Change lock state of NVMe SSD. By default this command uses PEK to unwrap DEK
63-
key stored on disk itself in Opal datastore region. Following lock states are
64-
available:
65-
.IP
66-
1. Read-Only(RO) - user can only read the data from the disk.
67-
.IP
68-
2. Read-Write(RW) - user can read/write data from/to the disk.
69-
.IP
70-
3. Locked(LK) - data is locked, user can NOT read/write data from/to the disk.
71-
72-
.IP "\fB\-H\fR or \fB\-\-help\fR"
47+
.IP "\fB\-\-help\fR"
7348
Prints global and command specific help on available commands and usage
7449

7550
.IP "To print command specific help use following syntax:"
76-
.IP "\fBsedcli-kmip <command> -H\fR or \fBsedcli-kmip <command> --help\fR"
51+
.IP "\fBsedcli-kmip <command> --help\fR"
7752
.IP "For example:"
78-
.IP "\fBsedcli-kmip -P -H\fR or \fBsedcli-kmip --provision --help\fR"
53+
.IP "\fBsedcli-kmip --provision --help\fR"
7954

8055
.SH COPYRIGHT
81-
Copyright(c) 2018-2020 by the Intel Corporation.
56+
Copyright (C) 2018-2019, 20222-2023 Solidigm. All Rights Reserved.
8257

8358
.SH AUTHOR
84-
This manual page was created by Andrzej Jakowski <andrzej.jakowski@intel.com>
85-
59+
This manual page was created by Piotr Rudnicki <piotr.rudnicki@solidigm.com>
8660

8761
.SH FILES
8862
.PP
8963
sedcli-kmip
9064
.PP
9165
/etc/sedcli/sedcli.conf
92-
.PP
93-
/etc/udev/rules.d/63-sedcli.rules
9466

9567
.SH SEE ALSO
9668
.TP

doc/sedcli.8

Lines changed: 7 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -50,67 +50,23 @@ update Admin1 password for Locking SP.
5050

5151
.SH OPTIONS
5252

53-
.IP "\fB\-D -d <device> [-f {normal|udev}]\fR or \fB\-\-discovery --device <device> [--format {normal|udev}]\fR"
54-
Performs Level 0 and Level 1 Discovery and prints out the info in human-readable(default) or
55-
machine friendly format.
56-
57-
.IP "\fB\-O -d <device>\fR or \fB\-\-ownership --device <device>\fR"
58-
Takes ownership of the device.
59-
60-
.IP "\fB\-A -d <device>\fR or \fB\-\-activate-lsp --device <device>\fR"
61-
Activates Locking SP.
62-
63-
.IP "\fB\-R -d <device> [-i] [-n]\fR or \fB\-\-revert --device <device> [--psid] [--non-destructive]\fR"
64-
Performs Destructive or Non-Destructive Revert TPer to Manufactured-Inactivate
65-
state using either SID or PSID authority.
66-
67-
.IP "\fB\-S -d <device>\fR or \fB\-\-setup-global-range --device <device>\fR"
68-
Sets Read Lock Enabled (RLE) and Write Lock Enabled (WLE) bis for global locking
69-
range. This effectively enables locking of all user data. Locking will start
70-
after power cycle or when explicitly locked using \fb\-\-lock-unlock\fR command.
71-
72-
.IP "\fB\-L -d <device> -t <accesstype>\fR or \fB\-\-lock-unlock --device <device> --accesstype {RO|RW|LK}\fR"
73-
.IP
74-
Changes the lock state for the device. Following access modes are available:
75-
.IP
76-
1. Read-Only(RO) - user can only read the data from the disk.
77-
.IP
78-
2. Read-Write(RW) - user can read/write data from/to the disk.
79-
.IP
80-
3. Locked(LK) - data is locked, user can NOT read/write data from/to the disk.
81-
82-
.IP "\fB\-P -d <device>\fR or \fB\-\-set-password --device <device>\fR"
83-
Updates password for Admin1 authority in Locking SP.
84-
85-
.IP "\fB\-M -d <device> [-e {TRUE|FALSE}] [-m {TRUE|FALSE}]\fR or \fB\-\-mbr-control --device <device> [--enable {TRUE|FALSE}] [--done {TRUE|FALSE}]\fR"
86-
.IP
87-
Enable/Disable MBR Shadow and/or Set/Unset MBR Done.
88-
MBR Done update to TRUE will only take effect when MBR Shadow is enabled.
89-
90-
.IP "\fB\-W -d <device> -f <pba_file> [-o <offset>]\fR or \fB\-\-write-mbr --device <device> --file <pba_file> [--offset <offset>]\fR"
91-
Write data into MBR shadow region(MBR table).
92-
MBR shadow should be enabled for the PBA to take effect.
93-
94-
.IP "\fB\-B -d <device> -r {1|0}\fR or \fB\-\-block_sid --device <device> --hwreset {1|0}\fR"
95-
Issue BlockSID authentication command with Clear Event flag via --hwreset option.
96-
97-
.IP "\fB\-V\fR or \fB\-\-version\fR"
53+
.IP "\fB\-\-version\fR"
9854
Prints version of sedcli.
9955

100-
.IP "\fB\-H\fR or \fB\-\-help\fR"
56+
.IP "\fB\-\-help\fR"
10157
Prints global help on available commands and usage
10258

10359
.IP "To print command specific help use following syntax:"
104-
.IP "\fBsedcli <command> -H\fR or \fBsedcli <command> --help\fR"
60+
.IP "\fBsedcli <command> --help\fR"
10561
.IP "For example:"
106-
.IP "\fBsedcli -D -H\fR or \fBsedcli --discovery --help\fR"
62+
.IP "\fBsedcli --discovery --help\fR"
10763

10864
.SH COPYRIGHT
109-
Copyright(c) 2018-2020 by the Intel Corporation.
65+
Copyright (C) 2018-2019, 2022-2023 Solidigm. All Rights Reserved.
11066

11167
.SH AUTHOR
112-
This manual page was created by Andrzej Jakowski <andrzej.jakowski@intel.com>
68+
This manual page was created by Piotr Rudnicki <piotr.rudnicki@solidigm.com>
11369

11470
.SH SEE ALSO
11571
.TP
116-
sedcli(8)
72+
sedcli-kmip(8)

etc/udev/rules.d/63-sedcli.rules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ACTION!="add", GOTO="sedcli_end"
44
ENV{DEVTYPE}!="disk", GOTO="sedcli_end"
55

66
# Perform Discovery to detect if disk is SED and its state
7-
IMPORT{program}="/usr/sbin/sedcli -D -d $env{DEVNAME} -f udev"
7+
IMPORT{program}="/usr/sbin/sedcli -discovery --device $env{DEVNAME} -f udev"
88

99
ENV{DEV_SED_COMPATIBLE}=="ENABLED", GOTO="check_sedcli_lock"
1010
ENV{DEV_SED_COMPATIBLE}=="DISABLED", GOTO="sedcli_end"
@@ -15,10 +15,10 @@ ENV{DEV_SED_LOCKED}=="ENABLED", GOTO="sedcli_unlock"
1515

1616
LABEL="sedcli_provision"
1717
# Intial provisioning of the device
18-
RUN+="/usr/sbin/sedcli-kmip -P -d $env{DEVNAME}", GOTO="sedcli_end"
18+
RUN+="/usr/sbin/sedcli-kmip --provision --device $env{DEVNAME}", GOTO="sedcli_end"
1919

2020
LABEL="sedcli_unlock"
2121
# Unlock the device
22-
RUN+="/usr/sbin/sedcli-kmip -L -d $env{DEVNAME} -t RW", GOTO="sedcli_end"
22+
RUN+="/usr/sbin/sedcli-kmip --lock-unlock --device $env{DEVNAME} --access-type RW", GOTO="sedcli_end"
2323

2424
LABEL="sedcli_end"

0 commit comments

Comments
 (0)