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
{{ message }}
This repository was archived by the owner on Dec 14, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+29-25Lines changed: 29 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,38 +62,40 @@ To run the components in a PoC-Like mode, the recommended way is to clone this p
62
62
This creates a local copy of the repository and you can start from there.
63
63
64
64
### Enable Open-Traffic Event Log
65
-
Obviously you have to enable Open-Traffic-Event log for your API-Gateway instances. [Read here][1] how to enable the Open-Traffic Event-Log.
66
-
After this configuration has been done, Open-Traffic log-files will created by default in this location: `apigateway/logs/opentraffic`. This location becomes relevant when configuring Filebeat.
65
+
Obviously, you have to enable Open-Traffic-Event log for your API-Gateway instance(s). [Read here][1] how to enable the Open-Traffic Event-Log.
66
+
After this configuration has been done, Open-Traffic log-files will be created by default in this location: `apigateway/logs/opentraffic`. This location becomes relevant when configuring Filebeat.
67
67
68
68
### Configure the Admin-Node-Manager
69
-
This step is required if you would like to use the existing API-Gateway Manager Traffic-Monitor in combination with Elasticsearch.
70
-
The Admin-Node-Manager (listening by default on port 8090) is responsible to serve the Traffic-Monitor and needs to be configured to use the API-Builder REST-API instead.
71
-
For the following steps, please open the Admin-Node-Manager configuration in Policy-Studio. You can read [here](https://docs.axway.com/bundle/axway-open-docs/page/docs/apim_administration/apigtw_admin/general_rbac_ad_ldap/index.html#use-the-ldap-policy-to-protect-management-services) how to do that.
72
-
- Create a new policy called: `Use Elasticsearch API`
73
-
- Configure this policy like so:
69
+
As the idea of this project is to use the existing API-Gateway Manager UI (short: ANM) to render log data now provided by Elasticsearch instead of the individual API-Gateway instances before (the build in behavior), it is required to patch the ANM configuration to make use of Elasticsearch instead of the API-Gateway instances (default setup). By default, ANM is listening on port 8090 for administrative traffic. This API is responsible to serve the Traffic-Monitor and needs to be configured to use the API-Builder REST-API instead.
70
+
71
+
For the following steps, please open the ANM configuration in Policy-Studio. You can read [here](https://docs.axway.com/bundle/axway-open-docs/page/docs/apim_administration/apigtw_admin/general_rbac_ad_ldap/index.html#use-the-ldap-policy-to-protect-management-services) how to do that.
72
+
- Create a new policy and name it `Use Elasticsearch API` - *This Policy will decide on what API calls can be routed to Elasticsearch*
73
+
- The configured Policy should look like this:
74
+
74
75
![use ES API][img3]
75
-
- The `Compare Attribute` filter checks if the requested API is already handled by the API-Builder project.
76
-
_As of today, only the Traffic-Overview is handled by the API-Builder. This will be changed soon._
77
-
- Add the following: `http.request.path`is `/api/router/service/instance-1/ops/search`
78
-
_The list of requests will be extended once the API-Builder project can serve more (e.g. the Request-Detail view)_
79
-
![Is API Managed][img6]
80
-
- Adjust the URL of the Connect to URL filter to your running API-Builder docker container and port (default is 8889).
81
-
![Connect to ES API][img7]
82
-
- Insert the created policy as a callback policy into the main policy: `Protect Management Interfaces`like so:
76
+
77
+
- The `Compare Attribute` filter checks if the requested API can be handled by the API-Builder project.
78
+
_Right now, only the Traffic-Overview is implemented and can be handled by the API-Builder glue project. This will be extended soon!_
79
+
- Add a criterion: `http.request.path`is `/api/router/service/instance-1/ops/search`
80
+
_The list of requests will be extended once the API-Builder project can serve more (e.g. the Request-Detail view). Right now, this is just hard coded for the topology we used for testing!_
81
+
![Is API Managed][img6]
82
+
- Adjust the URL of the Connect to URL filter to your running API-Builder docker container and port - **default is 8889**. Sample: `http://api-env:8889/api/elk/v1${http.request.rawURI}`
83
+
![Connect to ES API][img7]
84
+
- Insert the created policy as a callback policy (filter: Shortcut filter) into the main policy: `Protect Management Interfaces` and wire it like shown here:
83
85
![Use Callback][img4]
84
86
85
-
After you have savedback the configuration to the Admin-Node-Manager and restarted it, the Admin-Node-Manager will use the API-Builder API (Elasticsearch) to serve the specified request-types.
87
+
After you have saved, copy the configuration files from your local *Policy Studio* project (path on Linux: `/home/<user>/apiprojects/\<project-name\>`) back the configuration to the Admin-Node-Manager configuration (`\<install-dir\>/apigateway/conf/fed`) and restarted it. The Admin-Node-Manager will use the API provided by API-Builder to query the Elasticsearch API to serve the specified request-types.
86
88
87
89
### Setup filebeat
88
90
:exclamation: __This is an important step, as otherwise Filebeat will not see and send any Open-Traffic Event data!__
89
-
Before starting the container using docker-compose, make sure to setup the paths in the .env fileto your running API-Gateway instance. This configuration is used to mount the Open-Traffic-Folder into Filebeat container.
91
+
Before starting the container using docker-compose, make sure to setup the paths in the project `*.env` file. The variables must point to your running API-Gateway instance. These parameters are used to mount the Open-Traffic-Folder into the Filebeat container. For a typical Linux installation it looks like this (APIM beeing a symlink to current software version):
As the API-Builder container needs to communicate with Elasticsearch it needs to know where Elasticsearch is running. Use this environment variable to configure it:
98
+
As the API-Builder container needs to communicate with Elasticsearch it needs to know where Elasticsearch is running. Again, this environment variable must be configured within `.env`:
97
99
```
98
100
ELASTIC_NODE=http://elasticsearch1:9200
99
101
```
@@ -103,25 +105,27 @@ Please note, when using the default docker-compose.yaml the default setting is s
103
105
104
106
See https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-prod-prerequisites
105
107
106
-
### Start local elasticsearch cluster
108
+
### Start local Elasticsearch cluster
107
109
Bring the cluster up using docker-compose:
108
110
````
109
111
docker-compose up -d
110
112
````
111
113
Of course, the components can also run on different machines or on a Docker-Orchestration framework such as Kubernetes.
112
114
113
-
### Stop cluster
115
+
### Stop local Elasticsearch cluster
114
116
````
115
117
docker-compose down
116
118
````
117
119
118
-
### Import API-Builder Traffic-Monitor API
119
-
To secure access to your Elasticsearch instance you can import the API Builder REST-API into your API-Manager. You can access the Swagger/OpenAPI definition here:
120
+
### Securing API-Builder Traffic-Monitor API
121
+
The API-Builder project for providing access to Elasticsearch data has no access restrictions right now. To ensure only API-Gateway Manager users (topology administrators with proper RBAC role) or other users with appropriate access rights can query the log data, one can expose this API via API-Manager and add security here.
122
+
123
+
To import the API Builder project REST-API into your API-Manager, you can access the Swagger/OpenAPI definition here (replace docker-host and port appropriately for the container that is hosting the API-Builder project):
0 commit comments