Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
This library implements an Authentication handler for requests that provides the Akamai {OPEN} Edgegrid Authentication scheme. For more infomation visit the Akamai {OPEN} Developer Community.
@jldb
npm install --save edgegrid
To report a bug simply create a new GitHub Issue and describe your problem or suggestion.
Before reporting a bug look around to see if there are any open or closed tickets that cover your issue. And remember the wisdom: pull request > bug report > tweet!
To contribute please feel free to create a fork and submit a pull request.
To use the AkamaiOPEN API you must first register the correct user credentials. You can do that through the LUNA control panel.
Basic use of the library looks like the following. This will prepare the auth header and then execute it. Remember that requests to the API are signed with a timestamp and therefore should be executed immediately.
var EdgeGrid = require('edgegrid');
var client_token = "akab-access-token-xxx-xxxxxxxxxxxxxxxx",
client_secret = "akab-client-token-xxx-xxxxxxxxxxxxxxxx",
access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=",
base_uri = "https://akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net/";
var data = "datadatadatadatadatadatadatadata";
var eg = new EdgeGrid(client_token, client_secret, access_token, base_uri);
eg.auth({
"path": "billing-usage/v1/products",
"method": "POST",
"headers": {},
"body": data
});
eg.send(function (data, response) {
console.log(data);
});
In addition passing the credentials manually as above, you may also authenticate using a .edgerc
file, specifying its path and the group name (default is 'default'):
var eg = new EdgeGrid({
path: '/path/to/.edgerc',
group: 'mygroup'
});
An .edgerc
file contains groups of credentials and is usually hosted in your home directory:
[default]
host = akaa-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.luna.akamaiapis.net/
client_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX
client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
access_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX
max-body = 131072
[mygroup]
host = akaa-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.luna.akamaiapis.net/
client_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX
client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
access_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX
max-body = 131072
Calls using the edgegrid client can also be chained as per the following;
...
eg.auth({
"path": "billing-usage/v1/products",
"method": "POST",
"headers": {},
"body": data
}).send(function (data, response) {
console.log(data);
});
Headers for the request must be supplied as an object as name : value pairs. You do not need to supply form-data headers or content lengths - that will cause authentication headers on the API.
The request BODY can be provided as either an object or as an already POST data formed string.
Thanks to people who have contributed to this.
FAQs
Authentication handler for the Akamai OPEN EdgeGrid Authentication scheme in Node.js
The npm package edgegrid receives a total of 4,906 weekly downloads. As such, edgegrid popularity was classified as popular.
We found that edgegrid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.