Skip to content

Commit

Permalink
fix(sztp): use correct nvidia-serial-number
Browse files Browse the repository at this point in the history
Fixes #19

before this change when trying to use something
other then `my-serial-number` resulted in error
`type=protocol, tag=access-denied`

found the serial is extracted from certificate.

Next patch will generate cert per device not just nvda

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Jun 7, 2024
1 parent f49dcf0 commit e8a0203
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion sztp.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,9 @@ docker run --rm -it --network=host \
--mount type=bind,source=/etc/os-release,target=/etc/os-release \
--mount type=bind,source=${DHCLIENT_LEASE_FILE},target=/var/lib/dhclient/dhclient.leases \
ghcr.io/opiproject/opi-sztp-client:main \
/opi-sztp-agent daemon --bootstrap-trust-anchor-cert /mnt/opi.pem --device-end-entity-cert /mnt/opi_cert.pem --device-private-key /mnt/opi_private_key.pem
/opi-sztp-agent daemon \
--bootstrap-trust-anchor-cert /mnt/opi.pem \
--device-end-entity-cert /mnt/opi_cert.pem \
--device-private-key /mnt/opi_private_key.pem \
--serial-number nvidia-serial-number
```
1 change: 1 addition & 0 deletions sztp/key.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pushd ${MYTMPDIR}/sztpd-simulator/pki
echo "DNS.2 = bootstrap" >> sztpd1/sbi/end-entity/openssl.cnf
echo "DNS.3 = web" >> sztpd1/sbi/end-entity/openssl.cnf
echo "DNS.4 = redirecter" >> sztpd1/sbi/end-entity/openssl.cnf
sed -i 's/my-serial-number/nvidia-serial-number/g' client/end-entity/openssl.cnf
make pki
# SBI Port certificates
cat sztpd1/sbi/end-entity/my_cert.pem sztpd1/sbi/intermediate2/my_cert.pem > ${MYTMPDIR}/sztpd-simulator/cert_chain.pem
Expand Down
2 changes: 1 addition & 1 deletion sztp/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"wn-sztpd-1:devices": {
"device": [
{
"serial-number": "my-serial-number",
"serial-number": "nvidia-serial-number",
"device-type": "my-device-type",
"activation-code": "$0$my-secret",
"response-manager": {
Expand Down

0 comments on commit e8a0203

Please sign in to comment.