
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@elastic.io/maester-client
Advanced tools
The official Elastic.io object-storage client.
Note: All the code snippets written in Typescript
import { ObjectStorageWrapper } from '@elastic.io/maester-client/dist/ObjectStorageWrapper';
const objectStorage = new ObjectStorageWrapper(this);
The method has the following signature:
async createObject(data: object, queryHeaders?: Header[], metaHeaders?: Header[], ttl?: number)
where
{ key: string, value: string }
, current maximum - 5 items. Where key
- searchable field name (see below in Get objects by query parameters
section), must be unique for whole array, if specified - value
must be specified as well; value
- searchable field value, if specified - key
must be specified as well. Optional{ key: string, value: string }
, where key
- meta field name, must be unique for whole array, if specified - value
must be specified as well; value
- meta field value, if specified - key
must be specified as well. Optionalconst obj = await objectStorage.createObject(data);
const obj = await objectStorage.createObject(data, [], [], 100000);
const obj = await objectStorage.createObject(
data,
[{key: 'somequeriablefieldkey', value: 'somequeriablefieldvalue'}],
[{key: 'somemetakey', value: 'somemetavalue'}],
60000
);
const obj = await objectStorage.createObject(
data,
[{key: 'anotherqueriablefieldkey', value: 'anotherqueriablefieldvalue'}, {key: 'anotherqueriablefieldkey2', value: 'anotherqueriablefieldvalue2'}],
[{key: 'somemetakey', value: 'somemetavalue'}],
60000
);
The method has the following signature:
async lookupObjectById(id: string)
where
const obj = await objectStorage.lookupObjectById(id);
As Maester is able to store any data type, the method returns a raw string. You may want to parse JSON or do any other data processing according to object's expected data type:
const parsedObject = JSON.parse(obj);
The method has the following signature:
async lookupObjectsByQueryParameters(headers: Header[])
where
{ key: string, value: string }
, current maximum - 5 items. Where key
- searchable field name, must be unique for whole array, if specified - value
must be specified as well; value
- searchable field value, if specified - key
must be specified as well. RequiredIf you create an object with a queriable headers, internally it looks like this:
x-query-somequeriablefieldkey: somequeriablefieldvalue
x-query-anotherqueriablefieldkey: anotherqueriablefieldvalue
where 'x-query-' is a default prefix.
Using Maester REST API you can find this object by:
/objects?query[somequeriablefieldkey]=somequeriablefieldvalue&query[anotherqueriablefieldkey]=anotherqueriablefieldvalue
Using the library:
const obj = await objectStorage.lookupObjectsByQueryParameters([
{ key: 'somequeriablefieldkey', value: 'somequeriablefieldvalue' },
{ key: 'anotherqueriablefieldkey', value: 'anotherqueriablefieldvalue' }
]);
The method returns an array of items. It either is empty in case no objects found or contains objects
The method has the following signature:
async updateObject(id: string, data: object)
where
const obj = await objectStorage.updateObject(id, data);
The method has the following signature:
async deleteObjectById(id: string)
where
const obj = await objectStorage.deleteObjectById(id);
FAQs
The official object-storage client
The npm package @elastic.io/maester-client receives a total of 132 weekly downloads. As such, @elastic.io/maester-client popularity was classified as not popular.
We found that @elastic.io/maester-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.