nrfcredstore


Namenrfcredstore JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/NordicSemiconductor/nrfcredstore
SummaryManage credentials stored in Nordic Semiconductor modems.
upload_time2024-03-04 14:54:33
maintainer
docs_urlNone
authorNordic Semiconductor ASA
requires_python>=3.7,<4.0
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # nrfcredstore

nrfcredstore is a command line tool that simplifies managing credentials stored in Nordic Semiconductor modems, like the [nRF9160](https://www.nordicsemi.com/products/nrf9160). The typical use case of nrfcredstore is to automate the provisioning of cloud certificates that are stored securely in the modem.

## Install

Run the following command to use this package as a dependency:

    pip3 install nrfcredstore

## Requirements

For the device to respond to AT commands, the firmware on the device must have at_client enabled. This can be done by setting `CONFIG_AT_HOST_LIBRARY=y`. The [nRF9160: AT Client sample](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/at_client/README.html) can also be used, and the [nRF9160 DK application and modem firmware](https://www.nordicsemi.com/Products/Development-hardware/nRF9160-DK/Download#infotabs) download contains a pre-built firmware.

## Command Line Interface

```
usage: nrfcredstore [-h] [--baudrate BAUDRATE] [--timeout TIMEOUT] dev {list,write,delete,generate} ...

Manage certificates stored in a cellular modem.

positional arguments:
  dev                   Serial device used to communicate with the modem.

options:
  -h, --help            show this help message and exit
  --baudrate BAUDRATE   Serial baudrate
  --timeout TIMEOUT     Serial communication timeout in seconds

subcommands:
  {list,write,delete,generate}
                        Certificate related commands
    list                List all keys stored in the modem
    write               Write key/cert to a secure tag
    delete              Delete value from a secure tag
    generate            Generate private key
```

### list subcommand

List keys stored in the modem.

```
usage: nrfcredstore [--baudrate BAUDRATE] [--timeout TIMEOUT] dev list [--tag SECURE_TAG [--type KEY_TYPE]]
```

#### example

```
$ nrfcredstore /dev/tty.usbmodem0009600000001 list --tag 123
Secure tag   Key type           SHA
123          ROOT_CA_CERT       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
123          CLIENT_CERT        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
123          CLIENT_KEY         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

### write subcommand

Write key/cert to a secure tag. KEY_TYPE must be either ROOT_CA_CERT, CLIENT_CERT, CLIENT_KEY, or PSK.

```
usage: nrfcredstore [--baudrate BAUDRATE] [--timeout TIMEOUT] dev write SECURE_TAG KEY_TYPE FILENAME
```

#### example

    $ nrfcredstore /dev/tty.usbmodem0009600000001 write 123 ROOT_CA_CERT root-ca.pem

### delete subcommand

Delete value from a secure tag.

```
usage: nrfcredstore [--baudrate BAUDRATE] [--timeout TIMEOUT] dev delete SECURE_TAG KEY_TYPE
```

#### example

    $ nrfcredstore /dev/tty.usbmodem0009600000001 delete 123 ROOT_CA_CERT

### generate subcommand

> [!IMPORTANT]
> This command requires modem firmware version greater than or equal to 1.3.0.

Generate a private key in the modem and output a certificate signing request.

```
usage: nrfcredstore [--baudrate BAUDRATE] [--timeout TIMEOUT] dev generate SECURE_TAG FILENAME
```

#### example

    $ nrfcredstore /dev/tty.usbmodem0009600000001 generate 123 device_cert.der

    # Convert DER to CSR
    $ openssl req -pubkey -in device_cert.der -inform DER > device_cert.csr

## Development installation

For development mode, you need [poetry](https://python-poetry.org/):

    curl -sSL https://install.python-poetry.org | python3 -

Install package dependencies, development dependencies, and the nrfcredstore itself into poetry's internal virtual environment:

    poetry install

## Test

Running the tests depends on a [development installation](#development-installation).

    poetry run pytest

Check coverage

    poetry run pytest --cov=. tests
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NordicSemiconductor/nrfcredstore",
    "name": "nrfcredstore",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Nordic Semiconductor ASA",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/3a/eb/906d11f25cf2bd7c3de70b468600ff842ee3226261a4a178d12f0d2803f7/nrfcredstore-1.1.0.tar.gz",
    "platform": null,
    "description": "# nrfcredstore\n\nnrfcredstore is a command line tool that simplifies managing credentials stored in Nordic Semiconductor modems, like the [nRF9160](https://www.nordicsemi.com/products/nrf9160). The typical use case of nrfcredstore is to automate the provisioning of cloud certificates that are stored securely in the modem.\n\n## Install\n\nRun the following command to use this package as a dependency:\n\n    pip3 install nrfcredstore\n\n## Requirements\n\nFor the device to respond to AT commands, the firmware on the device must have at_client enabled. This can be done by setting `CONFIG_AT_HOST_LIBRARY=y`. The [nRF9160: AT Client sample](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/at_client/README.html) can also be used, and the [nRF9160 DK application and modem firmware](https://www.nordicsemi.com/Products/Development-hardware/nRF9160-DK/Download#infotabs) download contains a pre-built firmware.\n\n## Command Line Interface\n\n```\nusage: nrfcredstore [-h] [--baudrate BAUDRATE] [--timeout TIMEOUT] dev {list,write,delete,generate} ...\n\nManage certificates stored in a cellular modem.\n\npositional arguments:\n  dev                   Serial device used to communicate with the modem.\n\noptions:\n  -h, --help            show this help message and exit\n  --baudrate BAUDRATE   Serial baudrate\n  --timeout TIMEOUT     Serial communication timeout in seconds\n\nsubcommands:\n  {list,write,delete,generate}\n                        Certificate related commands\n    list                List all keys stored in the modem\n    write               Write key/cert to a secure tag\n    delete              Delete value from a secure tag\n    generate            Generate private key\n```\n\n### list subcommand\n\nList keys stored in the modem.\n\n```\nusage: nrfcredstore [--baudrate BAUDRATE] [--timeout TIMEOUT] dev list [--tag SECURE_TAG [--type KEY_TYPE]]\n```\n\n#### example\n\n```\n$ nrfcredstore /dev/tty.usbmodem0009600000001 list --tag 123\nSecure tag   Key type           SHA\n123          ROOT_CA_CERT       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n123          CLIENT_CERT        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n123          CLIENT_KEY         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n```\n\n### write subcommand\n\nWrite key/cert to a secure tag. KEY_TYPE must be either ROOT_CA_CERT, CLIENT_CERT, CLIENT_KEY, or PSK.\n\n```\nusage: nrfcredstore [--baudrate BAUDRATE] [--timeout TIMEOUT] dev write SECURE_TAG KEY_TYPE FILENAME\n```\n\n#### example\n\n    $ nrfcredstore /dev/tty.usbmodem0009600000001 write 123 ROOT_CA_CERT root-ca.pem\n\n### delete subcommand\n\nDelete value from a secure tag.\n\n```\nusage: nrfcredstore [--baudrate BAUDRATE] [--timeout TIMEOUT] dev delete SECURE_TAG KEY_TYPE\n```\n\n#### example\n\n    $ nrfcredstore /dev/tty.usbmodem0009600000001 delete 123 ROOT_CA_CERT\n\n### generate subcommand\n\n> [!IMPORTANT]\n> This command requires modem firmware version greater than or equal to 1.3.0.\n\nGenerate a private key in the modem and output a certificate signing request.\n\n```\nusage: nrfcredstore [--baudrate BAUDRATE] [--timeout TIMEOUT] dev generate SECURE_TAG FILENAME\n```\n\n#### example\n\n    $ nrfcredstore /dev/tty.usbmodem0009600000001 generate 123 device_cert.der\n\n    # Convert DER to CSR\n    $ openssl req -pubkey -in device_cert.der -inform DER > device_cert.csr\n\n## Development installation\n\nFor development mode, you need [poetry](https://python-poetry.org/):\n\n    curl -sSL https://install.python-poetry.org | python3 -\n\nInstall package dependencies, development dependencies, and the nrfcredstore itself into poetry's internal virtual environment:\n\n    poetry install\n\n## Test\n\nRunning the tests depends on a [development installation](#development-installation).\n\n    poetry run pytest\n\nCheck coverage\n\n    poetry run pytest --cov=. tests",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Manage credentials stored in Nordic Semiconductor modems.",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/NordicSemiconductor/nrfcredstore",
        "Repository": "https://github.com/NordicSemiconductor/nrfcredstore"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c796d12abb5c9adaabb1a7b32567f6a08ada3da6e610ecfc3d14cb879ea3728",
                "md5": "f08c537fc3c9607610c3ed4dd94e4450",
                "sha256": "1c0c2a55166dfc0db529c1c83bda9a3b128eabe7e067cfbc421114263aa3d531"
            },
            "downloads": -1,
            "filename": "nrfcredstore-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f08c537fc3c9607610c3ed4dd94e4450",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 8449,
            "upload_time": "2024-03-04T14:54:30",
            "upload_time_iso_8601": "2024-03-04T14:54:30.649026Z",
            "url": "https://files.pythonhosted.org/packages/9c/79/6d12abb5c9adaabb1a7b32567f6a08ada3da6e610ecfc3d14cb879ea3728/nrfcredstore-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3aeb906d11f25cf2bd7c3de70b468600ff842ee3226261a4a178d12f0d2803f7",
                "md5": "383b3a387078d10d8972beefb83cc92c",
                "sha256": "f8352dd46bbebebed970f5cade76b42722de6195c8c2661e0148f412737c2345"
            },
            "downloads": -1,
            "filename": "nrfcredstore-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "383b3a387078d10d8972beefb83cc92c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 6577,
            "upload_time": "2024-03-04T14:54:33",
            "upload_time_iso_8601": "2024-03-04T14:54:33.945432Z",
            "url": "https://files.pythonhosted.org/packages/3a/eb/906d11f25cf2bd7c3de70b468600ff842ee3226261a4a178d12f0d2803f7/nrfcredstore-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-04 14:54:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NordicSemiconductor",
    "github_project": "nrfcredstore",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nrfcredstore"
}
        
Elapsed time: 5.20696s