Skip to content

Commit 3eef5eb

Browse files
authored
Update the README.md (#3)
1 parent b590f64 commit 3eef5eb

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
11
# IronOxide CLI
22

33
Command-line interface for IronOxide functions to create users, devices, and groups.
4+
5+
## Configuration
6+
7+
To use the IronOxide CLI, you must first obtain an Identity Assertion Key file and a configuration file
8+
from the [IronCore Labs Admin Console](https://admin.ironcorelabs.com).
9+
10+
### Identity Assertion Key File
11+
12+
An Identity Assertion Key file must be downloaded from the admin console interface immediately after creating
13+
a new Identity Assertion Key. To use IronOxide CLI's defaults, it should be named `assertionKey.pem`.
14+
15+
### IronCore Config File
16+
17+
An IronCore Config file can be downloaded from the admin console on creation of the very first project. For subsequent projects, it will need to be created manually. The file is of the form:
18+
19+
```javascript
20+
{
21+
"projectId": YOUR_PROJECT_ID,
22+
"segmentId": "YOUR_SEGMENT_ID",
23+
"identityAssertionKeyId": YOUR_IDENTITY_ASSERION_KEY_ID
24+
}
25+
```
26+
27+
Note that key names are case sensitive.
28+
29+
To use IronOxide CLI's defaults, it should be named `config.json`.
30+
31+
## Installation
32+
33+
IronOxide CLI requires Rust to be installed in order to compile the binary for your architecture.
34+
For information on installing Rust, visit https://www.rust-lang.org/tools/install.
35+
36+
Once Rust is installed, it can be used to download, compile, and install the IronOxide CLI binary with the command
37+
38+
```
39+
cargo install --git https://github.com/IronCoreLabs/ironoxide-cli
40+
```
41+
42+
## Usage
43+
44+
IronOxide CLI must be run from the directory where your Identity Assertion Key and configuration files are.
45+
It is used by running `ironoxide-cli`, followed by your desired subcommands and options.
46+
You can see all the available subcommands by running `ironoxide-cli -h`.
47+
There are currently two subcommands available: `user-create` and `group-create`.
48+
49+
### User and Device Creation
50+
51+
The `user-create` subcommand is used to create a user in the IronCore service,
52+
generate a device for that user, and output the device context to a file.
53+
It requires the desired user's ID and password. The user's device context will be output to a file named "\<USER-ID\>.json".
54+
55+
### Group Creation
56+
57+
The `group-create` subcommand is used to create multiple groups for the given user.
58+
As it requires the user's device context in a file named "\<USER-ID.json\>", it is typically run
59+
immediately after `user-create`. The group will be created with the given user as the owner and with no additional administrators or members.
60+
61+
## Examples
62+
63+
```console
64+
$ ironoxide-cli user-create ironadmin -p foobar
65+
Creating user "ironadmin"
66+
Generating device for user "ironadmin"
67+
Outputting device context to "ironadmin.json"
68+
69+
$ ironoxide-cli group-create customers employees others -u ironadmin
70+
Found DeviceContext in "ironadmin.json"
71+
Generating group "employees" for user "ironadmin"
72+
Generating group "customers" for user "ironadmin"
73+
Generating group "others" for user "ironadmin"
74+
```

0 commit comments

Comments
 (0)