private void expandMetadata(MetadataBase metadata, Map<ResourceDescriptor, MetadataBase> result) {
        try {
            ResourceDescriptor resource = ResourceDescriptorFactory.fromAnyUrl(metadata.getUrl(), encryptionService);
            result.put(resource, metadata);
            if (metadata instanceof ResourceFolderMetadata folderMetadata && folderMetadata.getItems() != null) {
                for (MetadataBase item : folderMetadata.getItems()) {
                    expandMetadata(item, result);
                }
            }
        } catch (Exception error) {
            log.warn("Unable to expand resource metadata {} due to the error: ", metadata.getUrl(), error);
        }
    }
Application makes a call to read own configuration on behalf of user.
server/src/main/java/com/epam/aidial/core/server/security/AccessService.java