53 lines
2.6 KiB
Markdown
53 lines
2.6 KiB
Markdown
# NetBox GeoFeed Web Application
|
|
|
|
## Overview
|
|
|
|
This web application provides a self-published IP geolocation feed, conforming to the standards set out in [RFC 8805](https://www.rfc-editor.org/rfc/rfc8805). It is designed to interface with NetBox, a web-based infrastructure resource modeling (IRM) tool, to retrieve and format geolocation data for IP addresses.
|
|
|
|
The application is implemented in C# using .NET 8.0, ensuring a robust and modern back-end architecture. It's built to communicate securely over HTTPS with the NetBox API, adhering to best practices for data transmission and security.
|
|
|
|
## Features
|
|
|
|
- **GeoFeed Generation**: Dynamically generates a geolocation feed in CSV format as specified in RFC 8805.
|
|
- **Caching Mechanism**: Implements an efficient caching strategy to reduce redundant API calls and enhance performance.
|
|
- **Secure Communication**: Ensures secure data retrieval from NetBox over HTTPS.
|
|
|
|
## Configuration
|
|
|
|
The application requires the following configuration variables to be set:
|
|
|
|
1. **APIKey**: This is the API key used for authenticating with the NetBox API. Ensure this key has the necessary permissions to access the required resources.
|
|
2. **NetBoxHost**: The hostname of the NetBox instance from which the application retrieves data. For example, `netbox.example.com`.
|
|
|
|
These variables can be set in your application's configuration file or through environment variables, depending on your deployment strategy.
|
|
|
|
## Getting Started
|
|
|
|
To build and run the application, follow these steps:
|
|
|
|
1. Ensure you have .NET 8.0 SDK installed on your machine.
|
|
2. Clone the repository to your local machine.
|
|
3. Navigate to the root directory of the project via a command line interface (CLI).
|
|
4. Run the command `dotnet build` to build the application. This will compile the source code and prepare it for execution.
|
|
5. After a successful build, you can start the application by running `dotnet run`.
|
|
6. The application will start, and you can access the endpoints as specified.
|
|
|
|
## Docker Build
|
|
|
|
A Dockerfile is provided for your convienence. This has not been tested as of yet.
|
|
|
|
## Endpoints
|
|
|
|
The application provides the following key endpoints:
|
|
|
|
- `/geofeed`: Returns the GeoFeed data in CSV format.
|
|
- `/geofeed.csv`: Also returns the GeoFeed data in CSV format, typically used for downloading the file.
|
|
|
|
## Security and Compliance
|
|
|
|
This application is designed to always communicate over HTTPS with NetBox, ensuring that the data transfer is encrypted and secure.
|
|
|
|
---
|
|
|
|
For more information about configuring and using this application, please refer to the official .NET documentation and the NetBox API guide.
|