Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions docs/man/inspect/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,79 @@ command:
Prints the `manifest.json` of the specified TDF for inspection.

This is useful for development and administration.

## Example

```shell
$ otdfctl inspect example.tdf

{
"manifest": {
"algorithm": "HS256",
"keyAccessType": "split",
"mimeType": "",
"policy": "eyJ1dWlkIjoiOTk0OWJkYTItN2E4MC00NTcwLWJjMTYtMjAxYmM4ZDA3YTE2IiwiYm9keSI6eyJkYXRhQXR0cmlidXRlcyI6W10sImRpc3NlbSI6W119fQ==",
"protocol": "zip",
"segmentHashAlgorithm": "GMAC",
"signature": "MmEyZTIwYzgwYzIyMGNmMDMzNmQ0Y2U2MzU3Y2Q4YTRjYjFkYmNiNzQ0YzFhNjhlNjU0Y2MxNGM3MmMwYzNiZQ==",
"type": "reference",
"method": {
"algorithm": "AES-256-GCM",
"iv": "lUpBdhH8csdbqgAP",
"isStreamable": true
},
"integrityInformation": {
"rootSignature": {
"alg": "HS256",
"sig": "MmEyZTIwYzgwYzIyMGNmMDMzNmQ0Y2U2MzU3Y2Q4YTRjYjFkYmNiNzQ0YzFhNjhlNjU0Y2MxNGM3MmMwYzNiZQ=="
},
"segmentHashAlg": "GMAC",
"segmentSizeDefault": 1048576,
"encryptedSegmentSizeDefault": 1048604,
"segments": [
{
"hash": "Y2RhNWYwMmFhNWE4M2EyYWY5Zjk2OTQ5NjU1MGQ4ODY=",
"segmentSize": 1618,
"encryptedSegmentSize": 1646
}
]
},
"encryptionInformation": {
"type": "split",
"policy": "eyJ1dWlkIjoiOTk0OWJkYTItN2E4MC00NTcwLWJjMTYtMjAxYmM4ZDA3YTE2IiwiYm9keSI6eyJkYXRhQXR0cmlidXRlcyI6W10sImRpc3NlbSI6W119fQ==",
"keyAccess": [
{
"type": "wrapped",
"url": "http://localhost:8080/kas",
"protocol": "kas",
"wrappedKey": "eEjzpg2XloommzdT6b9EVue6q1Lq/MRoZH9pU7EhcKpmt/+w6VHOUrTfk7rD05orQ2T2s2CjajrT6JNTbwQPXeoGCkKVp2xy2xceuNn8GFRJ5Gfz5rm1yI2vuOcn9xX4xbIHeLHQb7tUHyZnpeDMPc0y222VQfu/3Js1ycOBLE6lmgTgU3fXMYWSwXUIIdvWkrCW43eQxCPwZIO3HCOCo7mpWw/1gnzgJSldH/8vnlqeyeQDOvNq3+TDUwk74BV+0O72SAycaPISe/Vhh4SwSpUnRJdRN5mSngD9iuB/Dd9ChbhmNuwPW9KDzFocyz/SM5GsU3jhmjntMGNCMviR6g==",
"policyBinding": "ODViMjE5N2NiNWQzOWVmZDk0ZmU0OTMxMTM4MDNjNjNlMmZlNGQxYWE2NzIyYTQ3YmRhMTI1NGRhZTdkMmQ5NQ==",
"encryptedMetadata": "eyJjaXBoZXJ0ZXh0IjoibFVwQmRoSDhjc2RicWdBUGwxYkxtOW9kSHVReCtQclFxbUx3R3c9PSIsIml2IjoibFVwQmRoSDhjc2RicWdBUCJ9"
}
],
"method": {
"algorithm": "AES-256-GCM",
"iv": "lUpBdhH8csdbqgAP",
"isStreamable": true
},
"integrityInformation": {
"rootSignature": {
"alg": "HS256",
"sig": "MmEyZTIwYzgwYzIyMGNmMDMzNmQ0Y2U2MzU3Y2Q4YTRjYjFkYmNiNzQ0YzFhNjhlNjU0Y2MxNGM3MmMwYzNiZQ=="
},
"segmentHashAlg": "GMAC",
"segmentSizeDefault": 1048576,
"encryptedSegmentSizeDefault": 1048604,
"segments": [
{
"hash": "Y2RhNWYwMmFhNWE4M2EyYWY5Zjk2OTQ5NjU1MGQ4ODY=",
"segmentSize": 1618,
"encryptedSegmentSize": 1646
}
]
}
}
},
"attributes": []
}
```
22 changes: 22 additions & 0 deletions docs/man/policy/attributes/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,25 @@ If an Attribute is defined with logical rule `HIERARCHY`, an Entity must be mapp
compared to a given Value on TDF'd Resource Data. Hierarchical values are considered highest at index 0 and lowest at the last index.

For more general information about attributes, see the `attributes` subcommand.

## Example

```shell
otdfctl policy attributes create --namespace 3d25d33e-2469-4990-a9ed-fdd13ce74436 --name myattribute --rule ANY_OF
```

```shell
SUCCESS Created attributes: 3c51a593-cbf8-419d-b7dc-b656d0bedfbb

╭─────────────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Property │Value │
├─────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│Name │myattribute │
│Rule │ANY_OF │
│Values │[] │
│Namespace │opentdf.io │
│Created At │Tue Dec 17 18:33:06 UTC 2024 │
│Updated At │Tue Dec 17 18:33:06 UTC 2024 │
╰─────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
NOTE Use 'otdfctl policy attributes get --id=3c51a593-cbf8-419d-b7dc-b656d0bedfbb --json' to see all properties
```
22 changes: 22 additions & 0 deletions docs/man/policy/attributes/deactivate.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,25 @@ However, a deactivation of an attribute means its associated values cannot be en
For information about reactivation, see the `unsafe reactivate` subcommand.

For more general information about attributes, see the `attributes` subcommand.

## Example

```shell
otdfctl policy attributes deactivate --id 3c51a593-cbf8-419d-b7dc-b656d0bedfbb
```

```shell
SUCCESS Deactivated attributes: 3c51a593-cbf8-419d-b7dc-b656d0bedfbb
╭─────────────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Property │Value │
├─────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│Name │myattribute │
│Rule │ANY_OF │
│Values │[myvalue1] │
│Namespace │opentdf.io │
│Created At │Tue Dec 17 18:33:06 UTC 2024 │
│Updated At │Tue Dec 17 19:41:47 UTC 2024 │
│Labels │[hello: world] │
╰─────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
NOTE Use 'otdfctl policy attributes list --json' to see all properties
```
23 changes: 23 additions & 0 deletions docs/man/policy/attributes/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,26 @@ command:
Retrieve an attribute along with its metadata, rule, and values.

For more general information about attributes, see the `attributes` subcommand.

## Example

```shell
otdfctl policy attributes get --id=3c51a593-cbf8-419d-b7dc-b656d0bedfbb
```

```shell
SUCCESS Found attributes: 3c51a593-cbf8-419d-b7dc-b656d0bedfbb

╭─────────────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Property │Value │
├─────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│Id │3c51a593-cbf8-419d-b7dc-b656d0bedfbb │
│Name │myattribute │
│Rule │ANY_OF │
│Values │[] │
│Namespace │opentdf.io │
│Created At │Tue Dec 17 18:33:06 UTC 2024 │
│Updated At │Tue Dec 17 18:33:06 UTC 2024 │
╰─────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
NOTE Use 'otdfctl policy attributes get --id=3c51a593-cbf8-419d-b7dc-b656d0bedfbb --json' to see all properties
```
Loading
Loading