> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/access/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/access/configuration-reference/property-expansion.md).

# Property expansion

## Introduction

Property expansion is the process of replacing a value, or a part of a value, with the result of an expression.

The actual expression is a (dot-separated) path to another element in the same (logical) configuration.

Expansion expressions are written in the following format:

```
"${path.to.property}"
```

{% hint style="info" %}
Expansion is performed *after* file inclusion allowing included files to also contain expansions.
{% endhint %}

## Syntax

An expansion expression *MUST*:

* be in string format (`"..."`)
* start with `${`
* end with `}`
* contain only a (dot-separated) path to another property in the current configuration

```
{
    "property": "${path.to.property}",
}
```

Expansion expression *MAY*:

* be embedded in a string
* be combined

```
{
    "embedded": "Embedded: ${path.to.property}",
    "combined": "test-${path.to.property01}-${path.to.property01}"
}
```

If an expansion expression path contains an array, elements are referenced using an index property:

```
"${path.to.array.2.element}"
```

{% hint style="warning" %}
It is not recommended to use arrays in expansions since expressions become tied to the order of the array elements. Use objects instead with *named* properties (instead of index).
{% endhint %}

## Bracket notation

Properties with complex names — such as URLs, OIDs, or names containing dots, colons, or other special characters — cannot be referenced using dot notation. Use bracket notation instead:

```
"${scope['urn:oid:1.3.6.1.4.1.5923.1.1.1.6']}"
"${scope[\"key.with.dots\"]}"
```

Dot notation and bracket notation can be combined:

```
"${scope.inner['key:with:colons']}"
```

{% hint style="info" %}
Bracket notation is only supported in `${...}` expressions. Mustache `{{...}}` syntax does not support complex property names.
{% endhint %}

## Scopes

Scopes are the named objects containing expansion result values.

The following scopes are available in addition to the configuration itself:

| Name      | Description                                                                                                                                   |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `system`  | Java system properties                                                                                                                        |
| `env`     | Process environment variables                                                                                                                 |
| `secrets` | External secrets. Requires secrets management to be enabled, see [Secrets management](/access/configuration-reference/secrets-management.md). |

{% hint style="warning" %}
Do NOT use dotted names for properties in `system` and `env` scope.
{% endhint %}

### Examples

To externalize a secret from the configuration file, define a system property containing the value and use expansion:

```
// Define system property 
-DldapBindPassword=secret

// Expansion
"bind_password": "${system.ldapBindPassword}"
```

Use a path defined in the environment in the configuration:

```
// Set base_dir to value of $HOME
"base_dir": "${env.HOME}"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fortifiedid.se/access/configuration-reference/property-expansion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
