|
| 1 | +## What's New |
| 2 | + |
| 3 | +* Ziti Component Management Access (Experimental) |
| 4 | + |
| 5 | +## Ziti Component Management Access |
| 6 | + |
| 7 | +This release contains an experimental feature allowing Ziti Administrators to allow access to management services for ziti components. |
| 8 | + |
| 9 | +This initial release is focused on providing access to SSH, but other management tools could potentially use the same data pipe. |
| 10 | + |
| 11 | +### Why |
| 12 | + |
| 13 | +Ideally one shouldn't use a system to manage itself. However, it can be nice to have a backup way to access a system, when things |
| 14 | +go wrong. This could also be a helpful tool for small installations. |
| 15 | + |
| 16 | +Accessing controllers and routers via the management plane and control plane is bad from a separation of data concerns perspective, |
| 17 | +but good from minimizing requirements perspective. To access a Ziti SSH service, An SDK client needs access to the REST API, the |
| 18 | +edge router with a control channel connection and links to the public routers. With this solution, only the REST API and the control |
| 19 | +channel are needed. |
| 20 | + |
| 21 | +### Security |
| 22 | + |
| 23 | +In order to access a component the following is required: |
| 24 | + |
| 25 | +1. The user must be a Ziti administrator |
| 26 | +2. The user must be able to reach the Fabric Management API (which can be locked down) |
| 27 | +3. The feature must be enabled on the controller used for access |
| 28 | +4. The feature must be enabled on the destination component |
| 29 | +5. A destination must be configured on the destination component |
| 30 | +6. The destination must be to a port on 127.0.0.1. This can't be used to access external systems. |
| 31 | +8. The user must have access to the management component. If SSH, this would be an SSH key or other SSH credentials |
| 32 | +9. If using SSH, the SSH server only needs to listen on the loopback interface. So SSH doesn't need to be listening on the network |
| 33 | + |
| 34 | +**Warnings** |
| 35 | +1. If you do not intend to use the feature, do not enable it. |
| 36 | +2. If you enable the feature, follow best practices for good SSH hygiene (audit logs, locked down permissions, etc) |
| 37 | + |
| 38 | +### What's the Data Flow? |
| 39 | + |
| 40 | +The path for accessing controllers is: |
| 41 | + |
| 42 | +* Ziti CLI to |
| 43 | +* Controller Fabric Management API to |
| 44 | +* a network service listing on the loopback interface, such as SSH. |
| 45 | + |
| 46 | +The path for accessing routers is: |
| 47 | + |
| 48 | +* Ziti CLI to |
| 49 | +* Controller Fabric Management API to |
| 50 | +* a router via the control channel to |
| 51 | +* a network service listing on the loopback interface, such as SSH. |
| 52 | + |
| 53 | +What does this look like? |
| 54 | + |
| 55 | +Each controller you want to allow access through, must enable the feature. |
| 56 | + |
| 57 | +Example controller config: |
| 58 | + |
| 59 | +``` |
| 60 | +mgmt: |
| 61 | + pipe: |
| 62 | + enabled: true |
| 63 | + enableExperimentalFeature: true |
| 64 | + destination: 127.0.0.1:22 |
| 65 | +``` |
| 66 | + |
| 67 | +Note that if you want to allow access through the controller, but not to the controller itself, you can |
| 68 | +leave out the `destination` setting. |
| 69 | + |
| 70 | +The router config is identical. |
| 71 | + |
| 72 | +``` |
| 73 | +mgmt: |
| 74 | + pipe: |
| 75 | + enabled: true |
| 76 | + enableExperimentalFeature: true |
| 77 | + destination: 127.0.0.1:22 |
| 78 | +``` |
| 79 | + |
| 80 | +### SSH Access |
| 81 | + |
| 82 | +If your components are set up to point to an SSH server, you can access them as follows: |
| 83 | + |
| 84 | + |
| 85 | +``` |
| 86 | + ziti fabric ssh --key /path/to/keyfile ctrl_client |
| 87 | + ziti fabric ssh --key /path/to/keyfile ubuntu@ctrl_client |
| 88 | + ziti fabric ssh --key /path/to/keyfile -u ubuntu ctrl_client |
| 89 | +``` |
| 90 | + |
| 91 | +Using the OpenSSH Client is also supported with the `--proxy-mode` flag. This also opens up access to `scp`. |
| 92 | + |
| 93 | +``` |
| 94 | + ssh -i ~/.fablab/instances/smoketest/ssh_private_key.pem -o ProxyCommand='ziti fabric ssh router-east-1 --proxy-mode' ubuntu@router-east-1 |
| 95 | + scp -i ~/.fablab/instances/smoketest/ssh_private_key.pem -o ProxyCommand='ziti fabric ssh ctrl1 --proxy-mode' ubuntu@ctrl1:./fablab/bin/ziti . |
| 96 | +``` |
| 97 | + |
| 98 | +Note that you must have credentials to the host machine in addition to being a Ziti Administrator. |
| 99 | + |
| 100 | +### Alternate Access |
| 101 | + |
| 102 | +You can use the proxy mode to get a pipe to whatever service you've got configured. |
| 103 | + |
| 104 | +`ziti fabric ssh ctrl1 --proxy-mode` |
| 105 | + |
| 106 | +It's up to you to connect whatever your management client is to that local pipe. Right now it only supports |
| 107 | +proxy via the stdin/stdout of the process. Supporting TCP or Unix Domain Socket proxies wouldn't be difficult |
| 108 | +if there was use case for them. |
0 commit comments