
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@volcengine/openapi
Advanced tools
npm install -S @volcengine/openapi
Available in three settings
// Use the default service instance. You can also create a new instance.
// `const iamService = new iam.IamService();`
const iamService = iam.defaultService;
// set aksk
iamService.setAccessKeyId(AccessKeyId);
iamService.setSecretKey(SecretKey);
// If you use sts to request, you need to set up `SessionToken` after aksk is set
iamService.setSessionToken(SessionToken);
VOLC_ACCESSKEY="your ak" VOLC_SECRETKEY="your sk"
Put it in ~/.volc/config
in json format, the format is:
{"VOLC_ACCESSKEY":"your ak","VOLC_SECRETKEY":"your sk"}
Take the ListUsers API of the iam service as an example
import { iam } from'@volcengine/openapi';
async function main(AccessKeyId, SecretKey) {
// Use the default service instance. You can also create a new instance.
// `const iamService = new iam.IamService();`
const iamService = iam.defaultService;
// set aksk
iamService.setAccessKeyId(AccessKeyId);
iamService.setSecretKey(SecretKey);
// Request OpenAPI
const usersResponse = await iamService.ListUsers({
Limit: 10,
Offset: 0,
});
}
import {Signer} from '@volcengine/openapi';
// http request data
const openApiRequestData: RequestObj = {
region: 'cn-north-1',
method: 'GET',
// [optional] http request url query
params: {},
// http request headers
headers: {},
// [optional] http request body
body: "",
}
const signer = new Signer(openApiRequestData, "iam");
// sign
signer.addAuthorization({accessKeyId, secretKey, sessionToken});
// Print signed headers
console.log(openApiRequestData.headers);
const openApiRequestData: RequestObj = {
method: "POST",
region: "cn-north-1",
params: {
Action: "AssumeRole",
Version: "2018-01-01",
RoleTrn: "trn:iam::200:role/STSRole",
RoleSessionName: "test",
},
}
const credentials: Credentials = {
accessKeyId: VOLC_ACCESSKEY,
secretKey: VOLC_SECRETKEY,
sessionToken: "",
}
const signer = new Signer(openApiRequestData, "sts");
const signedQueryString = signer.getSignUrl(credentials);
FAQs
火山引擎OpenAPI SDK nodejs版
The npm package @volcengine/openapi receives a total of 846 weekly downloads. As such, @volcengine/openapi popularity was classified as not popular.
We found that @volcengine/openapi 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.