# Secret

- Module: [Aspire.Hosting.Docker](/reference/api/typescript/aspire.hosting.docker.md)
- Version: `13.4.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

Represents a Secret object in a Docker Compose configuration file.

## Definition

```typescript
interface Secret {
  external: boolean;
  file: string;
  labels: Dict<string,string>;
  name: string;
}
```

## Properties

- `external`: `boolean` `get - set` -- Indicates whether the secret is managed externally. If set to true, the secret must already exist, as it will not be created or modified.
- `file`: `string` `get - set` -- Represents the file path associated with the secret. This specifies the location of the file on the host system that will be used as the source for the secret in the container.
- `labels`: `Dict<string,string>` `get - set` -- Gets or sets a collection of key-value pairs representing metadata or additional information associated with the secret. These labels can be used for categorization, identification, or other purposes as determined by the user.
- `name`: `string` `get - set` -- Gets or sets the name of the secret in the Docker Compose configuration.
