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: dusseldorf/README.md
+44-7Lines changed: 44 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,31 +2,68 @@
2
2
3
3
This folder contains all the components that make up the total platform. These include:
4
4
5
-
6
5
-`api`: the control plane / API.
7
6
-`listener.dns`: the DNS listener for the data plane.
8
7
-`listener.http`: the HTTP/HTTPS listener in the data plane.
9
8
-`ui`: the source for the frontend web user interface.
10
9
-`zentralbibliothek`: a central library for listeners in the data plane.
11
10
12
-
Each component is explained in more details below:
11
+
## Developer Environment Setup
12
+
13
+
### Prerequisites
14
+
Please ensure that you have the following before starting:
15
+
- An Azure AD tenant
16
+
- An up-to-date version of Docker & Docker Compose
17
+
- A terminal that supports bash (Note: If you are on Windows, it's recommended you use Ubuntu WSL and have your docker compose environment stored there.)
18
+
19
+
### Setup
20
+
In your Azure AD tenant, [create an Azure AD application](https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/CreateApplicationBlade/quickStartType~/null/isMSAApp~/false) with `http://localhost:8080/ui/` set as a redirect URI and `Single-page Application (SPA)` selected as the platform. Note the client ID and tenant ID of the newly created application.
21
+
22
+
Then, clone this repository and enter the `dusseldorf/` directory (the one with this README in it) inside of a Linux-based terminal (if on Windows, use WSL). Then, execute `./generate_devenv.sh` and input your client ID and tenant ID obtained from Azure.
23
+
24
+
To start your developer environment, ensure you have nothing running locally on port 8080 and run `docker compose up`. After it builds the containers, your environment should be up and running on `http://localhost:8080/ui/` and you should be able to login.
25
+
26
+
### Testing
27
+
28
+
Once your developer environment is running, the following services will be accessible on your computer:
29
+
30
+
-**API & UI server**: The API will be up and running on port 8080
31
+
-**HTTPS listener**: The HTTPS listener runs on port 443 by default. This is modifiable in your .env file, but note that it will be overwritten by the generate devenv script.
32
+
-**DNS listener**: The DNS listener runs on port 10053.
33
+
34
+
The API and UI are directly testable on http://localhost:8080/ui/ and you should be able to access them by logging in with an account on your Azure tenant that has access to the application.
35
+
36
+
To test the HTTPS listener, you can modify the following curl command:
37
+
38
+
```sh
39
+
curl https://localhost:443/your-path-here -k \
40
+
-H "Host: your-zone-here.dusseldorf.local"
41
+
```
42
+
43
+
Make sure to keep the `-k` flag, which allows you to run the request without having to install the certificate. The Host header can be modified to be whatever host you are targeting to make a request to
44
+
45
+
To test the DNS listener, install the `dig` command in your local environment and use `dig your-zone-here.dusseldorf.local +tcp @localhost -p 10053` to make requests to the DNS server.
46
+
47
+
## Components
48
+
49
+
Here is some more information about the different components of this directory:
13
50
14
-
## API
51
+
###API
15
52
This is the control plane of Dusseldorf. This REST API allows an authenticated user to create, manage and delete zones, monitor the requests made to them and manage rules set on their zones. Calls to this API must be authenticated using an authentication token in each request.
16
53
17
54
This API is implemented using the FastAPI framework and provide CRUD functionality on zones, rules by interacting with a MongoDB database.
18
55
19
56
For more information about this API, please consult the [API docs](api/README.md).
20
57
21
58
22
-
## DNS Listener
59
+
###DNS Listener
23
60
This is a network listener that responds to DNS traffic, and listens on port 53/udp for any DNS requests. The DNS (Domain Name System) protocol is responsible for translating hostnames to an IP address. By acting as a domains' DNS server, Dusseldorf is able to monitor any name resolutions for those subdomains on the Internet.
24
61
By default, this permissive DNS server reponds with its own IP address(es) to a name resolution. This behaviour can be changed by assigning rules to your zone. Currently we only support custom `A`, `AAAA`, `CNAME` and `TXT` records.
25
62
26
63
Check the documentation for the DNS listener [here](listener.dns/README.md).
27
64
28
65
29
-
## HTTP/HTTPS Listener
66
+
###HTTP/HTTPS Listener
30
67
This network listener can be setup to listen on cleartext HTTP traffic, or it can listen on HTTPS traffic, if you have the correct certificates available. For a cleartext setup, this listener accepts HTTP requests on port 80/tcp, and respond with default, or customized HTTP responses.
31
68
Just like the DNS listener acts as a DNS server, this listener implements a very permissive HTTP server, or web server. Using rules, you can set custom content, headers and status codes.
32
69
@@ -38,14 +75,14 @@ You can find more information on how to run this listener in the [HTTP documenta
38
75
39
76
40
77
41
-
## UI
78
+
###UI
42
79
This is the frontend web user interface. It is implemented in React using the amazing [Fluent2](https://fluent2.microsoft.design/) design framework and provides a modern single-page-application (SPA) to communicate with the Dusseldorf API.
43
80
44
81
These static pages are compiled and placed into a folder in the API, so it references a local `/api` endpoints, but can be setup to call another API endpoint altogether, too.
45
82
The user interface's information can be found [here](ui/README.md).
46
83
47
84
48
-
## Zentralbibliothek
85
+
###Zentralbibliothek
49
86
This is a central library which holds the rule engine, database logic and utility functions.
0 commit comments