---
title: "Listing Security Objects"
slug: "dsm-listing-security-objects"
updated: 2025-07-22T13:22:36Z
published: 2025-07-22T13:22:36Z
canonical: "support.fortanix.com/dsm-listing-security-objects"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.fortanix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Listing Security Objects

## 1.0 Prerequisites

Listing security objects (keys) requires a Fortanix-Data-Security-Manager account, a group, and a user or application configured in that group. You must also have one or more security objects in that group to have any results returned. *For more information, refer to the* [*User's Guide: Getting Started with Fortanix Data Security Manager - UI*](/v1/docs/users-guide-getting-started-with-fortanix-data-security-manager-ui)*.*

## 2.0 Authorization and Configuration

You must first authenticate and optionally configure a default API client as described in [*Configure API Client and Client Authentication*](/v1/docs/configure-api-client-and-client-authentication). You may authenticate as a user or as an app. Using the API, you may list all keys belonging to all groups that the user or app belongs to.

## 3.0 Create a SecurityObjectsApi Client Object

Listing keys is performed with a `SecurityObjectsApi` object.

```bash
import com.fortanix.sdkms.v1.api.SecurityObjectsApi();

SecurityObjectsApi sobjectsApi = new SecurityObjectsApi();
```

## 4.0 List All Keys

The getSecurityObjects method of SecurityObjectsApi can return a list of all of the security objects that the currently authorized entity can access.

```bash
import com.fortanix.sdkms.v1.model.KeyObject;

List<KeyObject> allKeys = sobjectsApi.getSecurityObjects(null, null, null, null);
```

## 5.0 Get a Key by Name

The `getSecurityObjects()` method can also be used to look up keys by name. The first parameter of this method restricts the returned value to only the Security-object with the requested name.

```bash
List<KeyObject> match = sobjectsApi.getSecurityObjects("example-key", null, null, null);
```

## 6.0 Filter By Group or Creator

The final three parameters of the `getSecurityObjects()` method filter the returned objects by group id, creator app id, and creator user id, respectively.

```bash
List<KeyObject> matchingKeys = sobjectsApi.getSecurityObjects(null, <group id>, null, null);
List<KeyObject> matchingKeys = sobjectsApi.getSecurityObjects(null, null, <creator app id>, null);
List<KeyObject> matchingKeys = sobjectsApi.getSecurityObjects(null, null, null, <creator user id>);
```

## 7.0 Get a Key by Key ID (UUID)

The `getSecurityObject()` method of `SecurityObjectsApi` will look up and return a specific key by UUID.

Fortanix Data Security Manager (DSM) is the world’s first cloud service secured with Intel® SGX. With Fortanix DSM, you can securely generate, store, and use cryptographic keys and certificates, as well as other secrets such as passwords, API keys, tokens, or any blob of data. Your business-critical applications and containers can integrate with Fortanix DSM using legacy cryptographic interfaces (PKCS#11, CNG, and JCE) or using the native Fortanix DSM RESTful interface.

A security object is any datum stored in DSM (for example a key, a certificate, a password, or other security objects). Each security object is assigned to exactly one group. users and applications assigned to the group have permission to see the security object and to perform operations on it.

## Related

- [Generating Security Objects](/dsm-generating-security-objects.md)
- [Fortanix DSM - Quickstart](/fortanix-data-security-manager-quickstart.md)
- [Key Lifecycle Management](/fortanix-data-security-manager-key-lifecycle-management.md)
- [Wrapping Security Objects](/dsm-wrapping-security-objects.md)
