openziti / ziti

The parent project for OpenZiti. Here you will find the executables for a fully zero trust, application embedded, programmable network @OpenZiti
https://openziti.io
Apache License 2.0
2.85k stars 159 forks source link

Add support for exporting and importing all entities #2515

Open jensalm opened 2 weeks ago

jensalm commented 2 weeks ago

Allow the cli to export and import all entities. The export should not contain instance specific details like ids, when it was created, etc. The output from export should be able to be imported in an empty ziti instance. Output should support both json and yaml.

Example:

  "identities": [
    {
      "appData": {},
      "authPolicy": "@Default",
      "disabled": false,
      "externalId": null,
      "isAdmin": true,
      "isDefaultAdmin": false,
      "isMfaEnabled": false,
      "name": "Test 1",
      "roleAttributes": [],
      "tags": {},
      "typeId": "Default"
    }
  ],
  "configs": [
    {
      "data": {
        "addresses": [
          "google.ziti"
        ],
        "portRanges": [
          {
            "high": 120,
            "low": 80
          }
        ],
        "protocols": [
          "tcp"
        ]
      },
      "name": "test 1 intercepting config",
      "tags": {},
    }
  ]
  "services": [
    {
      "configs": [
        "@test 1 intercepting config"
      ],
      "encryptionRequired": true,
      "name": "test 1",
      "roleAttributes": [
        "services"
      ],
      "tags": {},
      "terminatorStrategy": "smartrouting"
    }
  ]
qrkourier commented 2 weeks ago

What's an example use case for the feature? By recreate do you mean clone to a fresh network as opposed to managing a Ziti network's entities?

jensalm commented 2 weeks ago

What's an example use case for the feature? By recreate do you mean clone to a fresh network as opposed to managing a Ziti network's entities?

Basic use case is to be able to "clone" a network.