# Query Service

ESS provides a Query service that allows a Pod Owner (or other agents with Control access to the Pod) to query RDF (Resource Description Framework) data in the Pod. Specifically, the ESS Query service provides a [Quad Pattern Fragment (QPF)](https://linkeddatafragments.org/specification/quad-pattern-fragments/) interface that the Pod Owner (or other agents with Control access to the Pod) can use to query RDF data.

See also:

* [QPF Specification](https://linkeddatafragments.org/specification/quad-pattern-fragments/)

## QPF Query Service

ESS Query service has the following QPF endpoint:

```html
https://fragments.{ESS DOMAIN}/qpf
```

## Query Parameters

To query a Pod using QPF, you can specify the following query parameters to the service as part of a **`GET`** operation:

```
?storage={POD}&subject={SUBJECT}&predicate={PREDICATE}&object={OBJECT}&graph={GRAPH}
```

{% hint style="info" %}
**Tip**\
The Query service includes the [Hypermedia Control](#hypermedia-control) as part of every result set. You can issue a **`GET`** to the service with only the **`storage`** parameter set (i.e., omit the data matching pattern parameters) to return just the [Hypermedia Control](#hypermedia-control).

The [Hypermedia Control](#hypermedia-control) provides the supported query template and mapping of the [QPF quad pattern selector](https://linkeddatafragments.org/specification/quad-pattern-fragments/#definition) parameters for querying data.

The table of parameters is provided below to complement the returned [Hypermedia Control](#hypermedia-control) information. However, [Hypermedia Control](#hypermedia-control) acts as the definitive source.
{% endhint %}

<table><thead><tr><th width="156.96875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>storage</code></strong></td><td><p><strong>Required.</strong> URL of the Pod to query.<br><br>URL-encode the value.<br><br>If the <strong><code>storage</code></strong> parameter is omitted, ESS Query service returns a <strong><code>400 Bad Request</code></strong>.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong><br>- <strong><code>storage</code></strong> is an ESS-specific parameter.<br>- The querying agent must be either the Pod Owner or another agent with Control access to the Pod.</p></div></td></tr><tr><td><strong><code>subject</code></strong></td><td>The subject to match, as defined in the QPF quad pattern selector.<br><br>Triples with blank node values will be normalized into statements with URIs.<br><br>URL-encode the value.</td></tr><tr><td><strong><code>predicate</code></strong></td><td>The predicate to match, as defined in the <a href="https://linkeddatafragments.org/specification/quad-pattern-fragments/#definition">QPF quad pattern selector</a>.<br><br>URL-encode the value.</td></tr><tr><td><strong><code>object</code></strong></td><td>The object to match, as defined in the <a href="https://linkeddatafragments.org/specification/quad-pattern-fragments/#definition">QPF quad pattern selector</a>.<br><br>URL-encode the value.</td></tr><tr><td><strong><code>graph</code></strong></td><td>The graph (the URL of the Resource) to match, as defined in the <a href="https://linkeddatafragments.org/specification/quad-pattern-fragments/#definition">QPF quad pattern selector</a>.<br><br>URL-encode the value.</td></tr></tbody></table>

## Query Response

{% hint style="warning" %}
**Important**\
The query results may lag behind the current state of the Resource. For more details, see [Query Service Indexer](https://docs.inrupt.com/ess/2.5/services/service-query/query-indexer).
{% endhint %}

The response includes:

* [Hypermedia Control](#hypermedia-control) that includes the search pattern template.
* [Metadata](#metadata) that includes the *estimated* count of matching data and links for pagination.
* [Matching Data Results](#matching-data-results) that includes up to [**`INRUPT_FRAGMENTS_PAGE_SIZE`**](#inrupt_fragments_page_size) number of matching records.

For example:

```turtle
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix hydra: <http://www.w3.org/ns/hydra/core#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sd:    <http://www.w3.org/ns/sparql-service-description#> .
@prefix void:  <http://rdfs.org/ns/void#> .
_:b0 {
    <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F>
         void:subset   <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article> ;
         hydra:search  [ hydra:mapping   [ hydra:property  sd:graph ;
                                           hydra:variable  "graph"
                                         ] ;
                         hydra:mapping   [ hydra:property  rdf:subject ;
                                           hydra:variable  "subject"
                                         ] ;
                         hydra:mapping   [ hydra:property  rdf:predicate ;
                                           hydra:variable  "predicate"
                                         ] ;
                         hydra:mapping   [ hydra:property  rdf:object ;
                                           hydra:variable  "object"
                                         ] ;
                         hydra:template  "https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F{&graph,subject,predicate,object}"
                       ] .
    _:b0    foaf:primaryTopic  <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article> .
    <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article>
         void:subset            <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article> ;
         void:triples           "10"^^<http://www.w3.org/2001/XMLSchema#long> ;
         hydra:next             <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article&after=285896126> ;
         hydra:previous         <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article&before=285896101> ;
         hydra:view             <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article> ;
         foaf:isPrimaryTopicOf  _:b0 .
}
<https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList> {
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title2>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title0>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title3>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title1>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title4>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
}
<https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList> {
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title3>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title1>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title4>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title2>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title0>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
}
```

### Hypermedia Control

Per the [Quad Pattern Fragment (QPF)](https://linkeddatafragments.org/specification/quad-pattern-fragments/) specification, successful query response includes the Hypermedia controls. The returned Hypermedia controls includes the search pattern template.

For example:

```turtle
<https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F>
   void:subset   <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article> ;
   hydra:search  [ hydra:mapping   [ hydra:property  sd:graph ;
                                     hydra:variable  "graph"
                                   ] ;
                   hydra:mapping   [ hydra:property  rdf:subject ;
                                     hydra:variable  "subject"
                                   ] ;
                   hydra:mapping   [ hydra:property  rdf:predicate ;
                                     hydra:variable  "predicate"
                                   ] ;
                   hydra:mapping   [ hydra:property  rdf:object ;
                                     hydra:variable  "object"
                                   ] ;
                   hydra:template  "https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F{&graph,subject,predicate,object}"
                 ] .
```

For more information, see Hypermedia controls in the QPF specification.

### Metadata

Per the [Quad Pattern Fragment (QPF)](https://linkeddatafragments.org/specification/quad-pattern-fragments/) specification, a successful query response includes the metadata.

The returned metadata includes:

* An estimate of the number of matches.
* [Pagination links](https://linkeddatafragments.org/specification/quad-pattern-fragments/#paging)

For example:

```turtle
_:b0    foaf:primaryTopic  <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article> .
<https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article>
     void:subset            <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article> ;
     void:triples           "10"^^<http://www.w3.org/2001/XMLSchema#long> ;
     hydra:next             <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article&after=285896126> ;
     hydra:previous         <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article&before=285896101> ;
     hydra:view             <https://fragments.example.com/qpf?storage=https%3A%2F%2Fstorage.example.com%2Fa211ad26-zzzz-9999-8b20-acb3aed0e369%2F&object=https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Article> ;
     foaf:isPrimaryTopicOf  _:b0 .
```

For more information, see [metadata](https://linkeddatafragments.org/specification/quad-pattern-fragments/#metadata) section in the QPF specification.

### Matching Data Results

{% hint style="info" %}
**Note**

* ESS Query service only returns matching data from the data that has been indexed.
* Because the resource indexing occurs after the [indexer](https://docs.inrupt.com/ess/2.5/services/service-query/query-indexer) consumes a resource change notification event, the query results may lag behind the current state of the Resource.
  {% endhint %}

A successful query response includes the [matching data in triples](https://linkeddatafragments.org/specification/quad-pattern-fragments/#data).

For example,

```turtle
<https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList> {
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title2>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title0>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title3>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title1>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/myList#title4>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
}
<https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList> {
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title3>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title1>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title4>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title2>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
    <https://storage.example.com/a211ad26-zzzz-9999-8b20-acb3aed0e369/readingLists/publicList#title0>
            rdf:type  <https://www.w3.org/ns/activitystreams#Article> .
}
```

The number of query results returned per page is determined by [**`INRUPT_FRAGMENTS_PAGE_SIZE`**](#inrupt_fragments_page_size). For pagination information, see [Metadata](#metadata).

## Query Service Indexer

To query your data, the Query Service uses an indexer to index your RDF resources; i.e., the the Query Service returns results only from the indexed RDF resources. For more information on the indexer, see [Query Service Indexer](https://docs.inrupt.com/ess/2.5/services/service-query/query-indexer).

## Access Control

#### UMA and Solid-OIDC Access Tokens

For query access to the Pod, the ESS’ Query service can use either:

* [UMA token](https://docs.inrupt.com/ess/2.5/services/service-uma), or
* Solid-OpenID Connect (OIDC) access token.

With the [UMA authorization flow](https://docs.inrupt.com/ess/2.5/services/service-uma):

1. When you issue your query without an access token, the Query service returns a **`401`** along with a [ticket and authorization server in the WWW-Authenticate header](https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html#permission-success-to-client).
2. From the [authorization server](https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html#uma-grant-type), the client can exchange the UMA ticket for the UMA [access token](https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html#uma-grant-type).

* To exchange the UMA ticket for the access token, the client must include its **`client_id`** .

3. Include the access token in the header of your query request and retry.

See also:

* [UMA Configuration](#uma-configuration)
* [OIDC Configuration](#oidc-configuration)

### Querying Agent

Only Agents who have [Control Read access](https://docs.inrupt.com/security/authorization/acp) to the root of the Pod, such as the Pod Owner, can access data from the QPF endpoint.

You can further specify which applications can query the endpoint by granting specific applications appropriate access.

### Indexer

To index the data in a resource, [indexer](https://docs.inrupt.com/ess/2.5/services/service-query/query-indexer) requires Read access to the resource. The Query service only returns results from the indexed RDF resources.

See also:

* [Indexer Configuration](https://docs.inrupt.com/ess/2.5/services/query-indexer#indexer-configuration)

## Configuration

As part of the [installation process](https://docs.inrupt.com/ess/2.5/installation), Inrupt provides base Kustomize overlays and associated files that require deployment-specific configuration inputs.

The following configuration options are available for the service and may be set as part of [updating the inputs for your deployment](https://docs.inrupt.com/ess/installation#step-1-initialize-the-installation-directory). The Inrupt-provided base Kustomize overlays may be using updated configuration values that differ from the default values.

### Query Service Configuration

{% hint style="info" %}
**Note**\
Whitespaces are **preserved** when parsing comma-delimited lists (i.e., the parsed string values are not trimmed). For example, when parsed, **`"value1, value2,value3 "`** results in **`"value1"`** , **`" value2"`** , **`"value3 "`** .
{% endhint %}

#### INRUPT\_FRAGMENTS\_PAGE\_SIZE

Default : **`10`**

The number of matching results per page.

#### QUARKUS\_LOG\_LEVEL

Default : **`INFO`**

Logging level.

### **UMA Configuration**

#### INRUPT\_AUTHZ\_AS\_URI

The URI of the [UMA Authorization Server](https://docs.inrupt.com/ess/2.5/services/service-uma).

The value must match:

* [**`INRUPT_JWT_AUTHORIZATION_SERVER_ISSUER`**](#inrupt_jwt_authorization_server_issuer) configuration for the service.
* [**`INRUPT_UMA_ISSUER`**](https://docs.inrupt.com/ess/2.5/service-uma#inrupt_uma_issuer) configuration for [UMA Service](https://docs.inrupt.com/ess/2.5/services/service-uma).

#### INRUPT\_JWT\_AUTHORIZATION\_SERVER\_ISSUER

The URI of the UMA token issuer.

The value must match [**`INRUPT_AUTHZ_AS_URI`**](#inrupt_authz_as_uri).

#### INRUPT\_JWT\_AUTHORIZATION\_SERVER\_JWKS

The JWKS endpoint of the [**`INRUPT_JWT_AUTHORIZATION_SERVER_ISSUER`**](#inrupt_jwt_authorization_server_issuer).

### **OIDC Configuration**

#### INRUPT\_JWT\_ALLOWED\_SIGNATURE\_ALGORITHMS

Default : **`ES256`** , **`RS256`**

A comma-separated list that specifies the allowed encryption [algorithms](https://www.rfc-editor.org/rfc/rfc7515#section-4.1.1) used to sign ID tokens.

#### INRUPT\_JWT\_ISSUER\_ALLOW\_LIST

A comma-separated list of trusted issuers of Solid-OIDC tokens.

* If unset, the service accepts Solid-OIDC tokens from all issuers with the exception of those in the [**`INRUPT_JWT_ISSUER_DENY_LIST`**](#inrupt_jwt_issuer_deny_list).
* If set, the service accepts only the Solid-OIDC tokens from the issuers in the list with the following exception:
  * If an issuer is in both [**`INRUPT_JWT_ISSUER_ALLOW_LIST`**](#inrupt_jwt_issuer_allow_list) and [**`INRUPT_JWT_ISSUER_DENY_LIST`**](#inrupt_jwt_issuer_deny_list), the [**`INRUPT_JWT_ISSUER_DENY_LIST`**](#inrupt_jwt_issuer_deny_list) supersedes the [**`INRUPT_JWT_ISSUER_ALLOW_LIST`**](#inrupt_jwt_issuer_allow_list) and the issuer is not accepted by ESS.

See also [**`INRUPT_JWT_ISSUER_DENY_LIST`**](#inrupt_jwt_issuer_deny_list).

{% hint style="info" %}
**Tip**\
Ensure that ESS [UMA Service](https://docs.inrupt.com/ess/2.5/services/service-uma)’s [**`INRUPT_JWT_ISSUER_ALLOW_LIST`**](https://docs.inrupt.com/ess/2.5/service-uma#inrupt_jwt_issuer_allow_list) is consistent with the [**`INRUPT_JWT_ISSUER_ALLOW_LIST`**](#inrupt_jwt_issuer_allow_list) value set for this service.
{% endhint %}

#### INRUPT\_JWT\_ISSUER\_DENY\_LIST

A comma-separated list of disallowed issuers of Solid-OIDC tokens.

* If unset, the service accepts Solid-OIDC tokens from all issuers unless [**`INRUPT_JWT_ISSUER_ALLOW_LIST`**](#inrupt_jwt_issuer_allow_list) is set, in which case, the service only accepts tokens from those in the [**`INRUPT_JWT_ISSUER_ALLOW_LIST`**](#inrupt_jwt_issuer_allow_list).
* If set, the service disallows the Solid-OIDC tokens from the issuers in the list. If [**`INRUPT_JWT_ISSUER_ALLOW_LIST`**](#inrupt_jwt_issuer_allow_list) is also set, issuers not in the [**`INRUPT_JWT_ISSUER_ALLOW_LIST`**](#inrupt_jwt_issuer_allow_list) are also disallowed.

{% hint style="info" %}
**Tip**\
Ensure that ESS’ [UMA Service](https://docs.inrupt.com/ess/2.5/services/service-uma)'s [**`INRUPT_JWT_ISSUER_DENY_LIST`**](https://docs.inrupt.com/ess/2.5/service-uma#inrupt_jwt_issuer_deny_list) is consistent with the [**`INRUPT_JWT_ISSUER_DENY_LIST`**](#inrupt_jwt_issuer_deny_list) value set for this service.
{% endhint %}

### **Kafka Configuration**

{% hint style="info" %}
**Tip**\
See also [ESS’ Kafka Configuration](https://docs.inrupt.com/ess/2.5/services/appendix/appendix-kafka-configuration)
{% endhint %}

#### INRUPT\_KAFKA\_AUDITV1EVENTSENCRYPTED\_CIPHER\_PASSWORD

The strong cipher key to use when running auditing with encrypted messages over the **`auditv1eventsencrypted`** topic.

#### INRUPT\_KAFKA\_AUDITV1EVENTSPRODUCERENCRYPTED\_CIPHER\_PASSWORD

The strong cipher key to use when running auditing with encrypted messages over the **`auditv1eventsproducerencrypted`** topic.

#### KAFKA\_BOOTSTRAP\_SERVERS

Default : **`localhost:9092`**

Comma-delimited list of Kafka broker servers for use by ESS services.

Setting [**`KAFKA_BOOTSTRAP_SERVERS`**](#kafka_bootstrap_servers) configures ESS to use the same Kafka instance(s) for all its Kafka message channels (e.g., **`solidresource`** and **`auditv1out`** message channels). The UMA service uses the **`auditv1out`** message channel.

{% hint style="info" %}
Inrupt-provided overlays default to using [**`KAFKA_BOOTSTRAP_SERVERS`**](#kafka_bootstrap_servers).

To use a different Kafka instance for the **`auditv1out`** channel, use specific message channel configuration.
{% endhint %}

See also [ESS’ Kafka Configuration](https://docs.inrupt.com/ess/2.5/services/appendix/appendix-kafka-configuration).

### **Configuration Logging**

ESS services log their startup configuration.

#### INRUPT\_LOGGING\_CONFIGURATION\_PREFIX\_ALLOW

Default : inrupt,smallrye.jwt.expiration.grace,mp.jwt.verify.clock.skew,smallrye.jwt.always-check-authorization,smallrye.jwt.token.decryption.kid,smallrye.jwt.token.schemes,smallrye.jwt.require.named-principal,smallrye.jwt.time-to-live,smallrye.jwt.jwks.refresh-interval,smallrye.jwt.jwks.forced-refresh-interval,smallrye.jwt.required.claims,mp.jwt.verify.audiences

A comma-separated list of configuration property prefixes ( **case-sensitive** ) that determine which configurations are logged:

* If the list is empty, **NO** configuration property is logged.
* If a configuration property starts with a listed prefix ( **case-sensitive** ), the configuration property and its value are logged **unless** the configuration also matches a prefix in [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_DENY`**](#inrupt_logging_configuration_prefix_deny) (which acts as a filter on [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_ALLOW`**](#inrupt_logging_configuration_prefix_allow) list).\
  As such, if the configuration matches prefix in both [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_ALLOW`**](#inrupt_logging_configuration_prefix_allow) and [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_DENY`**](#inrupt_logging_configuration_prefix_deny), the [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_DENY`**](#inrupt_logging_configuration_prefix_deny) takes precedence and the configuration is not logged. For example, if **`inrupt.`** is an allow prefix, but **`inrupt.kafka.`** is a deny prefix, all configurations that start with **`inrupt.kafka.`** are excluded from the logs.

When specifying the prefixes, you can specify the prefixes using one of two formats:

* using dot notation (e.g., **`inrupt.foobar.`** ), or
* using the MicroProfile Config environmental variables conversion value (e.g., **`INRUPT_FOOBAR_`** ).

{% hint style="info" %}
**Warning**\
Use the same format for **both** [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_ALLOW`**](#inrupt_logging_configuration_prefix_allow) and [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_DENY`**](#inrupt_logging_configuration_prefix_deny).

For example, if you change the format of [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_ALLOW`**](#inrupt_logging_configuration_prefix_allow), change the format of [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_DENY`**](#inrupt_logging_configuration_prefix_deny) as well.
{% endhint %}

{% hint style="info" %}
**Tip**\
To avoid allowing more than desired configurations, specify as much of the prefix as possible. If the prefix specifies the complete prefix term, include the term delineator. For example:

* If using dot-notation, if you want to match configuration properties of the form **`foobar.<xxxx>...`** , specify **`foobar.`** (including the dot **`.`** ) instead of, for example, **`foo`** or **`foobar`** .
* If using converted form, if you want to match configuration properties of the form **`FOOBAR_<XXXX>...`** , specify **`FOOBAR_`** (including the underscore **`_`** ) instead of, for example, **`FOO`** or **`FOOBAR`** .
  {% endhint %}

#### INRUPT\_LOGGING\_CONFIGURATION\_PREFIX\_DENY

Default : inrupt.kafka

A comma-separated list of configuration name prefixes ( **case-sensitive** ) that determines which configurations (that would otherwise match the [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_ALLOW`**](#inrupt_logging_configuration_prefix_allow) ) are not logged. That is, [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_DENY`**](#inrupt_logging_configuration_prefix_deny) acts as a filter on [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_ALLOW`**](#inrupt_logging_configuration_prefix_allow). For example:

* If **`foobar.`** is an allowed prefix, to suppress **`foobar.private.<anything>`** , you can specify **`foobar.private.`** to the deny list.
* If **`foobar.`** is **not** an allowed prefix, no property starting with **`foobar.`** is logged. As such, you do not need to specify **`foobar.private`** to the deny list.

When specifying the prefixes, you can specify the prefixes using one of two formats:

* using dot notation (e.g., **`inrupt.foobar.`** ), or
* using the MicroProfile Config environmental variables conversion value (e.g., **`INRUPT_FOOBAR_`** ).

{% hint style="info" %}
**Warning**\
Use the same format for **both** [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_ALLOW`**](#inrupt_logging_configuration_prefix_allow) and [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_DENY`**](#inrupt_logging_configuration_prefix_deny).

For example, if you change the format of [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_ALLOW`**](#inrupt_logging_configuration_prefix_allow), change the format of [**`INRUPT_LOGGING_CONFIGURATION_PREFIX_DENY`**](#inrupt_logging_configuration_prefix_deny) as well.
{% endhint %}

### **Logging Redaction**

#### INRUPT\_LOGGING\_REDACTION\_NAME\_ACTION

Default : **`REPLACE`**

Type of the redaction to perform. Supported values are:

<table><thead><tr><th width="120.0582275390625">Action</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>REPLACE</code></strong></td><td>Default. Replaces the matching text with a specified replacement.</td></tr><tr><td><strong><code>PLAIN</code></strong></td><td>Leaves the matching field unprocessed. Only available if the redaction target is a field (i.e., <strong><code>INRUPT_LOGGING_REDACTION_{NAME}_FIELD</code></strong>).</td></tr><tr><td><strong><code>DROP</code></strong></td><td>Suppresses the matching field. Only available if the redaction target is a field (i.e., <strong><code>INRUPT_LOGGING_REDACTION_{NAME}_FIELD</code></strong>).</td></tr><tr><td><strong><code>PRIORITIZE</code></strong></td><td>Changes the log level of the matching message.</td></tr><tr><td><strong><code>SHA256</code></strong></td><td>Replaces the matching text with its hash.</td></tr></tbody></table>

* If the action is **`REPLACE`** ( *default* ), see also **`INRUPT_LOGGING_REDACTION_{NAME}_REPLACEMENT`** .
* If the action is to **`PRIORITIZE`** , see also **`INRUPT_LOGGING_REDACTION_{NAME}_LEVEL`** .

For more information on log redaction, see [Logging Redaction](https://docs.inrupt.com/ess/2.5/administration/logging/logging-redaction).

#### INRUPT\_LOGGING\_REDACTION\_NAME\_ENABLED

Default : **`true`**

A boolean that determines whether the redaction configurations with the specified **`INRUPT_LOGGING_REDACTION_{NAME}_`** prefix is enabled.

For more information on log redaction, see [Logging Redaction](https://docs.inrupt.com/ess/2.5/administration/logging/logging-redaction).

#### INRUPT\_LOGGING\_REDACTION\_NAME\_EXCEPTION

Fully qualified name of the exception class to match in the log messages (includes inner exception). Configure to target an exception message class.

For more information on log redaction, see [Logging Redaction](https://docs.inrupt.com/ess/2.5/administration/logging/logging-redaction).

#### INRUPT\_LOGGING\_REDACTION\_NAME\_FIELD

Exact name of the field to match in the log messages. Configure to target a specific log message field for redaction.

For more information on log redaction, see [Logging Redaction](https://docs.inrupt.com/ess/2.5/administration/logging/logging-redaction).

#### INRUPT\_LOGGING\_REDACTION\_NAME\_LEVEL

A new log level to use for the log message if the **`INRUPT_LOGGING_REDACTION_{NAME}_ACTION`** is **`PRIORITIZE`**.

#### INRUPT\_LOGGING\_REDACTION\_NAME\_PATTERN\\

A regex (see [Java regex pattern](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html#sum)) to match in the log messages. Configure to target log message text that matches a specified pattern.

For more information on log redaction, see [Logging Redaction](https://docs.inrupt.com/ess/2.5/administration/logging/logging-redaction).

#### INRUPT\_LOGGING\_REDACTION\_NAME\_REPLACEMENT

Replacement text to use if the **`INRUPT_LOGGING_REDACTION_{NAME}_ACTION`** is **`REPLACE`**.

If unspecified, defaults to **`[REDACTED]`**.

For more information on log redaction, see [Logging Redaction](https://docs.inrupt.com/ess/2.5/administration/logging/logging-redaction).

### **Application-Defined Metadata Propagation**

#### INRUPT\_AUDIT\_PRODUCER\_REQUEST\_METADATA\_ALLOW

A comma-separated list of application-defined properties that can be included in the associated audit events (unless specified in the corresponding [**`INRUPT_AUDIT_PRODUCER_REQUEST_METADATA_DENY`**](#inrupt_audit_producer_request_metadata_deny)).

This configuration is **case-sensitive** to the propagated properties in the baggage.

{% hint style="info" %}
**Tip**\
To include a propagated property that was added via the [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW`**](#inrupt_request_metadata_propagator_header_allow) configuration, ensure that the cases of these properties match.
{% endhint %}

See:

* [Manage Application-Defined Metadata Propagation](https://docs.inrupt.com/ess/2.5/installation/customize-configurations/customization-logging/manage-app-defined-metadata) to configure.
* [Application-Defined Metadata](https://docs.inrupt.com/ess/2.5/administration/application-defined-metadata) for more information.

#### INRUPT\_AUDIT\_PRODUCER\_REQUEST\_METADATA\_DENY

A comma-separated list of application-defined properties to exclude from the associated audit messages. This setting takes precedence over [**`INRUPT_AUDIT_PRODUCER_REQUEST_METADATA_ALLOW`**](#inrupt_audit_producer_request_metadata_allow).

This configuration is **case-sensitive** to the propagated properties in the baggage.

{% hint style="info" %}
**Tip**\
To exclude a propagated property that was added via the [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW`**](#inrupt_request_metadata_propagator_header_allow) configuration, ensure that the cases of these properties match.
{% endhint %}

See:

* [Manage Application-Defined Metadata Propagation](https://docs.inrupt.com/ess/2.5/installation/customize-configurations/customization-logging/manage-app-defined-metadata) to configure.
* [Application-Defined Metadata](https://docs.inrupt.com/ess/2.5/administration/application-defined-metadata) for more information.

#### INRUPT\_LOGGING\_REQUEST\_METADATA\_ALLOW

A comma-separated list of application-defined properties that can be included in the associated log messages (unless specified in the corresponding [**`INRUPT_LOGGING_REQUEST_METADATA_DENY`**](#inrupt_logging_request_metadata_deny)).

This configuration is **case-sensitive** to the propagated properties in the baggage.

{% hint style="info" %}
**Tip**\
To include a propagated property that was added via the [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW`**](#inrupt_request_metadata_propagator_header_allow) configuration, ensure that the cases of these properties match.
{% endhint %}

See:

* [Manage Application-Defined Metadata Propagation](https://docs.inrupt.com/ess/2.5/installation/customize-configurations/customization-logging/manage-app-defined-metadata) to configure.
* [Application-Defined Metadata](https://docs.inrupt.com/ess/2.5/administration/application-defined-metadata) for more information.

#### INRUPT\_LOGGING\_REQUEST\_METADATA\_DENY

A comma-separated list of application-defined properties to exclude from the associated log messages. This setting takes precedence over [**`INRUPT_LOGGING_REQUEST_METADATA_ALLOW`**](#inrupt_logging_request_metadata_allow).

This configuration is **case-sensitive** to the propagated properties in the baggage.

{% hint style="info" %}
**Tip**\
To exclude a propagated property that was added via the [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW`**](#inrupt_request_metadata_propagator_header_allow) configuration, ensure that the cases of these properties match.
{% endhint %}

See:

* [Manage Application-Defined Metadata Propagation](https://docs.inrupt.com/ess/2.5/installation/customize-configurations/customization-logging/manage-app-defined-metadata) to configure.
* [Application-Defined Metadata](https://docs.inrupt.com/ess/2.5/administration/application-defined-metadata) for more information.

#### INRUPT\_REQUEST\_METADATA\_PROPAGATOR\_HEADER\_ALLOW

A comma-separated list of non-baggage request headers to add to the baggage (unless specified in the corresponding [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_DENY`**](#inrupt_request_metadata_propagator_header_deny)); i.e., include these non-baggage request headers as application-defined properties.

The configuration is case-insensitive; i.e., the listed headers do **not** need to match the case of the client request headers. For example, a list that includes **`x-correlation-id`** can match **`x-correlation-id`** header, **`X-CoRrElAtIoN-Id`** header, etc.

See:

* [Manage Application-Defined Metadata Propagation](https://docs.inrupt.com/ess/2.5/installation/customize-configurations/customization-logging/manage-app-defined-metadata) to configure.
* [Application-Defined Metadata](https://docs.inrupt.com/ess/2.5/administration/application-defined-metadata) for more information.

#### INRUPT\_REQUEST\_METADATA\_PROPAGATOR\_HEADER\_DENY

A comma-separated list of non-baggage request headers to exclude from being added to the baggage; i.e., excludes these headers as application-defined properties. This setting takes precedence over [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW`**](#inrupt_request_metadata_propagator_header_allow).

The configuration is case-insensitive; i.e., the listed headers do **not** need to match the case of the client request headers. For example, a list that includes **`x-correlation-id`** can match (and exclude) **`x-correlation-id`** header, **`X-CoRrElAtIoN-Id`** header, etc.

See:

* [Manage Application-Defined Metadata Propagation](https://docs.inrupt.com/ess/2.5/installation/customize-configurations/customization-logging/manage-app-defined-metadata) to configure.
* [Application-Defined Metadata](https://docs.inrupt.com/ess/2.5/administration/application-defined-metadata) for more information.

#### INRUPT\_REQUEST\_METADATA\_PROPAGATOR\_HEADER\_OVERRIDES

A flag that determines ESS behavior when metadata property is defined both as a header and as a baggage entry:

* If **`true`** , ESS updates/overrides the baggage entry with the header value.
* If **`false`** (the default), ESS keeps the baggage entry.

For details, [Duplicate Property Definition](https://docs.inrupt.com/ess/administration/application-defined-metadata#duplicate-property-definition).

#### INRUPT\_REQUEST\_METADATA\_REFLECTOR\_HEADER\_ALLOW

A comma-separated list of application-defined properties that can return as response headers (unless specified in the corresponding [**`INRUPT_REQUEST_METADATA_REFLECTOR_HEADER_DENY`**](#inrupt_request_metadata_reflector_header_deny)).

This configuration is **case-sensitive** to the propagated properties in the baggage.

{% hint style="info" %}
**Tip**

* To return a propagated property that was added via the [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW`**](#inrupt_request_metadata_propagator_header_allow) configuration, ensure that the cases of these properties match.
* You may need to update **`QUARKUS_HTTP_CORS_EXPOSED_HEADERS`** to extend the list of [CORS-safelisted response headers](https://developer.mozilla.org/en-US/docs/Glossary/CORS-safelisted_response_header).
  {% endhint %}

See:

* [Manage Application-Defined Metadata Propagation](https://docs.inrupt.com/ess/2.5/installation/customize-configurations/customization-logging/manage-app-defined-metadata) to configure.
* [Application-Defined Metadata](https://docs.inrupt.com/ess/2.5/administration/application-defined-metadata) for more information.

#### INRUPT\_REQUEST\_METADATA\_REFLECTOR\_HEADER\_DENY

A comma-separated list of application-defined properties to exclude from returning as response headers. This setting takes precedence over [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW`**](#inrupt_request_metadata_propagator_header_allow).

This configuration is **case-sensitive** to the propagated properties in the baggage.

{% hint style="info" %}
**Tip**\
To exclude a propagated property that was added via the [**`INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW`**](#inrupt_request_metadata_propagator_header_allow) configuration, ensure that the cases of these properties match.
{% endhint %}

See:

* [Manage Application-Defined Metadata Propagation](https://docs.inrupt.com/ess/2.5/installation/customize-configurations/customization-logging/manage-app-defined-metadata) to configure.
* [Application-Defined Metadata](https://docs.inrupt.com/ess/2.5/administration/application-defined-metadata) for more information.

### **Purge Configuration**

The Query service contains user data, and as such it can be purged upon user request. See the [Purger documentation](https://docs.inrupt.com/ess/2.5/services/service-purger)(../service-purger/) for more information about the data being purged.

#### INRUPT\_PURGE\_BATCH\_SIZE

Default : **`100`**

The maximum number of records that the purge task will purge in each batch. This must be a non-zero, positive integer.

{% hint style="info" %}
Changed in version 2.3.0.
{% endhint %}

#### INRUPT\_PURGE\_CLEANUP\_TASK\_EVERY

Default : **`PT5H`**

Frequency at which a task goes through stored purge statuses to clear any which are beyond their retention window.

{% hint style="info" %}
Changed in version 2.3.0.
{% endhint %}

#### INRUPT\_PURGE\_IN\_PROGRESS\_TIMEOUT\_SECONDS

Default : **`120`**

Timeout after which an ongoing purge task is considered stale. Stale tasks are picked up by an ESS background process to be taken to completion. By keeping track of a purge task’s state (active or stale) the service can ensure that a purge which was started will eventually reach completion, even if the system is disrupted whilst the asynchronous purge process is ongoing.

{% hint style="info" %}
Changed in version 2.3.0.
{% endhint %}

#### INRUPT\_PURGE\_PROCESS\_TASK\_EVERY

Default : **`PT5M`**

Frequency at which an ESS background process goes through ongoing purges to pick up the incomplete stale ones. See [**`INRUPT_PURGE_IN_PROGRESS_TIMEOUT_SECONDS`**](#inrupt_purge_in_progress_timeout_seconds) for additional details.

{% hint style="info" %}
Changed in version 2.3.0.
{% endhint %}

#### INRUPT\_PURGE\_STATUS\_RETENTION\_WINDOW

Default : **`P2D`**

Duration after which a purge task status will be cleared from storage. The purge task contains some Personally Identifying Data (such as the WebID), so ensuring it is cleared after a purge is required for compliance.

{% hint style="info" %}
Changed in version 2.3.0.
{% endhint %}

## Additional Information

See also [Quarkus Configuration Options](https://quarkus.io/guides/all-config).
