|
| 1 | +# :simple-owasp: SRVDNSRelation |
| 2 | + |
| 3 | +The **SRVDNSRelation** in the [OWASP](https://owasp.org) [Open Asset Model](https://github.com/owasp-amass/open-asset-model) (OAM) is used to represent DNS SRV (Service) records, which include detailed routing information for locating services such as SIP, XMPP, or LDAP. |
| 4 | + |
| 5 | +- **Definition:** An `SRVDNSRelation` captures the mapping from a DNS service name (e.g., `_sip._tcp.example.com`) to a target host or IP address, along with structured metadata including **priority**, **weight**, and **port**. These attributes are fundamental to how SRV records guide service resolution. |
| 6 | + |
| 7 | +- **Purpose:** This relation type is essential for modeling DNS-based service discovery mechanisms where clients need to select among multiple service endpoints based on priority and load-balancing rules. Including all SRV-specific attributes enables accurate representation of how services are discovered and accessed in real-world deployments. |
| 8 | + |
| 9 | +- **Design Choice:** `SRVDNSRelation` is a more detailed extension of DNS relation types like `BasicDNSRelation` or `PrefDNSRelation`. It includes: |
| 10 | + - `priority`: Defines the order in which targets should be attempted (lower is tried first). |
| 11 | + - `weight`: Used for load balancing among targets with the same priority. |
| 12 | + - `port`: Indicates the port on which the service is running. |
| 13 | + |
| 14 | +This richer structure allows for nuanced modeling of service behaviors and routing policies that simpler DNS relations cannot capture. |
| 15 | + |
| 16 | +In summary, `SRVDNSRelation` brings full support for SRV record semantics into the OAM, enabling accurate modeling of service-based resolution patterns that are critical in modern, distributed infrastructure. |
| 17 | + |
| 18 | +## :material-relation-one-to-one: SRVDNSRelation Attributes |
| 19 | + |
| 20 | +| Attributes | Type | Required | Description | |
| 21 | +| -------- | ---- | :--------: | ----------- | |
| 22 | +| `label` | string | :material-check-decagram: | The label for the relation between two assets | |
| 23 | +| `header.rr_type` | number | :material-check-decagram: | Specifies the type of resource within the DNS record | |
| 24 | +| `header.class` | number | :material-checkbox-blank-circle-outline: | 1, IN class (Internet), is the most commonly used | |
| 25 | +| `header.ttl` | number | :material-checkbox-blank-circle-outline: | Specifies how long a DNS record should be cached | |
| 26 | +| `priority` | number | :material-checkbox-blank-circle-outline: | Captures the priority value for this record | |
| 27 | +| `weight` | number | :material-checkbox-blank-circle-outline: | Captures the weight value for this record | |
| 28 | +| `port` | number | :material-check-decagram: | Indicates the port on which the service is running | |
| 29 | + |
| 30 | +## :material-relation-one-to-one: SRVDNSRelation Properties |
| 31 | + |
| 32 | +| Property Type | Property Name | Description | |
| 33 | +| :--------------: | :---------------: | :------------ | |
| 34 | +| [`SimpleProperty`](../properties/simple_property.md) | `last_monitored` | Tracks when a data source was last queried regarding this relationship | |
| 35 | +| [`SourceProperty`](../properties/source_property.md) | Source Plugin Name | Indicates that the specified data source discovered this SRVDNSRelation | |
0 commit comments