You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: example/curlz/README.md
+46-9Lines changed: 46 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,40 +1,55 @@
1
1
# Overview
2
-
This example is a zitified cURL (cURLz) example. In part 1 of this example, a call will be made to an endpoint which
2
+
3
+
This example is a zitified cURL (cURLz) example. In part 1 of this example, a call will be made to an endpoint which
3
4
is not on the overlay network. In part 2, a call is made to an endpoint that *is* on the overlay network.
4
5
5
6
This example demonstrates:
7
+
6
8
* Dialing a service
7
9
8
10
## Requirements
11
+
9
12
* an OpenZiti network. If you do not have one, you can use one of the [quickstarts](https://openziti.github.io/ziti/quickstarts/quickstart-overview.html) to set one up.
10
13
* OpenZiti CLI to create services and identities on the OpenZiti Network
11
14
12
15
## Build the examples
16
+
13
17
Refer to the [example README](../README.md) to build the SDK examples
14
18
15
19
## Part 1: Set up a cURLz to a non-zitified endpoint
16
-
These steps will configure the service using the OpenZiti CLI. In this example, the traffic starts on the overlay zero
17
-
trust network and then is offloaded onto the underlay network.
20
+
21
+
These steps will configure the service using the OpenZiti CLI. In this example, the traffic starts on the overlay zero
22
+
trust network and then is offloaded onto the underlay network.
18
23
19
24
### Part 1 Architecture Overview
25
+
20
26

21
27
22
28
At the end of these steps you will have created:
29
+
23
30
* a service called `web.endpoint`
24
31
* an identity to connect to (dial) the service
25
32
* the service config to connect the service to the overlay
26
33
* the service policies required to authorize the identities for bind and dial
27
34
28
35
Steps:
36
+
29
37
1. Log into OpenZiti. The host:port and username/password will vary depending on your network.
30
38
39
+
```bash
31
40
ziti edge login localhost:1280 -u admin -p admin
41
+
```
42
+
32
43
1. Determine your edge router's name and populate this environment variable with it.
33
44
45
+
```bash
34
46
ziti edge list edge-routers
35
47
export ZITI_EDGE_ROUTER=<name-of-edge-router>
48
+
```
49
+
36
50
1. Run this script to create everything you need.
37
51
52
+
```bash
38
53
echo Changing to build directory
39
54
cd $ZITI_SDK_BUILD_DIR
40
55
@@ -54,55 +69,76 @@ Steps:
54
69
55
70
echo Run policy advisor to check
56
71
ziti edge policy-advisor services
72
+
```
73
+
57
74
1. Run the cURLz example for `web.endpoint`
58
75
76
+
```bash
59
77
./curlz https://web.endpoint curlz.json
78
+
```
60
79
61
80
### Example Output
81
+
62
82
The following is the output you'll see from the cURLz request to `web.endpoint`.
0 commit comments