|
77 | 77 |
|
78 | 78 | iv. Chirpstack Gateway (UDP from gateways to Chirpstack): 1700 |
79 | 79 |
|
| 80 | +7. For communicating with the chirpstack api, which is necessary for OS2IoT to work, it is necessary to create a api key on Chirpstack, which you must insert in the environment variable: :code:`CHIRPSTACK_API_KEY`. |
| 81 | +Access the chirpstack page on http://localhost:8080, navigate to API Keys under Network Server in the sidebar, and create the api key. After this, you must create an .env file where you fill out the :code:`CHIRPSTACK_API_KEY` with the api key created in chirpstack. |
| 82 | + |
80 | 83 | Troubleshooting |
81 | 84 | ^^^^^^^^^^^^^^^ |
82 | 85 |
|
@@ -264,6 +267,51 @@ OS2IoT-backend takes several environment variables as configuration, if these ar |
264 | 267 | | CHIRPSTACK_PORT | Chirpstack port | :code:`8080` | |
265 | 268 | +-------------------------------+------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ |
266 | 269 |
|
| 270 | +We recommend disabling the HTTP "Server" header in your responses, as it can reveal information that may expose your application to vulnerabilities. |
| 271 | +The following example demonstrates how to disable the HTTP "Server" header when running in Kubernetes with an Istio setup. |
| 272 | +
|
| 273 | +Create a new file named envoyfilter.yaml and place it in the helm/template directory. |
| 274 | +
|
| 275 | +a. Add the following content to envoyfilter.yaml: |
| 276 | +
|
| 277 | +.. code-block:: bash |
| 278 | +
|
| 279 | + apiVersion: networking.istio.io/v1alpha3 |
| 280 | + kind: EnvoyFilter |
| 281 | + metadata: |
| 282 | + name: ef-removeserver |
| 283 | + namespace: {{ .Values.envoyFilter.namespace }} |
| 284 | + spec: |
| 285 | + configPatches: |
| 286 | + - applyTo: NETWORK_FILTER |
| 287 | + match: |
| 288 | + listener: |
| 289 | + filterChain: |
| 290 | + filter: |
| 291 | + name: "envoy.filters.network.http_connection_manager" |
| 292 | + patch: |
| 293 | + operation: MERGE |
| 294 | + value: |
| 295 | + typed_config: |
| 296 | + "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager" |
| 297 | + server_header_transformation: PASS_THROUGH |
| 298 | + - applyTo: ROUTE_CONFIGURATION |
| 299 | + patch: |
| 300 | + operation: MERGE |
| 301 | + value: |
| 302 | + response_headers_to_remove: |
| 303 | + - "x-envoy-upstream-service-time" |
| 304 | + - "server" |
| 305 | +
|
| 306 | +2. In the values.yaml file for your backend Helm chart, add the following configuration: |
| 307 | +
|
| 308 | +.. code-block:: bash |
| 309 | +
|
| 310 | + # Add EnvoyFilter settings here |
| 311 | + envoyFilter: |
| 312 | + enabled: true # Set to 'false' to disable the filter |
| 313 | + namespace: "istio-system" # The namespace where the EnvoyFilter should be applied |
| 314 | +
|
267 | 315 | Logs levels |
268 | 316 | """"""""""""""" |
269 | 317 | Specifying a LOG_LEVEL makes sure that only logs with that level or higher are included. Using 'debug' or 'verbose' LOG_LEVEL in a production environment is not recommended. |
|
0 commit comments